## Section 15.1 Coloring the Vertices of a Square

Let's begin by coloring the vertices of a square using white and gold. If we fix the position of the square in the plane, there are \(2^4=16\) different colorings. These colorings are shown in Figure 15.1.

However, if we think of the square as a metal frame with a white bead or a gold bead at each corner and allow the frame to be rotated and flipped over, we realize that many of these colorings are equivalent. For instance, if we flip coloring \(C_7\) over about the vertical line dividing the square in half, we obtain coloring \(C_9\text{.}\) If we rotate coloring \(C_2\) clockwise by \(90^\circ\text{,}\) we obtain coloring \(C_3\text{.}\) In many cases, we want to consider such equivalent colorings as a single coloring. (Recall our motivating example of necklaces made of colored beads. It makes little sense to differentiate between two necklaces if one can be rotated and flipped to become the other.)

To systematically determine how many of the colorings shown in Figure 15.1 are not equivalent, we must think about the transformations we can apply to the square and what each does to the colorings. Before examining the transformations' effects on the colorings, let's take a moment to see how they rearrange the vertices. To do this, we consider the upper-left vertex to be \(1\text{,}\) the upper-right vertex to be \(2\text{,}\) the lower-right vertex to be \(3\text{,}\) and the lower-left vertex to be \(4\text{.}\) We denote the clockwise rotation by \(90^\circ\) by \(r_1\) and see that \(r_1\) sends the vertex in position \(1\) to position \(2\text{,}\) the vertex in position \(2\) to position \(3\text{,}\) the vertex in position \(3\) to position \(4\text{,}\) and the vertex in position \(4\) to position \(1\text{.}\) For brevity, we will write \(r_1(1) =2\text{,}\) \(r_1(2)=3\text{,}\) etc. We can also rotate the square clockwise by \(180^\circ\) and denote that rotation by \(r_2\text{.}\) In this case, we find that \(r_2(1) = 3\text{,}\) \(r_2(2)=4\text{,}\) \(r_2(3)= 1\text{,}\) and \(r_2(4)=2\text{.}\) Notice that we can achieve the transformation \(r_2\) by doing \(r_1\) twice in succession. Furthermore, the clockwise rotation by \(270^\circ\text{,}\) \(r_3\text{,}\) can be achieved by doing \(r_1\) three times in succession. (Counterclockwise rotations can be avoided by noting that they have the same effect as a clockwise rotation, although by a different angle.)

When it comes to flipping the square, there are four axes about which we can flip it: vertical, horizontal, positive-slope diagonal, and negative-slope diagonal. We denote these flips by \(v\text{,}\) \(h\text{,}\) \(p\text{,}\) and \(n\text{,}\) respectively. Now notice that \(v(1) = 2\text{,}\) \(v(2) = 1\text{,}\) \(v(3) = 4\text{,}\) and \(v(4) = 3\text{.}\) For the flip about the horizontal axis, we have \(h(1) = 4\text{,}\) \(h(2) = 3\text{,}\) \(h(3)=2\text{,}\) and \(h(4)= 1\text{.}\) For \(p\text{,}\) we have \(p(1) = 3\text{,}\) \(p(2) = 2\text{,}\) \(p(3)=1\text{,}\) and \(p(4)=4\text{.}\) Finally, for \(n\) we find \(n(1) = 1\text{,}\) \(n(2) = 4\text{,}\) \(n(3) = 3\text{,}\) and \(n(4)=2\text{.}\) There is one more transformation that we must mention; the transformation that does nothing to the square is called the identity transformation, denoted \(\iota\text{.}\) It has \(\iota(1)=1\text{,}\) \(\iota(2)=2\text{,}\) \(\iota(3)=3\text{,}\) and \(\iota(4)=4\text{.}\)

Now that we've identified the eight transformations of the square, let's make a table showing which colorings from Figure 15.1 are left unchanged by the application of each transformation. Not surprisingly, the identity transformation leaves all of the colorings unchanged. Because \(r_1\) moves the vertices cyclically, we see that only \(C_1\) and \(C_{16}\) remain unchanged when it is applied. Any coloring with more than one color would have a vertex of one color moved to one of the other color. Let's consider which colorings are fixed by \(v\text{,}\) the flip about the vertical axis. For this to happen, the color at position \(1\) must be the same as the color at position \(2\text{,}\) and the color at position \(3\) must be the same as the color at position \(4\text{.}\) Thus, we would expect to find \(2\cdot 2 = 4\) colorings unchanged by \(v\text{.}\) Examining Figure 15.1, we see that these colorings are \(C_1\text{,}\) \(C_6\text{,}\) \(C_8\text{,}\) and \(C_{16}\text{.}\) Performing a similar analysis for the remaining five transformations leads to Figure 15.2.

Transformation | Fixed colorings |

\(\iota\) | All 16 |

\(r_1\) | \(C_1\text{,}\) \(C_{16}\) |

\(r_2\) | \(C_{1}\text{,}\) \(C_{10}\text{,}\) \(C_{11}\text{,}\) \(C_{16}\) |

\(r_3\) | \(C_1\text{,}\) \(C_{16}\) |

\(v\) | \(C_1\text{,}\) \(C_6\text{,}\) \(C_8\text{,}\) \(C_{16}\) |

\(h\) | \(C_1\text{,}\) \(C_7\text{,}\) \(C_{9}\text{,}\) \(C_{16}\) |

\(p\) | \(C_1\text{,}\) \(C_3\text{,}\) \(C_5\text{,}\) \(C_{10}\text{,}\) \(C_{11}\text{,}\) \(C_{13}\text{,}\) \(C_{15}\text{,}\) \(C_{16}\) |

\(n\) | \(C_1\text{,}\) \(C_2\text{,}\) \(C_4\text{,}\) \(C_{10}\text{,}\) \(C_{11}\text{,}\) \(C_{12}\text{,}\) \(C_{14}\text{,}\) \(C_{16}\) |

At this point, it's natural to ask where this is going. After all, we're trying to count the number of *nonequivalent* colorings, and Figure 15.2 makes no effort to group colorings based on how a transformation changes one coloring to another. It turns out that there is a useful connection between counting the nonequivalent colorings and determining the number of colorings fixed by each transformation. To develop this connection, we first need to discuss the equivalence relation created by the action of the transformations of the square on the set \(\cgC\) of all \(2\)-colorings of the square. (Refer to Section B.13 for a refresher on the definition of equivalence relation.) To do this, notice that applying a transformation to a square with colored vertices results in another square with colored vertices. For instance, applying the transformation \(r_1\) to a square colored as in \(C_{12}\) results in a square colored as in \(C_{13}\text{.}\) We say that the transformations of the square act on the set \(\cgC\) of colorings. We denote this action by adding a star to the transformation name. For instance, \(r_1^*(C_{12})=C_{13}\) and \(v^*(C_{10})=C_{11}\text{.}\)

If \(\tau\) is a transformation of the square with \(\tau^*(C_i) = C_j\text{,}\) then we say colorings \(C_i\) and \(C_j\) are equivalent and write \(C_i\sim C_j\text{.}\) Since \(\iota^*(C)=C\) for all \(C\in\cgC\text{,}\) \(\sim\) is reflexive. If \(\tau_1^*(C_i) = C_j\) and \(\tau_2^*(C_j) = C_k\text{,}\) then \(\tau_2^*(\tau_1^*(C_i)) = C_k\text{,}\) so \(\sim\) is transitive. To complete our verification that \(\sim\) is an equivalence relation, we must establish that it is symmetric. For this, we require the notion of the inverse of a transformation \(\tau\text{,}\) which is simply the transformation \(\tau\inv\) that undoes whatever \(\tau\) did. For instance, the inverse of \(r_1\) is the *counter*clockwise rotation by \(90^\circ\text{,}\) which has the same effect on the location of the vertices as \(r_3\text{.}\) If \(\tau^*(C_i) = C_j\text{,}\) then \({\tau^{-1}}^*(C_j) = C_i\text{,}\) so \(\sim\) is symmetric.

Before proceeding to establish the connection between the number of nonequivalent colorings (equivalence classes under \(\sim\)) and the number of colorings fixed by a transformation in full generality, let's see how it looks for our example. In looking at Figure 15.1, you should notice that \(\sim\) partitions \(\cgC\) into six equivalence classes. Two contain one coloring each (the all white and all gold colorings). One contains two colorings (\(C_{10}\) and \(C_{11}\)). Finally, three contain four colorings each (one gold vertex, one white vertex, and the remaining four with two vertices of each color). Now look again at Figure 15.2 and add up the number of colorings fixed by each transformation. In doing this, we obtain \(48\text{,}\) and when \(48\) is divided by the number of transformations (\(8\)), we get \(6\) (the number of equivalence classes)! It turns out that this is far from a fluke, as we will soon see. First, however, we introduce the concept of a permutation group to generalize our set of transformations of the square.