Exercise 877Combinatorics › Counting principlesL1Added 3 Nov 2026
Coloring problems
#coloring#product rule#recurrence
Statement
In how many ways can we color squares in a row with colors such that no two adjacent squares share a color?
Hint
First square has choices; each subsequent has .
Show solutionHide solution
Solution
Product. First square: choices. Each of the remaining squares: choices (must differ from the previous).
Total. .
Conclusion. colorings.