Each of the 9 squares in a 3×3 grid is to be colored red, blue, or yellow in such a way that each red square shares an edge with at least one blue square, each blue square shares an edge with at least one yellow square, and each yellow square shares an edge with at least one red square. Colorings that can be obtained from one another by rotations and/or reflections are to be considered the same. How many different colorings are possible?
WLOG, assume the center square is r, and at the end multiply by 3.
Let x be the number of blues on squares 1,2,3, and 4.
Base your casework on x.r→b⇒x≥1
Case 1: x=4b→y WLOG, suppose 5 is y.
But y→r.×
Case 2: x=3
Similar to Case 1.
Case 3: x=2
Case 3-1:5 is adjacent to two blues ⇒5 is red.b→y⇒6 and 7 have to be yellowy→r⇒8 and 9 have to be redr→b⇒10 has to be blue 10 has no adjacent yellow, which is impossible.
Case 3-2:b→y⇒WLOG, 5 is yy→r⇒7 is rr→b⇒8 is b 8 has no adjacent y, which is impossible.
Case 4: x=1
There are 4 cases to select one blue adjacent to the center. WLOG, assume the top-middle square is b.b→y⇒WLOG, 5 is yy→r⇒6 is rr→b⇒7 is bb→y⇒8 is yy→r⇒the center is r✓ 4 is y or r because it can't be b since x=1.Case 4-1: 4 is y.y→r→b⇒5 has to be r 6 is adjacent to two y's ⇒6 has to be b. ⇒1 case
Case 4-2: 4 is r.r→b→y⇒6 has to be b 5 can either be r or y⇒2 cases