[Math] Discrete Math- four digit odd integers with distinct digitst

combinatoricsdiscrete mathematics

a) Find the number of four-digit odd integers that have distinct digits. b) Find the number of four-digit even integers that have distinct digits.

I've been working on this problem and I can't figure it out. I don't know how to approach this problem. Any hints or maybe even a brief explanation of how to get the answer would be appreciated.

How can I get to the answer or what is the answer and how did you get to your conclusion?

Thanks a lot

Best Answer

Hint: There are two types of $4$ digit odd integers with all digits different: (i) First digit is even ($2,4,6,8$) or (ii) first digit is odd. Count the Type (i) numbers, the Type (ii) numbers, and add.

Type (i): There are $4$ choices for the first digit. For each of these choices there are $5$ choices for the last digit. For each of the choices we have made so far, there are $8$ choices for the second digit, and for each such choice $7$ choices for the third, a total of $(4)(5)(8)(7)$.

Now it's your turn: make a similar calculation for Type (ii).

The analysis for the even numbers will be roughly similar. The two cases are (i) last digit is $0$ and (ii) last digit is not $0$.

Remark: The tricky thing is that the first digit cannot be $0$. A slightly nicer approach, I think, is to first allow $0$ as a first digit, and then take away the "numbers" with first digit $0$, which we should not have counted.

So for odd numbers, if we allow $0$ as a first digit, we can choose the last digit in $5$ ways, and then for the rest we have $(9)(8)(7)$ choices, for a total of $(5)(9)(8)(7)$.

Now if we have $0$ as the first digit, the rest can be filled in $(5)(8)(7)$ ways.

So our answer is $(5)(9)(8)(7)-(5)(8)(7)=2240$.

For the evens, the same analysis gives $(5)(9)(8)(7)-(4)(8)(7)$.