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

This is a combinatorics problem I must solve:

How many even numbers between 10,000 and 20,000 have distinct digits(i.e no repetitions)?

Is the way I solved it correct?

I put for lines for the numbers :

_ , _, _ ,_ , _

And I put numbers in each spot: 1, 8, 7, 6, 4

Multiplying out I get 1,324 . Is this the right way to go?

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

Almost. You’re correct that there is just one possibility for the first digit. Now start at the other end: an even number must end in $0,2,4,6$, or $8$, so there are five possible last digits. Once the leading $1$ and the even last digit have been chosen, there are $8\cdot7\cdot6$ possibilities for the middle three digits, for a total of $$1\cdot5\cdot8\cdot7\cdot6=1680\;.$$ (The other problem with your answer is that you multiplied incorrectly: you should have got $1344$, not $1324$.)

share|cite|improve this answer
OMG I need a coffee. And arithmetic practice. Thanks a lot! Hmm, One question though, because Arturo got me thinking about this part - the last digit being even, doesn't that constrain the middle ones? – Adel Feb 29 '12 at 5:56
@Adel: Yes, it does: that’s why the first middle digit that you pick has only $8$ possibilities instead of $9$ $-$ it can’t be $1$, and it can’t be whichever even digit you chose for the last spot. After that, $3$ digits are unavailable, so there are only $7$ choices, and then $6$. In other words, the constraint is there, but I took it into account in my calculation. – Brian M. Scott Feb 29 '12 at 6:00
Cool, Thank You So Much! It clicked now – Adel Feb 29 '12 at 6:37

The problem with your count is that it does not consider what happens if one of the previous digits (before you get to the last one) is even.

You know the last digit will be even; and you know the first digit will be $1$; but if one of the middle digits is even, then you no longer have four possibilities for that last digit: you only have three (or fewer).

Instead, try separating your count depending on how many of the second, third, and fourth digit are even; if none are even, then ....; if exactly one is even, then which one? And then... If two, then... if all three, then ...

Added. But the other suggestion is better.

share|cite|improve this answer
Thank You So Much - this helps a lot! – Adel Feb 29 '12 at 5:43
This will work, but it makes it far too hard. If you start from the last digit, instead of the first, you don't have to break it out into separate cases. – user22805 Feb 29 '12 at 5:50
@David: Yes, that too. Clearly, time to go to bed. – Arturo Magidin Feb 29 '12 at 5:51

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.