1
$\begingroup$

Consider a ten-digit sequence of positive integers 0 - 9.
The 1st, 4th, and 5th digits are either 7 or 9
3rd and tenth digits are either 2 or 4.
Somewhere in the phone number are 2 zeros, and the sum of all the digits equate to 42.
What are all possible such sequence of 10 digits??

Just from going by total possible ways of arranging said numbers we have $2^5 * 10^3 * 5!$ (for each specified digit slot there are 2 ways of doing it. In the 5 slots left in 2 digits it has to be zero so 1 way of picking those, and 10 ways of picking the unspecified digits and 5! ways of arranging those digits. From that I guess we can use method of complements and find set of all possible number that DO NOT add up to 42 and subtract the total permutations by that, but my problem is calculating the cardinality of said set. Is the only way of doing so directly/explicitly? If so then it seems like I have a lot of calculating to do..

  • 1
    That $5!$ shouldn't be there; you already selected the 2 slots with 5, you cannot shuffle them; and you are already filling the other three slots in order, you cannot shuffle them.2011-11-15
  • 0
    The unspecified 5 digits, we're told zero can go anywhere in those 5 slots, then the left over 3 slots are then decided by wherever we choose to place the zero. Since the ordering matters, shouldn't we need to shuffle those 5 digits around?2011-11-15
  • 1
    No: first you choose the slots for 2 zeros; once you choose the slots, you decide what goes on the first empty slot, then the second, then the third. By multiplying by 5! you are counting, say, 00123 once when you select "first two open slots for the 0s", and then again when you select "fourth and fifth open slots for the zeros" and shuffle them so they end up in the first two. In addition, you are overcounting as well because you are allowing 0s in the other three empty slots; so you will count 00000 many, many times.2011-11-15

2 Answers 2