Skip to main content
\(\newcommand{\identity}{\mathrm{id}} \newcommand{\notdivide}{{\not{\mid}}} \newcommand{\notsubset}{\not\subset} \newcommand{\lcm}{\operatorname{lcm}} \newcommand{\gf}{\operatorname{GF}} \newcommand{\inn}{\operatorname{Inn}} \newcommand{\aut}{\operatorname{Aut}} \newcommand{\Hom}{\operatorname{Hom}} \newcommand{\cis}{\operatorname{cis}} \newcommand{\chr}{\operatorname{char}} \newcommand{\Null}{\operatorname{Null}} \newcommand{\lt}{ < } \newcommand{\gt}{ > } \newcommand{\amp}{ & } \)

Section5.5Sage Exercises

These exercises are designed to help you become familiar with permutation groups in Sage.


Create the full symmetric group \(S_{10}\) with the command G = SymmetricGroup(10).


Create elements of G with the following (varying) syntax. Pay attention to commas, quotes, brackets, parentheses. The first two use a string (characters) as input, mimicking the way we write permuations (but with commas). The second two use a list of tuples.

  • a = G("(5,7,2,9,3,1,8)")

  • b = G("(1,3)(4,5)")

  • c = G([(1,2),(3,4)])

  • d = G([(1,3),(2,5,8),(4,6,7,9,10)])

  1. Compute \(a^3\), \(bc\), \(ad^{-1}b\).

  2. Compute the orders of each of these four individual elements (a through d) using a single permutation group element method.

  3. Use the permutation group element method .sign() to determine if \(a,b,c,d\) are even or odd permutations.

  4. Create two cyclic subgroups of \(G\) with the commands:

    • H = G.subgroup([a])

    • K = G.subgroup([d])

    List, and study, the elements of each subgroup. Without using Sage, list the order of each subgroup of \(K\). Then use Sage to construct a subgroup of \(K\) with order 10.

  5. More complicated subgroups can be formed by using two or more generators. Construct a subgroup \(L\) of \(G\) with the command L = G.subgroup([b,c]). Compute the order of \(L\) and list all of the elements of \(L\).


Construct the group of symmetries of the tetrahedron (also the alternating group on 4 symbols, \(A_4\)) with the command A=AlternatingGroup(4). Using tools such as orders of elements, and generators of subgroups, see if you can find all of the subgroups of \(A_4\) (each one exactly once). Do this without using the .subgroups() method to justify the correctness of your answer (though it might be a convenient way to check your work).

Provide a nice summary as your answer—not just piles of output. So use Sage as a tool, as needed, but basically your answer will be a concise paragraph and/or table. This is the one part of this assignment without clear, precise directions, so spend some time on this portion to get it right. Hint: no subgroup of \(A_4\) requires more than two generators.


The subsection Motion Group of a Cube describes the \(24\) symmetries of a cube as a subgroup of the symmetric group \(S_8\) generated by three quarter-turns. Answer the following questions about this symmetry group.

  1. From the list of elements of the group, can you locate the ten rotations about axes? (Hint: the identity is easy, the other nine never send any symbol to itself.)

  2. Can you identify the six symmetries that are a transposition of diagonals? (Hint: [g for g in cube if g.order() == 2] is a good preliminary filter.)

  3. Verify that any two of the quarter-turns (above, front, right) are sufficient to generate the whole group. How do you know each pair generates the entire group?

  4. Can you express one of the diagonal transpositions as a product of quarter-turns? This can be a notoriously difficult problem, especially for software. It is known as the “word problem.”

  5. Number the six faces of the cube with the numbers \(1\) through \(6\) (any way you like). Now consider the same three symmetries we used before (quarter-turns about face-to-face axes), but now view them as permutations of the six faces. In this way, we construct each symmetry as an element of \(S_6\). Verify that the subgroup generated by these symmetries is the whole symmetry group of the cube. Again, rather than using three generators, try using just two.


Save your work, and then see if you can crash your Sage session by building the subgroup of \(S_{10}\) generated by the elements b and d of orders \(2\) and \(30\) from above. Do not submit the list of elements of N as part of your submitted worksheet.

What is the order of \(N\)?