# Combinatorial problem

• Oct 4th 2011, 06:03 AM
Romanka
Combinatorial problem
In how many ways can nine 3s and six 5s be placed in a row so that no two 5s are side by side?
Please, help me to solve it.
Thanks!
• Oct 4th 2011, 06:11 AM
emakarov
Re: Combinatorial problem
Place the fives in a row and place 5 threes between them; this is required by the problem. The rest of the threes can be arbitrarily distributed either between some digits or at either end. The number of such distributions is found using the stars and bars theorem.
• Oct 4th 2011, 08:25 AM
Romanka
Re: Combinatorial problem
Thanks!(Evilgrin)
• Oct 4th 2011, 09:12 AM
Soroban
Re: Combinatorial problem
Hello, Romanka!

Quote:

In how many ways can nine 3's and six 5's be placed in a row
so that no two 5's are side by side?

Place the nine 3's in a row with a space before, after and between them.

. . $\_\:3\:\_\:3\:\_\:3\:\_\:3\:\_\:3\:\_\:3\:\_\:3 \:\_\:3 \:\_ \:3\:\_$

There are 10 spaces.
Select 6 of them and insert the 5's.

There are: . $_{10}C_6 \:=\:\frac{10!}{6!\,4!} \:=\:210$ ways.
• Oct 4th 2011, 09:31 AM
emakarov
Re: Combinatorial problem
My solution seems incorrect because it counts several arrangements twice. For example, inserting a 3 between 5 and 3 in 5 3 5 gives the same result as inserting it between 3 and 5. Soroban's solution is correct.
• Oct 4th 2011, 10:05 AM
Romanka
Re: Combinatorial problem
yes, I see. thanks!