-
Notifications
You must be signed in to change notification settings - Fork 0
Some notes regarding Permutation Groups
A permutation can be represented as a function on a set of points and can also be represented in a cyclic notation. We normally do not write out cycles of length one (these are also called fixed points). So if [\pi = (0, 3 , 4, 1)(2)(5, 6)(7)] then the fixed points are 2 and 7 and we rewrite it as [\pi = (0, 3 , 4, 1)(5, 6)]
Multiplication of two permutations, say, (\alpha) and (\beta) are defined by function composition that is ((\alpha)(\beta))(x) = (\alpha)((\beta) x)
Thus we can see that composition of two permutations is again a permutation.
This is used to multiply permutations
-
for i (\Leftarrow) 0 to n-1
- do (\pi_{0})[i] (\Leftarrow) (\alpha)[(\beta)[i]]
-
for i (\Leftarrow) 0 to n-1
- do (\gamma)[i] (\Leftarrow) (\pi_{0})[i]
Note that we use an auxiliary permutation here to prevent bugs arising because of modifications to the arrays (\alpha) & (\beta)
This is used to compute the inversion of a permutation
-
for i (\Leftarrow) 0 to n-1
- do (\beta)[(\alpha)[i]] (\Leftarrow) i
This is used to convert a cycle to an array
CYCLE_TO_ARRAY (n, C)
-
for i (\Leftarrow) 0 to n-1
- do (A)[i]] (\Leftarrow) i
- i (\Leftarrow) i
- Set l to be the length of string C
-
while i < l:
- if C[i] = "(" then:
- i (\Leftarrow) i + 1
-
if C[i] (\in) {0, 1, ..., 9} then:
- Get x starting at i
- z (\Leftarrow) y
- Increment i to the position after x
- if C[i] = ","
- i (\Leftarrow) i + 1
-
if C[i] (\in) {0, 1, ..., 9} then:
- Get y starting at i
- A[z] (\leftarrow) y
- Increment i to the position after y
- x (\Leftarrow) y
- if C[i] = ")"
- A[x] (\Leftarrow) z
- i (\Leftarrow) i + 1
- if C[i] = "(" then:
Similarly, we can construct an algorithm to convert an array to a cycle.
If we need to make use of a permutation group then we need to be able to
- Efficiently store the group
- Allow testing of membership to be done very rapidly
- Enumerate all the elements of the group without repetition
Now, suppose we store a group as a list of lexicographically arranged permutations then we can observe a few things.
- The space complexity in the worst case is n!
- Testing membership using binary search is O((n^2) (\log(n)))
- Generating elements takes O(1) time
Alternatively, we can just store the generators. Enumeration of elements will then involve products in the generators of length one, length two and so on. We cross out duplicates as and when we need to.
Algorithm to generate a group (G ) from its generators (\tau)
- (G ) (\Leftarrow) (\phi)
- New (\Leftarrow) {I}
- while New != (\phi)
- (G ) (\Leftarrow) (G ) (\cup) New
- Last (\Leftarrow) New
- New (\Leftarrow) (\phi)
-
for each g (\in) (\tau)
-
for each h (\in) Last
- MULT (n, g, h, f)
- if f (\notin) (G ) then New (\Leftarrow) {f} (\cup) New
-
for each h (\in) Last
This algorithm is not very efficient though for generating members, although it is very useful for storing the members of a group.
Let (G ) be a permutation group on (\chi) = {0, 1, 2, .., n-1} and set (G_{i}) = {g (\in) (G_{1}) : g(i) = i} = {I} for i from 0 to n - 1. Then we can show that they are all subgroups. Define orb(0) = {g(0):g (\in) (G)}, which is the orbit of 0 under G. Then |orb(0)| = (n_{0}) where 0 < (n_{0}) < n.
Write orb(0) = { (x_{0,1}) , (x_{0,2}) .., (x_{0,n_{0}}) } and for some i, choose some (h_{0,i}) (\in) (G) such that (h_{0,i}) = (x_{0,i}).
We now set (U_{0}) = {(h_{0,1}), (h_{0,2}) .., (h_{0 ,n_{0}}) }
Theorem: Let (G), (U_{0}) and (G_{0}) be defined as above. Then (U_{0}) is a left transversal of (G_{0}) in (G). A left transversal is a left coset representation of a group.
The data structure G = [(U_{1}), (U_{2}) .., (U_{n_{0}})] is called the Schreier-Sims representation of the group G. So the problem remains to construct a Schreier-Sims representation of the group G as once this representation is at hand then a simple backtracking procedure can be used to generate all the elements of the group. This can be done in (O(n^{2})) time by the following algorithm.
List the elements of the group without repetition
-
USE(g) is a higher order function that specifies what needs to be done with g. In python we can represent it using the lambda keyword
-
global DoneEarly
-
def proc RUN_BACKTRACK(n, l, G, g, USE())
- if DoneEarly then return
- if l = n
- then USE(n, g)
- else
-
for each h (\in) (U_{l})
- MULT(n, g, h, (f_{l})
- RUN_BACKTRACK(n, l + 1, G, (f_{l}), USE())
-
for each h (\in) (U_{l})
-
main
- RUN_BACKTRACK(0, G, I, USE())
Testing for representation is also simple once we have the transversals.
Test if a permutation g is in a group, given the transversals of the group.
-
for i (\Leftarrow) 0 to n - 1
- x (\Leftarrow) g[i]
- if there exists an h (\in) (U_{i}) such that h(i) = x
- INV(n, h, (\pi_{2}))
- MULT(n, (\pi_{2}), g, (\pi_{3}))
- for j (\Leftarrow) 0 to n-1
- do g[j] (\Leftarrow) (\pi_{3})[j] 3 else return i 2 return n
If i < n is returned then the following condition is observed:
((f^{-1})(g))(x) = x for all x < i and ((f^{-1} g))(i) = j but there is no h (\in) (U_{i}) such that h(i) = j
Now we just need to specify the algorithm required to generate the all the transversals.
Algorithm for generating the Schreier Sims representation of a group
- def procedure ENTER(n, g, G = [(U_{1}), (U_{2}) .., (U_{n-1})])
- i (\Leftarrow) TEST(n, g, G = [(U_{1}), (U_{2}) .., (U_{n-1}) ])
- if i = n then return
- else (U_{i}) (\Leftarrow) (U_{1}) (\cup) {g}
-
for j (\Leftarrow) i to n - 1
-
for each h (\in) (U_{j})
- MULT(n, h, g, f)
- ENTER(n, f, G = [(U_{1}), (U_{2}) .., (U_{n-1})])
-
for each h (\in) (U_{j})
-
for i (\Leftarrow) 0 to n - 1
- do (U_{i}) (\Leftarrow) {I}
-
for each (\alpha) (\in) (\tau)
- do ENTER(n, (\alpha), G = [(U_{1}), (U_{2}) .., (U_{n-1})])
- return G = [(U_{1}), (U_{2}) .., (U_{n-1})]
Computing the order of the group is extremely straightforward once we have the Schreier Sims representation. All we need to do is to multiply the orders of all the transversals to get the order of the group.
Algorithms for computing stabilizers and orbits will be discussed later.