Simple yet difficult Math question.

  • Thread starter I_am_learning
  • Start date
In summary: Looks like I've got some work to do. I'll post back here when/if I come up with something reasonable.
  • #1
I_am_learning
682
16
How many five digit numbers are there which have first three digits in ascending order and last three digits in descending order?

I thought people from all faculty can ponder on this, that is why I placed it in GD rather than Maths forum.

Clarifications (Added after 6 replys had been made):
1. Base 10. (Never thought I would have to answer this too!)
2. strictly ascending and strictly descending.
3. No leading 0s allowed.

But since this isn't a home-work question It doesn't really much matter what assumptions you take. I just wanted to see how you would approach it. But the assumptions shouldn't make it too easy, like assuming, Base 2, not-strictly ascending, and No leading 0s.
 
Last edited:
Mathematics news on Phys.org
  • #2
I_am_learning said:
How many five digit numbers are there which have first three digits in ascending order and last three digits in descending order?

I thought people from all faculty can ponder on this, that is why I placed it in GD rather than Maths forum.

I would consider this a combinatorics problem, which would probably fit within the General Math section, or even computer science. I've solved a similar problem before, but the notes are buried at this point; we're moving, again. :grumpy:
 
  • #3
I'm assuming by ascending you mean strictly ascending, so 11111 doesn't count. Once you pick a middle digit, you can pick any two digits to come before it, then any two digits to come after it, as long as all four digits picked are smaller than the middle digit. Random caveat that 0 can't be the first digit of a number, so you can't pick a 0 as one of the two digits to come before. So if I pick for the middle digit
0: No way to do this
1: No way to do this
2: No way to do this (because of the 0 starting the number)
3: I have 2 choose 2 ways to pick the starting digits, and 3 choose 2 ways to pick the ending digits, for a total of 3 ways
4: I have 3 choose 2 ways to pick the starting digits, and 4 choose 2 ways to pick the ending digits, for a total of 18 ways

Add up all the results through 9 and get some sort of number
 
  • #4
Let's see how easy it could be... I haven't given this any thought and just started typing.

Let's define the five digit number thusly: ##### = abcde (just for ease of typing). So in the number 13542:
  • a = 1
  • b = 3
  • c = 5
  • d = 4
  • e = 2

Assuming that a leading zero doesn't make for a valid five-digit number, the definition for a is the closed interval between 1 and 7.

a = [1,7]
b = (a,8]
c = (b,9]
d = [1,c)
e = [0,d)

Ugh... you need summation notation to go any further... does someone with decent Latex experience want to carry on with this one?
 
  • #5
I'll make a few assumptions since your question is ambiguous:
* we are using decimal digits
* leading zeros are OK, e.g. 01210 qualifies
* by "ascending" and "descending" you don't mean "strictly", e.g. 11211 qualifies

Try constraining the middle digit to a fixed value, and consider how many possibilities are available for the first two digits.

If the middle digit is 0, then the first two digits must be 00.

If the middle digit is 1, then the first two digits can be 00, 01, or 11.

If the middle digit is 2, then the first two digits can be 00, 01, 02, 11, 12, or 22.

If the middle digit is 3, then the first two digits can be 00, 01, 02, 03, 11, 12, 13, 22, 23, or 33.

In general, if the middle digit is N, then there are 1+2+...+(N+1) possible combinations for the first two digits, and this sum is equal to
$$\sum_{k=1}^{N+1} k = \frac{(N+1)(N+2)}{2}$$
Of course the formula for the number of combinations for the last two digits is the same due to the symmetry of the problem. And, given N, the first two digits can be chosen independently of the last two digits. Therefore for a given N, the total number of combinations is
$$\left(\frac{(N+1)(N+2)}{2}\right)^2$$
So we can just sum this formula from N=0 to N=9 to get the total number five digits numbers that meet the criteria:
$$\sum_{N=0}^{9}\left(\frac{(N+1)(N+2)}{2}\right)^2$$
This sum can be evaluated by multiplying out the numerator and splitting the sum into pieces involving various powers of N. Or, we can be lazy and use Wolfram Alpha to get the answer, which is 7942.
 
  • #6
jbunniii said:
[...] which is 7942.

Which, itself, satisfies the conditions given (if you allow leading zeros).
 
  • #7
I_am_learning said:
How many five digit numbers are there which have first three digits in ascending order and last three digits in descending order?
What base? :devil:
Are leading zeros allowed? Trailing ones? Strict vs non-strict ascending / descending?

I thought people from all faculty can ponder on this, that is why I placed it in GD rather than Maths forum.
I have an answer but I'm a bit leery to post it as this looks like a homework question in disguise. My answer is different from the above ones, but that's because I made different assumptions on what is / is not allowed.
 
  • #8
are trailing zeros allowed ?
is the ascending/descending condition strict ?
I'm getting this for the different possibilities:
strict, no leading 0: 2142
strict, accepting leading 0:2892
not strict, no leading 0: 6237
not strict, accepting leading 0: 7942
 
  • #9
1. Base 10
2. strictly ascending and strictly descending.
3. No leading 0s allowed.


I only get 7:

12321
23432
34543
45654
56765
67876
78987
 
  • #10
bahamagreen, you apparently don't know what "strictly ascending" means. It does not mean consecutive, which is how you took it. The sequence 1,2,2 is an ascending sequence. In an ascending sequence, each element but the last is less than or equal to the following element. The sequences 1,2,3 and 1,2,4 are not only ascending sequences, they are also strictly ascending sequences.
 
  • #11
I assume this is supposed to be done by hand? Using a computer this wouldn't be that difficult.

That said, I would start by breaking the problem up into:

1. how many ordered pairs (a,b) with a < b (with 0 < a,b < 10)
2. how many ordered pairs (b,a) with b > a (with 0<= a,b < 10)
3. for a given x between 3 and 9, how many pairs from the first set satisfy x > b
4. how many pairs from the second set satisfy x > b
5. the product of 3 and 4

It wasn't difficult to work out by hand that (1) = 8+7+6+5+4+3+2+1 and (2) = 9+8+7+6+5+4+3+2+1. (there are 8 numbers strictly greater than 1, 7 numbers strictly greater than 2, and so on).

That's where I would start, but my problem solving approach has been "tainted" by computer science lately. I think (4) should be easy to work out as well. (The number should be (x-1) + (x -2) ... + (x - x))

Edit: here I'm being handwavy with the term "numbers". I think anyone with the intelligence to realize that I haven't been precise should also be smart enough to figure out what I mean.
 
  • #12
DimReg said:
I assume this is supposed to be done by hand?
Heavens no. This kind of problem is why symbolic math tools were invented. Set things up properly, let the tool do the work, make sure the answer makes sense. (Sometimes they don't make sense, sometimes you don't get an answer. Mathematica et al need a good deal of handholding.)

Now that we've had a clarification from the OP the problem isn't that hard. For a middle digit n≥3, there are (n-2)(n-1)/2 possible strictly ascending sequences for the first three digits (including that middle digit) and (n-1)n/2 strictly descending sequences for the last three digits (once again including the middle digit). These are independent choices, so altogether there are (n-2)(n-1)^2n/2 solutions given that the middle digit is n. Now sum from n=3 to n=9 (or to B-1 to generalize to base B).

Could I do this by hand? Yes. With lots of mistakes along the way. Would I want to? No. I'd make lots of mistakes along the way. Why torture myself when I can do it just as I wrote it with a tool such as Wolfram Alpha?
 
  • #13
D H said:
bahamagreen, you apparently don't know what "strictly ascending" means. It does not mean consecutive, which is how you took it. The sequence 1,2,2 is an ascending sequence. In an ascending sequence, each element but the last is less than or equal to the following element. The sequences 1,2,3 and 1,2,4 are not only ascending sequences, they are also strictly ascending sequences.

You are correct, I didn't know.

So 1, 1, 1, 1, 1, 1 is an ascending sequence; I suppose it a decsending one too?
 
  • #14
$$\sum_{m=3}^{9}\frac{(m-1)(m-2)}{2}·\frac{m(m-1)}{2}=2142$$

Took me more to typeset it than to figure it out :biggrin:
 
  • #15
D H said:
Heavens no. This kind of problem is why symbolic math tools were invented. Set things up properly, let the tool do the work, make sure the answer makes sense. (Sometimes they don't make sense, sometimes you don't get an answer. Mathematica et al need a good deal of handholding.)

Now that we've had a clarification from the OP the problem isn't that hard. For a middle digit n≥3, there are (n-2)(n-1)/2 possible strictly ascending sequences for the first three digits (including that middle digit) and (n-1)n/2 strictly descending sequences for the last three digits (once again including the middle digit). These are independent choices, so altogether there are (n-2)(n-1)^2n/2 solutions given that the middle digit is n. Now sum from n=3 to n=9 (or to B-1 to generalize to base B).

Could I do this by hand? Yes. With lots of mistakes along the way. Would I want to? No. I'd make lots of mistakes along the way. Why torture myself when I can do it just as I wrote it with a tool such as Wolfram Alpha?

I'm trained as a physicist, when I say "by hand" I mean not brute force with a computer. Ie, your second paragraph. I had in mind a brute force computation that would test every 5digit number, and count up the desired solutions. Easy for a computer, and brainless for a programmer.
 
  • #16
D H said:
Heavens no. This kind of problem is why symbolic math tools were invented. Set things up properly, let the tool do the work, make sure the answer makes sense. (Sometimes they don't make sense, sometimes you don't get an answer. Mathematica et al need a good deal of handholding.)

Now that we've had a clarification from the OP the problem isn't that hard. For a middle digit n≥3, there are (n-2)(n-1)/2 possible strictly ascending sequences for the first three digits (including that middle digit) and (n-1)n/2 strictly descending sequences for the last three digits (once again including the middle digit). These are independent choices, so altogether there are (n-2)(n-1)^2n/2 solutions given that the middle digit is n. Now sum from n=3 to n=9 (or to B-1 to generalize to base B).

Could I do this by hand? Yes. With lots of mistakes along the way. Would I want to? No. I'd make lots of mistakes along the way. Why torture myself when I can do it just as I wrote it with a tool such as Wolfram Alpha?

Thank you, your solution made the question simple.
So, its 2142 for Base 10 system.
http://www.wolframalpha.com/input/?i=+sum+from+n=3+to+9+of++(n-2)(n-1)^2n/4
If strict restriction is lifted on ascending and descending, I think it will be ((n)(n+1)/2)*((n+1)(n+2)/2).
http://www.wolframalpha.com/input/?i=sum+from+n=1+to+9+of++((n)(n+1)/2)*((n+1)(n+2)/2)
 
Last edited:

1. How do I solve a simple yet difficult math question?

Solving a simple yet difficult math question requires breaking down the problem into smaller, manageable steps. Start by carefully reading and understanding the question, then identify the given information and what is being asked. Next, use the appropriate math concepts and formulas to solve the problem, and always double-check your work for accuracy.

2. What are some strategies for approaching a simple yet difficult math question?

Some strategies for approaching a simple yet difficult math question include drawing diagrams or models, making educated guesses, and breaking down the problem into smaller parts. It can also be helpful to work backwards from the given answer or to try solving the problem in a different way if your initial approach is not working.

3. How can I improve my problem-solving skills for simple yet difficult math questions?

Improving problem-solving skills for simple yet difficult math questions takes practice. One helpful approach is to work on similar problems and apply different strategies to solve them. It can also be beneficial to study and understand the underlying math concepts and principles, as well as to seek assistance from teachers or peers when needed.

4. What should I do if I get stuck on a simple yet difficult math question?

If you get stuck on a simple yet difficult math question, take a step back and try to approach the problem from a different angle. It can also be helpful to take a short break and come back to the problem with a fresh perspective. If you are still struggling, seek assistance from a teacher or tutor.

5. How can I check my work and ensure the accuracy of my solution for a simple yet difficult math question?

To check your work and ensure the accuracy of your solution for a simple yet difficult math question, you can use a calculator, plug your solution back into the original problem, or ask someone else to review your work. It is also important to carefully check your calculations and make sure you have correctly followed each step of your solution.

Similar threads

Replies
2
Views
1K
Replies
3
Views
1K
  • General Math
Replies
16
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
12K
Replies
33
Views
5K
  • General Math
Replies
5
Views
2K
  • Thermodynamics
Replies
20
Views
1K
  • Introductory Physics Homework Help
Replies
1
Views
541
  • Science and Math Textbooks
Replies
28
Views
1K
Back
Top