Identifying the elements of the dihedral group of a hexagon from SageMath.

175 Views Asked by At

I defined the dihedral group with $n=6$ in SageMath as follows:

D6 = DihedralGroup(6)

I'm trying to list the elements by the convention of my algebra text books where $r$ is $60 ^{\circ}$ clockwise rotation and $s$ is reflection along the $y$-axis.

I'm trying to determine which symmetry is which.

D6.cayley_table(names = ["1","r4","r2","r5","r3","r","sr","sr5", "sr3","s","sr4","sr2"])

But the Cayley table this outputs isn't correct. What's the proper order of listing.

1

There are 1 best solutions below

11
On BEST ANSWER

One way to do this is to generate the list of names that you want, then get the corresponding cayley table.

I will first describe a general answer that works for any dihedral group $D_n$, where we take $r$ to be the rotation counterclockwise by $\frac{2\pi}{n}$ radians, and $s$ to be reflection in the $x$-axis.

The reason we take this choice is that sage represents $D_n$ internally as the permutations of the vertices of the regular $n$-gon whose vertices are given by the $n$-th roots of unity. So, you will always have a reflection in the $x$-axis, but not necessarily in the $y$-axis (unless $n$ is even).

So, lets start by defining the dihedral group of size $n$. I will use $n = 6$ as an example.

n = 6
D = DihedralGroup(n)

Now, we grab the elements corresponding to $r$ and $s$ out of this group.

rlist = [(i + 1) % n if (i + 1) > n else (i + 1) for i in range(1,n + 1)]
r = D(rlist)
r

$(1, 2, 3, 4, 5, 6)$

And similarly for $s$:

slist = [((1 - i) % n) + 1 for i in range(1, n + 1)]
s = D(slist)
s

$(2, 6)(3, 5)$

Now, we use this to make a list of names and a corresponding list of elements as follows:

names = [None]*(2 * n)
elements = [None]*(2 * n)
for i in range(0, n):
    n1 = "e" if i == 0 else ("r" if i == 1 else "r" + str(i))
    n2 = "s" if i == 0 else "sr" + str(i)
    names[i] = n1
    names[i + n] = n2
    elements[i] = r^i
    elements[i + n] = s * r^i

The resulting lists are as follows:

names = ['e', 'r', 'r2', 'r3', 'r4', 'r5', 's', 'sr1', 'sr2', 'sr3', 'sr4', 'sr5'],

and the corresponding list of elements:

elements = [(), (1,2,3,4,5,6), (1,3,5)(2,4,6), (1,4)(2,5)(3,6), (1,5,3)(2,6,4),
            (1,6,5,4,3,2), (2,6)(3,5), (1,2)(3,6)(4,5), (1,3)(4,6),(1,4)(2,3)(5,6),
            (1,5)(2,4), (1,6)(2,5)(3,4)].

We now make the Cayley table using these names and elements:

D.cayley_table(names, elements),

Giving as output the cayley table

  *    e   r  r2  r3  r4  r5   s sr1 sr2 sr3 sr4 sr5
   +------------------------------------------------
  e|   e   r  r2  r3  r4  r5   s sr1 sr2 sr3 sr4 sr5
  r|   r  r2  r3  r4  r5   e sr5   s sr1 sr2 sr3 sr4
 r2|  r2  r3  r4  r5   e   r sr4 sr5   s sr1 sr2 sr3
 r3|  r3  r4  r5   e   r  r2 sr3 sr4 sr5   s sr1 sr2
 r4|  r4  r5   e   r  r2  r3 sr2 sr3 sr4 sr5   s sr1
 r5|  r5   e   r  r2  r3  r4 sr1 sr2 sr3 sr4 sr5   s
  s|   s sr1 sr2 sr3 sr4 sr5   e   r  r2  r3  r4  r5
sr1| sr1 sr2 sr3 sr4 sr5   s  r5   e   r  r2  r3  r4
sr2| sr2 sr3 sr4 sr5   s sr1  r4  r5   e   r  r2  r3
sr3| sr3 sr4 sr5   s sr1 sr2  r3  r4  r5   e   r  r2
sr4| sr4 sr5   s sr1 sr2 sr3  r2  r3  r4  r5   e   r
sr5| sr5   s sr1 sr2 sr3 sr4   r  r2  r3  r4  r5   e

Now, you mentioned wanting to have $s$ be the reflection in the $y$-axis instead. The exact same code above will work, we just have to change $s$ to

s = D([4, 3, 2, 1, 6, 5]),

however as you will note if you try this, the Cayley table doesn't change. The reason for this is that no matter what reflection $t = sr^i$ you pick, you have $t^2 = 1$ and $(tr)^2 = (sr^{i + 1})^2 = 1$, so any choice will give the same (isomorphic/equivalent) presentation of $D_6$ hence the same Cayley table (and more generally for any $D_n$).