Order of Even and Odd Digits

133 Views Asked by At

Problem: Find the number of ways to write digits $1$ through $9$ in a row (so each digit appears exactly once) and no two EVEN digits are next to each other.

So this is what I have conceived thus far, I would appreciate if someone could help me connect it to a solution.

Basic Structure: Even1, Odd1, Even2, Odd2, Even3, Odd3, Even4, Leftover: Odd4, Odd5

$1,3,5,7,9$ (Odds) $5! = 120$ combinations $2,4,6,8$ (Even) $4! = 24$ combinations

Do I multiply the two permuatations with $\binom{5}{2}$ to find the answer?

2

There are 2 best solutions below

2
On BEST ANSWER

Let odd numbers be $O_1, O_2, O_3, O_4, O_5$. Then let us put them as in the following where "_" are the empty places where we can put even digits:

$$\_O_1\_O_2\_O_3\_O_4\_O_5\_$$

Then since in each blank "$\_$" we can put only one even digit (because if we put two, they will be next to each other), we can choose the places for four even digits with $\binom{6}{4} = 15$ and change their orders with $4!$. Notice that we can also change the order of odd digits with $5!$ so the answer should be $$\binom{6}{4}\cdot4!\cdot5! = 15\cdot24\cdot120 = 43200$$

6
On

You can have the following nine fifteen patterns:

$$EOEOEOEOO,\\ EOEOEOOEO,\\ EOEOOEOEO,\\ EOOEOEOEO, \\OEOEOEOEO, \\OOEOEOEOE, \\OEOOEOEOE, \\OEOEOOEOE, \\OEOEOEOOE, \\EOOOEOEOE, \\EOEOOOEOE, \\EOEOEOOOE, \\EOOEOOEOE, \\EOOEOEOOE, \\EOEOOEOOE.$$

There are $5!$ ways to arrange the odd digits for each, and $4!$ ways to arrange the even digits. So, $15 \cdot 5! \cdot 4! = 43200$ ways.