How many 10 digit phone numbers have at least one of each odd digit ($5 \binom 94 \cdot 4! \cdot 10^5 + 4\binom 95 \cdot 5! \cdot 10^4$ is wrong?)

combinatorics

How many 10 digit phone numbers have at least one of each odd digit?

Same question as in the link. I came up with the following answer:

$$5\cdot \binom 94 \cdot 4! \cdot 10^5 + 4\cdot \binom 95 \cdot 5! \cdot 10^4=2,116,800,000$$

My strategy was to set in stone the 5 odd numbers first then fill in the rest of the number. But because the first digit can't be $0$, I split up the 10-digit number into two cases.

The first case was if it was odd. Then I had $5$ choices for the first digit. Then I choose 4 spots out of the remaining 9 to hold the rest of the 4 odd numbers, and then order the 4 odds however I want in those spots. So that's $\binom 94 4!$. The remaining 5 spots I just fill with whatever I want, so that's $10^5$.

The second case was if the first digit was even. Then I have $4$ choices: $\{2,4,6,8\}$. Then out of the remaining 9, I choose 5 spots, and fill them however I want: $\binom 95 5!$. Finally, the last four spots are whatever, so that's $10^4$.

Putting everything together, I get my expression above. Unfortunately, that's not the same value the answer in the link had, so I'm wondering where I went wrong. I've looked over my reasoning again and again, but I can't think of anything. If you find the error, is it possible that this approach could work given further tweaking? Or is the error too fatal? Thanks for any help!

Best Answer

As @PaoloLeonetti said, you count some number more than once. But you can count it by PIE: $$\sum_{i=0}^{i=5} (-1)^i\binom{5}{i}(10-i)^{10}$$ That in fact count all, then exclude numbers with one specific odd missing, then plus two specific odd missing (because they exclude twice) and...

Related Question