1

Problem: A renovation of an arena proposes to give the seats colors from a color scheme with $5$ different colors. In each row, all $5$ colors must be used at least once. In how many different ways can this be done for a row of $20$ seats?

Answer: $5^{20} - \binom{5}{1} (4^{20}) + \binom{5}{2} (3^{20}) - \binom{5}{3} (2^{20}) + \binom{5}{4} (1^{20})$

(Where "$\binom{5}{1}$" would represent the value "$5$ choose $1$")

I have a decent understanding of the inclusion/exclusion principle, yet can't seem to wrap my head around the logic behind each part of the answer. Any advice is appreciated to clear things up. Thank you.

K. Jiang
  • 7,210
  • First, see this article for an introduction to Inclusion-Exclusion. Then, see this answer for an explanation of and justification for the Inclusion-Exclusion formula. Index the colors $~C_1, \cdots, C_5.~$ Let $~S~$ denote the set of all possible ways of coloring the row, without any regard to what colors are used. Let $~S_k~$ denote the subset of $~S~$ such that color $~C_k~$ is not used. ..see next comment – user2661923 Mar 19 '24 at 22:52
  • Then, you want to compute $$|S| - |S_1 \cup \cdots \cup S_5|.$$ You can now apply the 2nd linked article directly. – user2661923 Mar 19 '24 at 22:53

1 Answers1

1

It should be clear that $5^{20}$ is the total number of ways to assign a color to each of the $20$ seats. We can instead answer the question

How many colorings do not use at least one color?

and subtract the answer to that question from $5^{20}$ to get the desired answer.

Assume for the sake of simplicity that the colors are red, orange, yellow, green, and blue. Let's first ask the question

How many colorings do not use red?

This is simple to calculate: for each seat, we just have four options (orange, yellow, green, blue). There are $4^{20}$ ways to do this. By symmetry, there are also $4^{20}$ colorings that avoid orange, $4^{20}$ colorings that avoid yellow, and so on. This gives a total of $5 (4^{20})$ colorings.

But there's an issue if we stop here. Suppose a coloring did not use either red or orange. How many times did we count that so far? Well, it was counted once for the colorings that excluded red, and another time for the colorings that excluded orange - in other words, we have overcounted it once. To correct, we can subtract the number from our running total. You can check that there are $3^{20}$ colorings that avoid both red and orange. And, there are $\binom{5}{2}$ distinct pairs of colors. So, we need to subtract $\binom{5}{2} (3^{20})$ colorings.

Again, we can't stop here, because there are colorings that avoid $3$ colors, say, red, orange, and yellow. Each of these ($3$) was counted once in the first step, and each pair (there are $3$) was deducted once in the second step. So, we have undercounted these cases, and need to add each of them once back to the running total. Each set of three colors to avoid yields $2^{20}$ colorings, and there are $\binom{5}{3}$ triplets. So, we need to add back $\binom{5}{3} (2^{20})$ colorings.

By this point, you get the idea. Let's consider colorings that avoid $4$ colors - there are only $5$ of these, since you just have one color to choose from. Each of these ($4$) was counted once in the first step, each pair (there are $\binom{4}{2} = 6$) was deducted once in the second step, and each triplet (there are $4$) was added once in the third step. This means we have overcounted each once (since $4 - 6 + 4 = 2$). So, we just need to subtract $5$ from the total.

Putting everything together, the answer to the question

How many colorings do not use at least one color?

is

$$5 (4^{20}) - \binom{5}{2} (3^{20}) + \binom{5}{3} (2^{20}) - 5$$

So the answer to the original question is

$$5^{20} - 5 (4^{20}) + \binom{5}{2} (3^{20}) - \binom{5}{3} (2^{20}) + 5$$

Hope this helped!

K. Jiang
  • 7,210