Skip to main content

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 PnP_n be the number of valid paintings of a ring of nn sections. Cutting a ring open between two adjacent sections shows that ring paintings correspond exactly to rows of nn sections with adjacent colors different and the two end colors different. A row of nn sections with adjacent colors different can be painted in 4⋅3n−14 \cdot 3^{n-1} ways, and the rows whose end colors match correspond, by merging the two end sections into one, to ring paintings of n−1n - 1 sections. Hence Pn+Pn−1=4⋅3n−1.P_n + P_{n-1} = 4 \cdot 3^{n-1}. Three mutually adjacent sections give P3=4⋅3⋅2=24,P_3 = 4 \cdot 3 \cdot 2 = 24, so P4=108−24=84,P_4 = 108 - 24 = 84, then P5=324−84=240,P_5 = 324 - 84 = 240, and finally P6=972−240=732.P_6 = 972 - 240 = 732.
AoPS wiki

Tagged: graph theory · recursive counting

More practice