# Cycle graph (algebra)

In group theory, a subfield of abstract algebra, a cycle graph of a group is an undirected graph that illustrates the various cycles of that group, given a set of generators for the group. Cycle graphs are particularly useful in visualizing the structure of small finite groups.
A cycle is the set of powers of a given group element a, where a$^n$, the n-th power of an element a, is defined as the product of a multiplied by itself n times. The element a is said to generate the cycle. In a finite group, some non-zero power of a must be the group identity, which we denote either as e or 1; the lowest such power is the order of the element a, the number of distinct elements in the cycle that it generates. In a cycle graph, the cycle is represented as a polygon, with its vertices representing the group elements and its edges indicating how they are linked together to form the cycle.

## Definition

Each group element is represented by a node in the cycle graph, and enough cycles are represented as polygons in the graph so that every node lies on at least one cycle. All of those polygons pass through the node representing the identity, and some other nodes may also lie on more than one cycle.
Suppose that a group element a generates a cycle of order 6 (has order 6), so that the nodes a, a$^2$, a$^3$, a$^4$, a$^5$, and a$^6$ = e are the vertices of a hexagon in the cycle graph. The element a$^2$ then has order 3; but making the nodes a$^2$, a$^4$, and e be the vertices of a triangle in the graph would add no new information. So, only the primitive cycles need be considered, those that are not subsets of another cycle. Also, the node a$^5$, which also has order 6, generates the same cycle as does a itself; so we have at least two choices for which element to use in generating a cycle --- often more.
To build a cycle graph for a group, we start with a node for each group element. For each primitive cycle, we then choose some element a that generates that cycle, and we connect the node for e to the one for a, a to a$^2$, ..., a$^{k−1}$ to a$^k$, etc., until returning to e. The result is a cycle graph for the group.
When a group element a has order 2 (so that multiplication by a is an involution), the rule above would connect e to a by two edges, one going out and the other coming back. Except when the intent is to emphasize the two edges of such a cycle, it is typically drawn as a single line between the two elements.
Note that this correspondence between groups and graphs is not one-to-one in either direction: Two different groups can have the same cycle graph, and two different graphs can be cycle graphs for a single group. We give examples of each in the non-uniqueness section.

## Example and properties

| Dih$_4$ kaleidoscope with red mirror and 4-fold rotational generators | Cycle graph for dihedral group Dih$_4$. |
As an example of a group cycle graph, consider the dihedral group Dih$_4$. The multiplication table for this group is shown on the left, and the cycle graph is shown on the right, with e specifying the identity element.
| $^o$ | e | b | a | a$^2$ | a$^3$ | ab | a$^2$b | a$^3$b |
| e | e | b | a | a$^2$ | a$^3$ | ab | a$^2$b | a$^3$b |
| b | b | e | a$^3$b | a$^2$b | ab | a$^3$ | a$^2$ | a |
| a | a | ab | a$^2$ | a$^3$ | e | a$^2$b | a$^3$b | b |
| a$^2$ | a$^2$ | a$^2$b | a$^3$ | e | a | a$^3$b | b | ab |
| a$^3$ | a$^3$ | a$^3$b | e | a | a$^2$ | b | ab | a$^2$b |
| ab | ab | a | b | a$^3$b | a$^2$b | e | a$^3$ | a$^2$ |
| a$^2$b | a$^2$b | a$^2$ | ab | b | a$^3$b | a | e | a$^3$ |
| a$^3$b | a$^3$b | a$^3$ | a$^2$b | ab | b | a$^2$ | a | e |
Notice the cycle {e, a, a$^2$, a$^3$} in the multiplication table, with a$^4$ = e. The inverse a$^{−1}$ = a$^3$ is also a generator of this cycle: (a$^3$)$^2$ = a$^2$, (a$^3$)$^3$ = a, and (a$^3$)$^4$ = e. Similarly, any cycle in any group has at least two generators, and may be traversed in either direction. More generally, the number of generators of a cycle with n elements is given by the Euler φ function of n, and any of these generators may be written as the first node in the cycle (next to the identity e); or more commonly the nodes are left unmarked. Two distinct cycles cannot intersect in a generator.
Cycles that contain a non-prime number of elements have cyclic subgroups that are not shown in the graph. For the group Dih$_4$ above, we could draw a line between a$^2$ and e since (a$^2$)$^2$ = e, but since a$^2$ is part of a larger cycle, this is not an edge of the cycle graph.
There can be ambiguity when two cycles share a non-identity element. For example, the 8-element quaternion group has cycle graph shown at right. Each of the elements in the middle row when multiplied by itself gives −1 (where 1 is the identity element). In this case we may use different colors to keep track of the cycles, although symmetry considerations will work as well.
As noted earlier, the two edges of a 2-element cycle are typically represented as a single line.
The inverse of an element is the node symmetric to it in its cycle, with respect to the reflection which fixes the identity.

## Non-uniqueness

The cycle graph of a group is not uniquely determined up to graph isomorphism; nor does it uniquely determine the group up to group isomorphism. That is, the graph obtained depends on the set of generators chosen, and two different groups (with chosen sets of generators) can generate the same cycle graph.

### A single group can have different cycle graphs

For some groups, choosing different elements to generate the various primitive cycles of that group can lead to different cycle graphs. There is an example of this for the abelian group $C_{5}\times C_{2}\times C_{2}$, which has order 20. We denote an element of that group as a triple of numbers $(i;j,k)$, where $0\leq i<5$ and each of $j$ and $k$ is either 0 or 1. The triple $(0;0,0)$ is the identity element. In the drawings below, $i$ is shown above $j$ and $k$.
This group has three primitive cycles, each of order 10. In the first cycle graph, we choose, as the generators of those three cycles, the nodes $(1;1,0)$, $(1;0,1)$, and $(1;1,1)$. In the second, we generate the third of those cycles --- the blue one --- by starting instead with $(2;1,1)$.
| One cycle graph for the direct product of the three groups C_5, C_2, and C_2 | An alternative cycle graph for the direct product of the three groups C_5, C_2, and C_2. |
The two resulting graphs are not isomorphic because they have diameters 5 and 4 respectively.

### Different groups can have the same cycle graph

Two different (non-isomorphic) groups can have cycle graphs that are isomorphic, where the latter isomorphism ignores the labels on the nodes of the graphs. It follows that the structure of a group is not uniquely determined by its cycle graph.
There is an example of this already for groups of order 16, the two groups being $C_{8}\times C_{2}$ and $C_{8}\rtimes _{5}C_{2}$. The abelian group $C_{8}\times C_{2}$ is the direct product of the cyclic groups of orders 8 and 2. The non-abelian group $C_{8}\rtimes _{5}C_{2}$ is that semidirect product of $C_{8}$ and $C_{2}$ in which the non-identity element of $C_{2}$ maps to the multiply-by-5 automorphism of $C_{8}$.
In drawing the cycle graphs of those two groups, we take $C_{8}\times C_{2}$ to be generated by elements s and t with
    $s^{8}=t^{2}=1\quad {\text{and}}\quad ts=st,$
where that latter relation makes $C_{8}\times C_{2}$ abelian. And we take $C_{8}\rtimes _{5}C_{2}$ to be generated by elements 𝜎 and 𝜏 with
    $\sigma ^{8}=\tau ^{2}=1\quad {\text{and}}\quad \tau \sigma =\sigma ^{5}\tau .$
Here are cycle graphs for those two groups, where we choose $st$ to generate the green cycle on the left and $\sigma \tau$ to generate that cycle on the right:
In the right-hand graph, the green cycle, after moving from 1 to $\sigma \tau$, moves next to $\sigma ^{6},$ because
    $(\sigma \tau )(\sigma \tau )=\sigma (\tau \sigma )\tau =\sigma (\sigma ^{5}\tau )\tau =\sigma ^{6}.$

## History

Cycle graphs were investigated by the number theorist Daniel Shanks in the early 1950s as a tool to study multiplicative groups of residue classes. Shanks first published the idea in the 1962 first edition of his book Solved and Unsolved Problems in Number Theory. In the book, Shanks investigates which groups have isomorphic cycle graphs and when a cycle graph is planar. In the 1978 second edition, Shanks reflects on his research on class groups and the development of the baby-step giant-step method:
   The cycle graphs have proved to be useful when working with finite Abelian groups; and I have used them frequently in finding my way around an intricate structure [77, p. 852], in obtaining a wanted multiplicative relation [78, p. 426], or in isolating some wanted subgroup [79].
Cycle graphs are used as a pedagogical tool in Nathan Carter's 2009 introductory textbook Visual Group Theory.

## Graph characteristics of particular group families

Certain group types give typical graphs:
Cyclic groups Z$_n$, order n, is a single cycle graphed simply as an n-sided polygon with the elements at the vertices:
| Z$_1$ | Z$_2$ = Dih$_1$ | Z$_3$ | Z$_4$ | Z$_5$ | Z$_6$ = Z$_3$×Z$_2$ | Z$_7$ | Z$_8$ |
| Z$_9$ | Z$_{10}$ = Z$_5$×Z$_2$ | Z$_{11}$ | Z$_{12}$ = Z$_4$×Z$_3$ | Z$_{13}$ | Z$_{14}$ = Z$_7$×Z$_2$ | Z$_{15}$ = Z$_5$×Z$_3$ | Z$_{16}$ |
| Z$_{17}$ | Z$_{18}$ = Z$_9$×Z$_2$ | Z$_{19}$ | Z$_{20}$ = Z$_5$×Z$_4$ | Z$_{21}$ = Z$_7$×Z$_3$ | Z$_{22}$ = Z$_{11}$×Z$_2$ | Z$_{23}$ | Z$_{24}$ = Z$_8$×Z$_3$ |
| Z$_2$ | Z$_2$$^2$ = Dih$_2$ | Z$_2$$^3$ = Dih$_2$×Dih$_1$ | Z$_2$$^4$ = Dih$_2$$^2$ |
When n is a prime number, groups of the form (Z$_n$)$^m$ will have (n$^m$ − 1)/(n − 1) n-element cycles sharing the identity element:
| Z$_2$$^2$ = Dih$_2$ | Z$_2$$^3$ = Dih$_2$×Dih$_1$ | Z$_2$$^4$ = Dih$_2$$^2$ | Z$_3$$^2$ |
Dihedral groups Dih$_n$, order 2n consists of an n-element cycle and n 2-element cycles:
| Dih$_1$ = Z$_2$ | Dih$_2$ = Z$_2$$^2$ | Dih$_3$ = S$_3$ | Dih$_4$ | Dih$_5$ | Dih$_6$ = Dih$_3$×Z$_2$ | Dih$_7$ | Dih$_8$ | Dih$_9$ | Dih$_{10}$ = Dih$_5$×Z$_2$ |
Dicyclic groups, Dic$_n$ = Q$_{4n}$, order 4n:
| Dic$_2$ = Q$_8$ | Dic$_3$ = Q$_{12}$ | Dic$_4$ = Q$_{16}$ | Dic$_5$ = Q$_{20}$ | Dic$_6$ = Q$_{24}$ |
Other direct products:
| Z$_4$×Z$_2$ | Z$_4$×Z$_2$$^2$ | Z$_6$×Z$_2$ | Z$_8$×Z$_2$ | Z$_4$$^2$ |
Symmetric groups – The symmetric group S$_n$ contains, for any group of order n, a subgroup isomorphic to that group. Thus the cycle graph of every group of order n will be found in the cycle graph of S$_n$. See example: Subgroups of S$_4$

## Extended example: Subgroups of the full octahedral group

The full octahedral group is the direct product $S_{4}\times Z_{2}$ of the symmetric group S$_4$ and the cyclic group Z$_2$. Its order is 48, and it has subgroups of every order that divides 48.
In the examples below nodes that are related to each other are placed next to each other, so these are not the simplest possible cycle graphs for these groups (like those on the right).
| S$_4$ × Z$_2$ (order 48) | A$_4$ × Z$_2$ (order 24) | Dih$_4$ × Z$_2$ (order 16) | S$_3$ × Z$_2$ = Dih$_6$ (order 12) |
| S$_4$ (order 24) | A$_4$ (order 12) | Dih$_4$ (order 8) | S$_3$ = Dih$_3$ (order 6) |
Like all graphs a cycle graph can be represented in different ways to emphasize different properties. The two representations of the cycle graph of S$_4$ are an example of that.
| The cycle graph of S$_4$ shown above emphasizes the three Dih$_4$ subgroups. | This different representation emphasizes the symmetry seen in the inversion sets on the right. |