Solving Pinter 7.B.4 with a program Here is exercise 7.B.4 from 'A Book of Abstract Algebra' by Charles C. Pinter.
A solution to this using a C# program is posted.
Is there another good approach using a computer program?
Any language is welcome.

The subgroup of $S_5$ generated by
$
f = \begin{pmatrix}1 & 2 & 3 & 4 & 5\\2 & 1 & 3 & 4 & 5\end{pmatrix}
\qquad
g = \begin{pmatrix}1 & 2 & 3 & 4 & 5\\1 & 2 & 4 & 5 & 3\end{pmatrix}
$
has six elements. List them, then write the table of this group:
$\varepsilon = \begin{pmatrix}1 & 2 & 3 & 4 & 5\\1 & 2 & 3 & 4 & 5\end{pmatrix}$
$f = \begin{pmatrix}1 & 2 & 3 & 4 & 5\\2 & 1 & 3 & 4 & 5\end{pmatrix}$
$g = \begin{pmatrix}1 & 2 & 3 & 4 & 5\\1 & 2 & 4 & 5 & 3\end{pmatrix}$
$h = \begin{pmatrix}1 & 2 & 3 & 4 & 5\\ \, \end{pmatrix}$
$k = \begin{pmatrix}1 & 2 & 3 & 4 & 5\\ \,\end{pmatrix}$
$l = \begin{pmatrix}1 & 2 & 3 & 4 & 5\\ \,\end{pmatrix}$
$
\begin{array}{c|ccc}
\circ & \varepsilon & f & g & h & k & l \\
\hline
\varepsilon \\ f \\ g \\ h \\ k \\ l
\end{array}
$

You don't need to use a computer program for the computation. The two given maps act nontrivially on disjoint subsets of $\{1, \dots, 5\}$, so the map $\langle{f, g\rangle} \to \mathbb{Z}_2 \oplus \mathbb{Z}_3$ given by $f \to (1,0)$ and $g\to (0, 1)$ is a well-defined isomorphism.
