Combinatorics: Choosing Sets of Distinct Digits

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
Shoney45
Messages
65
Reaction score
0

Homework Statement


How many integers between 1000 and 10000 are there with distinct digits (no leading zeros) and at least one of 2 and 4 must appear?



Homework Equations


None


The Attempt at a Solution


I am discounting the case of 10,000 since that has repeating digits. Thus, there are only numbers with four digits. I broke this into two cases.

Case 1) Where two or four is the first digit in the sequence. I am coming up with
2 x 9 x 8 x 7

Case 2) Where either two or four is in one of the last three positions. There are nine digits (no leading zeros) to use for the first digit. And there are 2 x 3 possible ways to place a 2 or a 4 in the remaining three positions. So now there are two digits gone, which leaves me with 8 x 7 ways to choose the remaining two spots. Thus, my answer for case two is 2 x 3 x 8 x 7


The total answer for (2 x 9 x 8 x 7) + (2 x 3 x 8 x 7) = 1344. But this answer is wrong from the one in the back of the book. And I can't understand how they are coming up with 3066.
 
Physics news on Phys.org
Your case 2 is messed. i) You forgot to account for the 7 possibilities for the leading digit and ii) you are overcounting numbers like 7421. You would count that twice as a 4 in the second digit and again for the 2 in the third. I would split case 2 into two subcases. First, there is exactly one 2 or 4 in the last three digits and second, both 2 and 4 are in the last three digits.