20 balls

How many ways can we arrange 10 identical black balls and 10 identical red balls in a line, so that no ball has two neighbors that are of the same color?

Clarification: No ball (red or black) can be between two black balls or two red balls.

So, the following combinations aren't allowed for any three successive balls:

  • BRB
  • BBB
  • RRR
  • RBR

Image credit: https://www.dreamstime.com


The answer is 4.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Geoff Pilling
Feb 7, 2017

Once you have placed the first two balls ( a 1 a_1 and a 2 a_2 ), the rest are determined as follows:

a n a_n = A different color from a n 2 a_{n-2} for n > 2 n>2

There are two ways to arrange the first two balls:

  • BR
  • RR
  • RB
  • BB

So there are 4 \boxed{4} ways all together.

I think it would be better to ask for the number of ways (assuming people of the same sex are identical), rather than the probability.

Calvin Lin Staff - 4 years, 4 months ago

Log in to reply

But that would be a very large number. This is short and sweet.

Siva Bathula - 4 years, 4 months ago

Log in to reply

The number of ways is 4.

Note that I assumed "people of the same sex are identical". So yes, it might be better to rephrase it to "arrange coins showing 10 heads and 10 tails", or something like that.

Calvin Lin Staff - 4 years, 4 months ago

Log in to reply

@Calvin Lin OK @Calvin Lin I have updated the question. Can you update the answer to 4?

Geoff Pilling - 4 years, 4 months ago

Log in to reply

@Geoff Pilling Note, I used balls instead of coins to avoid any confusion involved with flipping of coins.

Geoff Pilling - 4 years, 4 months ago

@Geoff Pilling Perfect, thanks! I have updated the answer.

Calvin Lin Staff - 4 years, 4 months ago

can you add that all 10 balls of same colour are identical?

Ajinkya Shivashankar - 4 years, 4 months ago

Log in to reply

Done.........

Geoff Pilling - 4 years, 4 months ago

What a about this RRRBBB....BBRRR..R. ???

Here a 3 a_3 is not different color from a 1 a_1 and also condition holds.

Kushal Bose - 4 years, 4 months ago

Log in to reply

What colors are the neighbors of ball 2?

Calvin Lin Staff - 4 years, 4 months ago

Log in to reply

Both red which is allowable

Kushal Bose - 4 years, 4 months ago

Log in to reply

@Kushal Bose The condition is "no ball has two neighbors that are of the same color"

What do you say "Both red which is allowable"?

Calvin Lin Staff - 4 years, 4 months ago

Log in to reply

@Calvin Lin Ohh I only consider RBR and BRB. Got it

Kushal Bose - 4 years, 4 months ago

Log in to reply

@Kushal Bose Yea, we also cannot allow for RRR and BBB. Glad you pointed out this potentially common mistake :)

Calvin Lin Staff - 4 years, 4 months ago

Log in to reply

@Calvin Lin I have updated the wording for clarity.

Geoff Pilling - 4 years, 4 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...