Combinatorics problem with repetitions I have been doing combinatorics problems and I have encountered a question that I can't really find an answer for.
There are 2 sets - set of odd numbers {1;3;5;7;9} and set of even numbers {0;2;4;6;8}. The question is 'how many 4 digit numbers can you make out of 3 odd numbers and 1 even number (numbers can repeat)?'.
If there were only a set of even numbers and numbers couldn't repeat, then I would use multiplication of variations in each position in the number (omitting 0 in 1st position), but that doesn't seem to work in this case as the number of possible elements in each position changes depending on the order of even & odd numbers. Also, how does one find out exact number of 4 digit numbers that begin with 0 so that I could exclude them from all possible results?
 A: OK, so you need to pick three odd numbers, which can be done in $5^3$ ways, and one even number, which can be done in $5$ ways. The even number can go in one of four spots, so that is $5^3 * 5 * 4$ strings with three odd and one even digit.
Now subtract the ones that start with $0$: there are $5^3$ of those, since you have to place three odd numbers after that $0$.
Total: $5^4 * 4 - 5^3$
A: You can start with the easy part, with the odd numbers. Since we have repetition and the order matters, we have for each of the three positions five possible numbers, in total $5^3$ possibilities. 
Now you can put one even number before, in between, or after the three odd ones. For the first position, you have 4 possibilities (no zero), for the three other positions (between or after the odd numbers) you have 5 possibilities each. Thus you get $5^3 \cdot (4 + 3 \cdot 5) = 2375$ possibilities.
In the more general case with more even numbers (e.g. 5-digit numbers with 2 even numbers), you would need to consider the $\binom{5}{2}$ ways of distributing the even numbers. (Of course you still need to deal with leading zeros)
A: Ok so first let us see how many ways Odd-Even combination in the 4 letter combination can be chosen, that can be done in 4!/(3!*1!), Four ways and three places are Odd. 
Now let us take each separately OOOE, OOEO, OEOO and EOOO.
OOOE = 5*5*5*5
OOEO = 5*5*5*5
OEOO = 5*5*5*5
EOOO = 4*5*5*5 As zero can't be the first integer.
Now we have to subtract those value which are common in the above cases.
but as we can the even number are at ones, tens, hundreds and thousands position, so no set can have the same number.
Thus, 3*5*5*5*5 + 4*5*5*5 = 19*5^3 = 2375 possibilities.
