CM::Group::Sym - An implementation of the finite symmetric group S_n
version 0.05
CM::Group::Sym is an implementation of the finite Symmetric Group S_n
use CM::Group::Sym; my $G = CM::Group::Sym->new({$n=>3}); $G->compute();
This way you will generate S_3 with all it's 6 elements which are permutations. Say you want to print the operation table(Cayley table).
print $G 6 5 4 3 2 1 3 4 5 6 1 2 2 1 6 5 4 3 5 6 1 2 3 4 4 3 2 1 6 5 1 2 3 4 5 6
Note that those are only labels for the elements as printing the whole permutations would render the table useless since they wouldn't fit.
So if you want to see the meaning of the numbers(the permutations behind them) you can use str_perm()
print $G->str_perm; 1 -> 3 2 1 2 -> 2 3 1 3 -> 2 1 3 4 -> 3 1 2 5 -> 1 3 2 6 -> 1 2 3
Computes the operation table.
This method will draw the cayley digraph of the group to png to the given $path. You can read the graph as follows. An edge from X to Y with a label Z on it that means X * Z = Y where X,Y,Z are labels of permutations. Beyond n=3 it's very hard to understand anything in the diagram(because S_n is a big group in general).
Internally the permutations are stored in arrayref of arrayrefs and each cell contains a CM::Permutation object.
cache_perms to store permutations instead of storing them inside operation_table and 2 methods label2perm and perm2label
writing code for calculating the subgroup lattice of a group S_n and representing it in a nice way
hardcoding well-known groups , their isomorphic subgroup of S_n and using that before an exhaustive check in the previous point
making a routine that will check if a subgroup's operation table is equal to some particular subgroup of some S_n(since order of S_n is n! above n>5 there isn't much hope for this) and if so identify them as being isomorphic.
Stefan Petrea, <stefan.petrea at gmail.com>
<stefan.petrea at gmail.com>
To install CM::Permutation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CM::Permutation
CPAN shell
perl -MCPAN -e shell install CM::Permutation
For more information on module installation, please visit the detailed CPAN module installation guide.