Find subgroups of Sn - A program method
It is tedious to enumerate all of the subgroups of a symmetric group, such as \(S_4\). And I wrote a program to automate it.
This is one of the problem I met in the book Abstract Algebra - Theory and Applications, 2018, Thomas Judson:
CHAPTER 5. List all of the subgroups of \(S_4\).
Well, though this problem is quite easy (but heavily tedious), I would like to find a method that automate this task. Then I use the algorithm as follows:
- Get distinct \(\langle g\rangle\) for \(g\in S_n\).
- All of the subgroups contains several cyclic groups. Then I use \(O(2^m)\) (where \(m\) is the number of distinct cyclic subgroups of \(S_n\)) to enumerate which cyclic subgroups are necessarily inside a new group we want to generate.
- Then we need to combine these cyclic group to get the bigger group (and we require that it is as small as possible to avoid missing solutions). This could be done to use \(X=A_1\cup A_2\cup\cdots A_k\) at the beginning, and repeat \(X:=XX\) until it converges.
And the C++ code is as follows:
1 |
|
The output (needs ~30s) is
1 | Order 1: |