shanrizvi wrote:
Using the above explanation, shouldn't it be 10C3? As the equation will be x+y+z=9, 3 +'s mean 3 dividers. It was 8 in the example quoted because the numbers had to be positive! In this example, however, the numbers can be zero so there are two more places for the divider. Or at least that is what makes :S
There are quite a few ways to do the problem
How many positive integers less than 10,000 are there in which sum of digits equals 5? , but if you want to do it using partitions, you can do as follows: we need to find four digits which add to 5. Draw five donuts:
O O O O O
We need to insert three partitions; for example, if we have partitions as follows:
O | | O O | O
we have the number 1021, and if we have partitions as follows:
| | | O O O O O
we have the number 0005, or 5.
For the first partition, there are 6 possible locations. For the second, there will be 7 possible locations (since we must allow for a digit to equal zero, we can place the second partition immediately to the left or right of the first), and for the last there will be 8 possible locations. We've placed a first, second and third partition, but the order of the 3 partitions doesn't matter, so we need to divide by 3!. That gives us 8*7*6/3! = 56 different ways to get four digits to sum to 5.
Note that we are allowing the first digit(s) of our number to be zero, but that's fine - we need to count one-digit, two-digit and three-digit numbers as well, and we'll be counting those by allowing zeros at the beginning of our number.
For online GMAT math tutoring, or to buy my higher-level Quant books and problem sets, contact me at ianstewartgmat at gmail.com
ianstewartgmat.com