# Combinations

Problem:

There are 8 lights arranged in a circle. Each of them is randomly lit either red, green, or blue.

What is the probability that there are 6 consecutive lights which are lit up in at most 2 colors?

Solution:

Assume that we have 6 consecutive bulbs in 2 colors. For 6 bulbs and 2 colors, there are 2^6 possible colorings. The number of ways in which we can select 2 colors from 3 is $$_3C_2$$ = 3. Thus, the number of ways to color 6 bulbs, after choosing 2 colors from 3, is $$3 \cdot 2^6.$$ We've now handled 6 of 8 bulbs. Each of the 2 remaining bulbs must also have a color. Since there are 2 bulbs, and 3 possible colors for each, there are 3^2 possibilities colorings, for these 2 bulbs. Thus, the number of ways we could have 6 bulbs in 2 colors, given 8 bulbs and 3 colors, is

$$3 \cdot 2^6 \cdot 3^2 = 3^3 \cdot 2^6.$$

But the number of ways of coloring 8 bulbs in 3 colors is $$3^8.$$ Thus, the probability of having 6 bulbs in 2 colors, given 8 bulbs and 3 colors, is

$$\dfrac{3^3 * 2^6}{3^8} = \dfrac{2^6}{3^5}$$

Now let's attempt to simplify the fraction $$2^6/3^5.$$ Starting at 1 and doubling repeatedly, while counting from 0-6 on my fingers, I find that $$2^6 = 64.$$ Starting at 1 and tripling repeatedly, while counting from 0-5 on my fingers, I find that $$3^5 = 243.$$ Thus, the final answer must be $$64/243.$$

Source: AoPS