2016 AIME II Problem 12
Problem 12 of 15HarderCombinatorics
The figure below shows a ring made of six small sections which you are to paint on a wall. You have four paint colors available and will paint each of the six sections a solid color. Find the number of ways you can choose to paint the sections if no two adjacent sections can be painted with the same color.

Your answer
Integer from 0 to 999
Show solution
Solution
Let be the number of valid paintings of a ring of sections. Cutting a ring open between two adjacent sections shows that ring paintings correspond exactly to rows of sections with adjacent colors different and the two end colors different. A row of sections with adjacent colors different can be painted in ways, and the rows whose end colors match correspond, by merging the two end sections into one, to ring paintings of sections. Hence
Three mutually adjacent sections give so then and finally
Tagged: graph theory · recursive counting