# Counting problem -- Lining up colored marbles...

1. Mar 25, 2016

### Math_QED

1. The problem statement, all variables and given/known data

I have 3 yellow and 7 blue marbles. I put those randomly in a line. What is the probability that no yellow marbles are next to each other?

2. Relevant equations
/

3. The attempt at a solution

Total amount of opportunities to put those marbles next to each other: 120
Total amount of opportunities to put 3 marbles next to each other: 8
Total amount of opportunities to put 2 marbles next to each other:

(9 nCr 1)*(8 nCr 1) = 72
72 - (8 nCr 1) = 64

1 - (64+8)/120 = 2/5

Can someone verify whether I'm correct? Or at least tell me where I am wrong?

2. Mar 25, 2016

### .Scott

I agree that the total number of color patterns is 120 = 10!/(7!*3!).
When I calculate the number of arrangements for no double yellow, I did it with two scenarios:
1) Turn all three yellow marbles into yellow-blue pairs. That leaves three pairs and four extra blue.
2) Take one yellow and put it at the end. Then pair the remaining 2 yellows into 2 yellow-blue pairs. That leaves 5 extra blues.
The total of those two numbers gives you the total number of arrangements that keep the yellows separated.

3. Mar 25, 2016

### Math_QED

Did you get 56/120? I seem to have made a mistake.

4. Mar 25, 2016

### haruspex

Small refinement to your method: create one extra blue as well as coupling a blue with each yellow. In the blue-yellow pairs, have the blue on the right always. So there will always be a blue at the right end of the line, which you throw away to get back to 7. So the answer is the number of ways f choosing 3 YB pairs from 3+(7-3+1) things.

5. Mar 25, 2016

### Staff: Mentor

Why 9 and 8? What does the second line do?

6. Mar 25, 2016

### Ray Vickson

Your 56/120 is correct. Here is how I looked at the problem: line up the 7 blues, with spaces between them. You have 8 spaces altogether (one to the left of all the blues, 6 between the blues, and one to the right of all the blues). Now you want to put three yellows into those 8 spaces, with either 0 or 1 per space. The number of ways of doing that is the number of ways to pick 3 spaces from 8, which is C(8,3) = 56. The number of ways of arranging the 10 marbles (with no restrictions) is the number of ways of choosing the 3 positions in which the yellows will go, so is C(10,3) = 120. Therefore, the probability you want is 56/120 = 7/15.

7. Mar 25, 2016

### Math_QED

Wow. Nice method. I greatly appreciate your effort and clear explanation.

8. Mar 25, 2016

yes