# Combinatorics - Am I doing this properly?

I'm working on an assignment and I'm not sure if I'm doing it properly so I figured I'd ask and make sure.

The question is, a university gives each student a 6 digit code for a student number.

a) How many codes are there?

$10 * 9 * 8 * 7 * 6 * 5 = 151,200$, I assumed that each code must be unique

b) How many codes read the same forward as backward?

$10 * 9 * 8 = 720$, If the code is supposed to read the same way forward as backwards then the first digit you'd have 10 choices, meaning the last would only have 1 choice? Then 9 in the second, 1 option in second to last..., if the codes were not unique then would it be $10^3$?

c) How many codes contain only odd digits?

Since there are 5 odd digits between 0-9, $5^6 = 15,625$ number of odd digit codes?

d) How many codes contain at least one even digit?

Not sure about how to do this one.

• Hint for $d$: $d = a - c$. – TonyK Dec 3 '14 at 17:42
• Hint for $a$: No, that figure assumes that all the digits must be distinct (but then $b$ would make no sense). – TonyK Dec 3 '14 at 17:42

For part $a)$, your answer of $151,200$ is based on the assumption that no digit in the code is repeated, not that the code is unique.
Assuming you want each code to be unique there would be $10^6$ possibilities.
The first three look good. The fourth is inclusion exclusion. There are $10^{6}$ codes. Subtract out the codes that contain only odd digits: $10^{6} - 5^{6}$.