Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

$1$) Using the numbers $0,1,2,...,9$ as digits, how many $4$-digit numbers exist in which all digit are different with two digits as even numbers and two as odd numbers?

(Note: $0$ is an even number, and that $4$-digit number do not start with $0$)

share|cite|improve this question
up vote 3 down vote accepted

First pick 2 odd numbers and 2 even numbers. There are $\binom{5}{2}^2$ ways to do this. Now order them. There are $4!$ ways. So there are $4!\binom{5}{2}^2$ total numbers, but we have included 4-digit numbers that start with 0. Now let's count the number that start with $0$. There are $4$ choices for the other even digit, $\binom{5}{2}$ choices for the odd digits, and $3!$ orders. So for our final answer we have: $$4!\binom{5}{2}^2-3!(4)\binom{5}{2}$$

share|cite|improve this answer
You mean $\begin{pmatrix} 5 \\ 2 \end{pmatrix}$ instead of $10$ ; there's only $5$ possible odd/even digits : 1,3,5,7,9 for odd and 0,2,4,6,8 for even. For the same reason there are only $4$ choices for the other even digit when $0$ is included. – Patrick Da Silva Mar 14 '12 at 1:43
Indeed. I'll fix that now. (Nevermind, you beat me to it. Thanks!) – Brett Frankel Mar 14 '12 at 1:44
I fixed it. It's just fine now – Patrick Da Silva Mar 14 '12 at 1:45
I added another approach in my answer. See it if you feel like it. – Patrick Da Silva Mar 14 '12 at 1:58

Another possibility would be this : consider the $4$-digit numbers without $0$ in them. There is $4$ possible even numbers and $5$ possible odd numbers, so $\binom 52 \binom 42 = 60$ possibilities. There are $4! = 24$ ways to place them, hence you have $60 \times 24 = 1440$ such numbers.

Now consider those with $0$ in them. The zero must be one of the $3$ first digits. Now for the number possibilities, there are $4$ choices for the even number and $\binom 52 = 10$ choices for the odd numbers, hence $40$ choices for the numbers. Afterwards, there are $3$ possibilities for the position of $0$ and $3!=6$ choices for the position of the three other digits, hence $18$ possibilities in total. Therefore there is $40 \times 18 = 720$ such digits.

Summing up gives $1440 + 720 = 2160 = 4! \binom 52^2 - 3!(4) \binom 52$ possibilities.

Hope that helps,

share|cite|improve this answer
Do you mean that the zero must be one of the last 3 digits? – JakeR Mar 14 '12 at 2:01
Um, in the number $1240$ I consider $2$, $4$ and $0$ to be the first $3$ digits. Does that help? – Patrick Da Silva Mar 14 '12 at 4:02
Ah, that strikes me as unusual but certainly valid. Though looking again, I'm not sure that you meant to write $40 \times 18 = 180$. – JakeR Mar 14 '12 at 4:05
Um, yes I had made the computation mistake of writing $10 \times 18$ before because I didn't take in account the "$4$ choices" when calculating explicitly. The result is meant to be $720$ there, obviously. – Patrick Da Silva Mar 14 '12 at 4:07
@JakeR : I edited it. Thanks for noticing. – Patrick Da Silva Mar 14 '12 at 4:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.