Learn / Library / Combinatorics
Circular symbol fillings
A circular log has slots, where slot is next to slot . Each slot gets one of symbols so that adjacent slots always differ. Fillings that differ only by a rotation count as different. How many fillings are possible?
Checking an answer needs JavaScript. The hint and the solution open without it.
Hint
Compare circular fillings with straight rows whose ends may or may not match.
Solution
- Let be the number of valid circular fillings of slots; a straight row of slots with different neighbours can be filled in ways.
- In such a row the last symbol either differs from the first, which is a circular filling counted by , or equals the first; merging those equal ends gives a circular filling of slots, counted by .
- So with .
- The values for are , so .
Answer: