-1

I am unsure as to how to go about this problem. Any tips in helping me solve this would be greatly appreciated! I understand that I am to use combinations with repetition to solve such.

The question is asking: How many pins have digit sum 20? (a PIN is string a b c d of 4 decimal digits).

Using the combination with repetition formula I got 23C3 = 1771 ways (sorry I am new to stackexchange and don't know how to format)

Now I want to solve:

How many of the solutions to $a+b+c+d = 20$ have one of the 'digits' equal to $15$?

How many of the solutions to $a+b+c+d = 20$ have one or two of the 'digits' equal to $10$?

Thanks in advance!

1 Answers1

0

To answer your questions you can reuse the formula for combinations with repetition.

Any one of the four 'digits' can be $15$ and then the other three digits must sum to $5$, which gives $4\times\binom{7}{2}=84$ possible solutions.

Similarly, assume any one of the four 'digits' is $10$, then the other three digits must sum to $10$, so we have $4\times\binom{12}{2}=264$. However, this will double-count the cases where the four 'digits' are $10,10,0$ and $0$ in some order. There are $6$ of these so the answer is $264-6=258$ solutions.

nickgard
  • 4,116