How many 6 digit numbers that only contain the digits 1-9 have digits in non-decresing order?
For example, 113336 is one valid, but 116333 is not, because 6 came before
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
You have 6 stars and 8 bars, so the answer is actually ( 6 1 4 ) = 3 0 0 3 .
Log in to reply
how 6 stars and 8 bars ? And why not 6 stars and 9 bars?
Log in to reply
Because the bars separate the stars for each category. For instance, there is a bar separating the stars for digit 1 and digit 2, and a bar separating the stars for digit 2 and digit 3, and so on, up to digit 8 and digit 9. This gives a total of 8 bars.
Log in to reply
@Jon Haussmann – ok..thanks sir....I came to know where I was wrong...
As Jon sir explained, the flaw here is that the values of m and n are interchanged. In this case the value of m is 6 and of n is 9
Log in to reply
wait how did you solve the problem without knowing the solution?
Log in to reply
Actually, answering 2002 marked it as incorrect, then i typed 3003..
Problem Loading...
Note Loading...
Set Loading...
Note that there is a bijection between sets of 6 digits, allowing repetition, and 6 digit numbers satisfying the condition, because once the digits are chosen, there is exactly one way to place the digits in ascending order. Thus we need to count the number of sets of 6 digits, where only the number of appearances of each digit is significant.
Let x 1 be the number of 1's, x 2 be the number of 2's, and so on. The equation we now have is x 1 + x 2 + . . . + x 9 = 6 , where x i is a nonnegative integer for all 1 ≤ i ≤ 9 . By a "stars-and-bars" argument, the number of such 9-tuples ( x 1 , x 2 , . . . , x 9 ) is ( n − 1 m + n − 1 ) = ( 6 9 + 6 − 1 ) = ( 6 1 4 ) = 3 0 0 3 .