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}
$

This should be easy to do without a computer, as mentioned.
With a computer, you should be able to do this with any language. Using something designed for algebraic computation is easiest.
In MAGMA, I would type
{x : x in sub<Sym(5)|(1, 2), (3, 4, 5)>};

and it would list out all of the elements (I have them is cycle notation). You can easily form the table from here. You can do something very similar in Sage, GAP, even in Python there is the SymPy package that lets you work with permutation groups.
