# Permutations of a set with a conditional subset

Using the digits 1, 2, 3, 5, 6, 8, 0 only once, how many 4-digit numbers could be constructed if the number is even?

This is an exercise from an online course I'm taking. The given solution suggests splitting the calculation into two cases, the sum of which gives our answer.

Case 1: The last digit is 0. This is simple enough; we have P(6,3) permutations in Case 1.

Case 2: The last digit is one of 2, 6, 8.

In Case 2, there are fewer choices for the last digit than there are digits. There is a chance that we'll have no numbers for the last digit if they are included in the counting for the previous digits.

The written solution suggests 5*5*4*3 is the number of permutations in Case 2. It seems they're not counting 0 for the first digit. Evidently they're also withholding one even number from the calculation to ensure there's at least one available for the last digit.

This is the part that I'm having trouble accepting. To my understanding, the reasoning behind using factorials to calculate permutations in the first place is that, throughout a calculation such as with the above Case 1, whenever an object is counted, it is then omitted from the rest of the calculation. In Case 2, the even numbers have a distinguishing property: How is it that we can count 3 possibilities for the last digit and still get the right answer if we are also counting some of those possibilities in the previous digits?

-
This might be more obvious if you think of it as 3*5*5*4. Choose the last digit first, then choose the first digit next (it can't be 0), then the intermediate digits. At every stage the number of choices is independent of previous choices. – Erick Wong Jul 30 '12 at 6:14
Thanks. I should have given it more thought. Care to post that as an answer? – Anon Jul 30 '12 at 6:34
You're allowed to post it as an answer yourself, if you want to. – Gerry Myerson Jul 30 '12 at 7:10
– draks ... Jul 30 '12 at 7:43

First digit odd: Can choose $3$ ways. For each choice have $4$ choices for last, and then $(5)(4)$ for middle stuff. Total is $(3)(4)(5)(4)$.
First digit even: Can choose $3$ ways. For each choice, have $3$ choices for last, and then $(5)(4)$ for middle stuff. Total is $(3)(3)(5)(4)$.