Differences

This shows you the differences between two versions of the page.

Link to this comparison view

documentation:ref:permutationgroup [2015/11/21 12:33]
documentation:ref:permutationgroup [2015/11/21 12:33] (current)
Line 1: Line 1:
 +====== PermutationGroup ======
 +----
 +=====Basics=====
 +
 +  * ''​PermutationGroup''​ represents a group of permutations. ​
 +  ​
 +  * Redberry can handle permutation groups ​ with degree in the range of a few thousand, hence working with groups with more than $10^{1000}$ ​ elements.
 +
 +  * ''​PermutationGroup''​ can be specified by its generating set:
 +<sxh groovy; gutter: false>
 +def gen1 = [[1, 4, 5]].p
 +def gen2 = [[2, 3]].p
 +def group = Group(gen1, gen2)
 +//print all group elements
 +group.each { println it }
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > +[]
 +   > +[[2, 3]]
 +   > +[[1, 5, 4]]
 +   > +[[1, 5, 4], [2, 3]]
 +   > +[[1, 4, 5]]
 +   > +[[1, 4, 5], [2, 3]]
 +</​sxh>​
 +
 +  * One can construct a special kinds of ''​PermutationGroup'':​ symmetric or alternating by using ''​SymmetricGroup(degree)''​ and  ''​AlternatingGroup(degree)''​ respectively:​
 +<sxh groovy; gutter: false>
 +def sym69 = SymmetricGroup(69)
 +println sym69.order()
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > 17112245242814131137246833888127283909227054489352036939364804092325
 +        7279754140647424000000000000000
 +</​sxh>​
 +<sxh groovy; gutter: false>
 +def alt54 = AlternatingGroup(54)
 +println alt54.order()
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > 115421848669620690236046371341513790541639282285903970566144000000000000
 +</​sxh>​
 +
 +
 +
 +  * ''​PermutationGroup''​ provides a number of common methods for working wih permutation groups: ​ membership testing, coset enumeration,​ searching for centralizers,​ stabilizers,​ etc. One can find many examples in below subsections.
 +=====Examples=====
 +Let us consider some common features of ''​PermutationGroup''​ by a particular examples. Consider the following permutation group:
 +<sxh groovy; gutter: true>
 +//first generator in cycle notation
 +def perm1 = [[1,​28,​5,​3,​13,​25,​8,​4,​17,​11,​29,​7,​2,​21,​23,​10,​6],​
 +              [9,​16,​22,​30,​18,​15,​20,​19,​14]].p
 +//second generator in cycle notation
 +def perm2 = [[1, 4, 27], [2, 5, 3]].p
 +//create group 
 +def group = Group(perm1,​ perm2)
 +</​sxh>​
 +----
 +  * Print group order (i.e. number of all elements):
 +<sxh groovy; gutter: true; first-line: 8>
 +println group.order()
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > 28810681675776000
 +</​sxh>​
 +----
 +  * Get orbit of some point:
 +<sxh groovy; gutter: true; first-line: 9>
 +println group.orbit(20)
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > [9, 16, 22, 30, 18, 15, 20, 19, 14]
 +</​sxh>​
 +----
 +  * Get a pointwise stabilizer (i.e. subgroup that fixes specified points)
 +<sxh groovy; gutter: true; first-line: 10>
 +def pStabilizer =  group.pointwiseStabilizer(3,​ 25, 27)
 +println pStabilizer
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > Group( +[[9, 16, 22, 30, 18, 15, 20, 19, 14]],
 +            +[[1, 17, 11, 21, 23, 28, 5, 29, 7, 2, 13, 8, 4, 10, 6]],
 +            +[[1, 29, 2, 17, 7, 6, 23, 8, 21, 13, 11], [4, 10, 28]])
 +</​sxh>​
 +<sxh groovy; gutter: true; first-line: 12>
 +println pStabilizer.order()
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > 5884534656000
 +</​sxh>​
 +----
 +  * Check membership (i.e. whether some permutation belongs to ''​PermutationGroup''​)
 +<sxh groovy; gutter: true; first-line: 13>
 +def p = [[1, 28, 2, 8, 27, 10, 11], [21, 29, 23]].p
 +println group.membershipTest(p)
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > true
 +</​sxh>​
 +<sxh groovy; gutter: true; first-line: 15>
 +def n = [[7, 19, 5, 17, 3, 4, 21, 25]].p
 +println group.membershipTest(n)
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > false
 +</​sxh>​
 +----
 +  * Calculate a setwise stabiliser (i.e. a subgroup that fixes a set as a whole):
 +<sxh groovy; gutter: true; first-line: 17>
 +def sStabilizer = group.setwiseStabilizer(3,​ 27, 25)
 +println sStabilizer ​
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > Group( +[[9, 16, 22, 30, 18, 15, 20, 19, 14]],
 +               +[[1, 17, 11, 21, 23, 28, 5, 29, 7, 2, 13, 8, 4, 10, 6]],
 +               +[[1, 29, 2, 17, 7, 6, 23, 8, 21, 13, 11], [4, 10, 28]],
 +               +[[1, 4], [25, 27]], +[[1, 4], [3, 25]] )
 +</​sxh>​
 +<sxh groovy; gutter: true; first-line: 19>
 +println sStabilizer.order()
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > 35307207936000
 +</​sxh>​
 +----
 +  * Calculate derived subgroup (i.e. a commutator subgroup of group with itself):
 +<sxh groovy; gutter: true; first-line: 20>
 +def dSubgroup = group.derivedSubgroup()
 +println dSubgroup.order()
 + </​sxh>​
 +<sxh plain; gutter: false>
 +   > 3201186852864000
 +</​sxh>​
 +----
 +  * Define some other group and check whether it is a subgroup of group:
 +<sxh groovy; gutter: true; first-line: 22>
 +def oth = Group([[1, 17, 12, 19], [23, 25]].p, [[4, 14, 26]].p)
 +println group.containsSubgroup(oth)
 + </​sxh>​
 +<sxh plain; gutter: false>
 +   > false
 +</​sxh>​
 +----
 +  * Calculate union of groups:
 +<sxh groovy; gutter: true; first-line: 24>
 +def union = group.union(oth)
 +assert union.containsSubgroup(group)
 +assert union.containsSubgroup(oth)
 +
 +println union.order()
 + </​sxh>​
 +<sxh plain; gutter: false>
 +   > 4420880996869850977271808000000
 +</​sxh>​
 +----
 +  * Calculate intersection of groups:
 +<sxh groovy; gutter: true; first-line: 29>
 +def intersection = union.intersection(group)
 +assert intersection == group
 + </​sxh>​
 +----
 +  * Calculate coset representatives:​
 +<sxh groovy; gutter: true; first-line: 31>
 +println sStabilizer.leftCosetRepresentatives(pStabilizer)
 + </​sxh>​
 +<sxh plain; gutter: false>
 +   > [+[],
 +          +[[1, 4], [25, 27]],
 +          +[[1, 4], [3, 25]],
 +          +[[3, 25, 27]],
 +          +[[3, 27, 25]],
 +          +[[1, 4], [3, 27]]]
 +</​sxh>​
 +----
 +  * Calculate centralizer of subgroup:
 +<sxh groovy; gutter: true; first-line: 32>
 +println group.centralizerOf(sStabilizer)
 + </​sxh>​
 +<sxh plain; gutter: false>
 +   > Group( +[[9, 14, 19, 20, 15, 18, 30, 22, 16]] )
 +</​sxh>​
 +
 +=====Features=====
 +====General features====
 +The following table lists relevant features of ''​PermutationGroup'':​
 +<​html>​
 +<table style="​width:​800px;"​ cellpadding="​10">​
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​.center()</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​center of group.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​.centralizerOf(perm)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​centralizer of permutation <​code>​perm</​code>​. </​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​.centralizerOf(group)</​code>​.</​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​centralizer of subgroup <​code>​group</​code>​. </​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​.commutator(oth)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​commutator with <​code>​oth</​code>​ group.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​.conjugate(perm)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​conjugation of group with specified permutation <​code>​perm</​code>​( i.e.  $p^{-1} G p$, where $p$ is <​code>​perm</​code>​ and $G$ is a group).</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​.containsSubgroup(oth)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​returns whether group contains subgroup <​code>​oth</​code>​.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​.degree()</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​natural degree of group, i.e. largest moved point plus one.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​.derivedSubgroup()</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​derived subgroup, i.e. commutator subgroup of group with itself.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. directProduct(oth)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​direct product of group <​code>​oth</​code>​ group. This product is organized as follows: the initial segment of each permutation is equal to permutation taken from group, while the rest is taken from permutation of <​code>​oth</​code>​.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. equals(oth)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​returns whether group is equal to <​code>​oth</​code>​ in mathematical sense.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px; border: 1px solid gray;"><​code>​.generators()</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px; border: 1px solid gray;">​a list of group generators.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. base</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​base of group.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. getBSGS()</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​low level representation of base and strong generating set.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. intersection(oth)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​intersection of group with <​code>​oth</​code>​.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. isAbelian()</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​returns whether group is abelian.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. isAlternating()</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​returns whether group is alternating.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. isRegular()</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​returns whether group is regular (i.e. transitive and its order equals to degree).</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. isSymmetric()</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​returns whether group is symmetric.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. isTransitive()</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​returns whether group is transitive.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. isTransitive(from,​ to)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​returns whether group acts transitively on the the range <​code>​from</​code>​ (inclusive) to <​code>​to</​code>​ (exclusive).</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. isTrivial()</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​returns whether group is trivial (contains only identity element).</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. leftCosetRepresentatives(subgroup)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​array of left coset representatives of a <​code>​subgroup</​code>​.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. leftTransversalOf(subgroup,​ perm)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​ a unique left coset representative of <​code>​perm</​code>​.</​td> ​
 +</tr>
 +
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. mapping(from,​ to)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​ iterator over permutations that maps <​code>​from</​code>​ points on <​code>​to</​code>​.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. membershipTest(perm)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​ returns whether <​code>​perm<​code>​ belongs to group.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. normalClosureOf(subgroup)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​ normal closure of specified <​code>​subgroup</​code>​.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. orbit(points)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​ orbit of <​code>​points</​code>​.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​.order()</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​group order (i.e. number of all elements).</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. pointwiseStabilizer(set)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​pointwise stabilizer of specified <​code>​set</​code>​ of points.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. randomElement()</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​uniformly distributed random element from group.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. rightCosetRepresentatives(subgroup)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​array of right coset representatives of a <​code>​subgroup</​code>​.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. setwiseStabilizer(set)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​pointwise stabilizer of specified <​code>​set</​code>​ of points.</​td> ​
 +</tr>
 +
 +<tr>
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;"><​code>​. union(oth)</​code></​td>​
 +  <td valign="​top"​ style="​padding:​ 15px;​margin-top:​ 35px;​border:​ 1px solid gray;">​union of group and specified group (or set of generators),​ i.e. group which is generated by union of generators of group and <​code>​oth</​code>​.</​td> ​
 +</tr>
 +
 +</​table>​
 +</​html>​
 +
 +====Orbits====
 +One can take an orbit of some point using method ''​.orbit(point)'':​
 +<sxh groovy; gutter: true>
 +def perm1 = [[0, 7, 4, 2, 10], [8, 5, 9]].p
 +def perm2 = [[0, 3, 6], [1, 4, 2]].p
 +def group = Group(perm1,​ perm2)
 +
 +println group.orbit(2)
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > [0, 7, 3, 4, 6, 2, 10, 1]
 +</​sxh>​
 +<sxh groovy; gutter: true; first-line: 6>
 +println group.orbit(5)
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > [5, 9, 8]
 +</​sxh>​
 +In order to take a list of all orbits one can do
 +<sxh groovy; gutter: true; first-line: 7>
 +def orbits = group.orbits()
 +println orbits
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > [[0, 7, 3, 4, 6, 2, 10, 1], [5, 9, 8]]
 +</​sxh>​
 +Given a list of all orbits, one can take an orbit of specified point by using array ''​positionsInOrbits'':​ an //i//-th element in this array is an index of orbit of //i//-th point in array of ''​orbits'':​
 +<sxh groovy; gutter: true; first-line: 9>
 +def poss = group.positionsInOrbits
 +println poss
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > [0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0]
 +</​sxh>​
 +<sxh groovy; gutter: true; first-line: 11>
 +//orbit of 2
 +println orbits[poss[2]]
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > [0, 7, 3, 4, 6, 2, 10, 1]
 +</​sxh>​
 +<sxh groovy; gutter: true; first-line: 13>
 +//orbit of 5
 +println orbits[poss[5]]
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > [5, 9, 8]
 +</​sxh>​
 +<sxh groovy; gutter: true; first-line: 15>
 +//check
 +for (int i = 0; i < group.degree();​ ++i)
 +    assert group.orbit(i) == orbits[poss[i]]
 +</​sxh>​
 +
 +
 +=====Details=====
 +The implementation of most ''​PermutationGroup''​ methods relies on base and strong generating set (BSGS). The algorithms such as used in calculation of groups intersections,​ centralizers ​ etc. uses backtracking techniques.
 +
 +
 +Consider for example the stabilizers chain of Rubik group:
 +<sxh groovy; gutter: true>
 +def rot1 = [[0, 2, 7, 5], [1, 4, 6, 3],
 +            [8, 47, 14, 11], [9, 46, 15, 12],
 +            [10, 45, 16, 13]].p
 +def rot2 = [[5, 14, 34, 25], [6, 21, 33, 18],
 +            [7, 29, 32, 10], [11, 13, 28, 26],
 +            [12, 20, 27, 19]].p
 +def rot3 = [[0, 11, 32, 40], [3, 19, 35, 43],
 +            [5, 26, 37, 45], [8, 10, 25, 23],
 +            [9, 18, 24, 17]].p
 +def rot4 = [[0, 23, 39, 16], [1, 17, 38, 22],
 +            [2, 8, 37, 31], [40, 42, 47, 45],
 +            [41, 44, 46, 43]].p
 +def rot5 = [[2, 42, 34, 13], [4, 44, 36, 20],
 +            [7, 47, 39, 28], [14, 16, 31, 29],
 +            [15, 22, 30, 21]].p
 +def rot6 = [[23, 26, 29, 42], [24, 27, 30, 41],
 +            [25, 28, 31, 40], [32, 34, 39, 37],
 +            [33, 36, 38, 35]].p
 +
 +def RubikGroup = Group(rot1, rot2, rot3, rot4, rot5, rot6)
 +//order of Rubik group
 +println RubikGroup.order()
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > 43252003274489856000
 +</​sxh>​
 +Get base of group:
 +<sxh groovy; gutter: true; first-line: 23>
 +//get base of group
 +def base = RubikGroup.base
 +println base
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26,​27,​28,​29,​32,​33,​34,​2,​23,​22,​24,​4,​
 +          30,17,3,1]
 +</​sxh>​
 +Let's print order of each stabilizer in stabilizers chain:
 +<sxh groovy; gutter: true; first-line: 25>
 +//print stabilizers chain
 +for (int i = 0; i < base.length;​ ++i) {
 +    //partial base
 +    def pBase = base[0..i] as int[]
 +    print('​stab of ' + pBase + ' -> ')
 +    print(RubikGroup.pointwiseStabilizer(pBase).order())
 +    println ''​
 +}
 +</​sxh>​
 +<sxh plain; gutter: false>
 +   > stab of [0] -> 1802166803103744000
 +   > stab of [0,5] -> 85817466814464000
 +   > stab of [0,5,6] -> 3575727783936000
 +   > stab of [0,5,6,7] -> 198651543552000
 +   > stab of [0,​5,​6,​7,​10] -> 198651543552000
 +   > stab of [0,​5,​6,​7,​10,​11] -> 198651543552000
 +   > stab of [0,​5,​6,​7,​10,​11,​12] -> 198651543552000
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13] -> 198651543552000
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14] -> 198651543552000
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18] -> 9029615616000
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19] -> 9029615616000
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20] -> 451480780800
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21] -> 451480780800
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25] -> 30098718720
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26] -> 30098718720
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26,​27] -> 1672151040
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26,​27,​28] -> 139345920
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26,​27,​28,​29] -> 139345920
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26,​27,​28,​29,​32] -> 139345920
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26,​27,​28,​29,​32,​33] ->  139345920
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26,​27,​28,​29,​32,​33,​34] -> 139345920
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26,​27,​28,​29,​32,​33,​34,​2] -> 15482880
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26,​27,​28,​29,​32,​33,​34,​2,​23] -> 2580480
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26,​27,​28,​29,​32,​33,​34,​2,​23,​22] -> 161280
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26,​27,​28,​29,​32,​33,​34,​2,​23,​22,​24] -> 11520
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26,​27,​28,​29,​32,​33,​34,​2,​23,​22,​24,​4] -> 960
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26,​27,​28,​29,​32,​33,​34,​2,​23,​22,​24,​4,​30] -> 96
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26,​27,​28,​29,​32,​33,​34,​2,​23,​22,​24,​4,​30,​17] -> 12
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26,​27,​28,​29,​32,​33,​34,​2,​23,​22,​24,​4,​30,​17,​3] -> 2
 +   > stab of [0,​5,​6,​7,​10,​11,​12,​13,​14,​18,​19,​20,​21,​25,​26,​27,​28,​29,​32,​33,​34,​2,​23,​22,​24,​4,​30,​17,​3,​1] -> 1
 +</​sxh>​
 +
 + The algorithms used in Redberry are described in:
 +
 +  * Derek F. Holt, Bettina Eick, Eamonn A. O'​Brien,​ //Handbook Of Computational Group Theory//, Chapman and Hall/CRC, 2005 
 +
 +The details on the internal implementation can be found in API.
 +
 +=====See also=====
 +  * Related guides: [[documentation:​guide:​permutations_and_permutation_groups]]
 +  * Related reference material: [[documentation:​ref:​permutation]]
 +  * JavaDocs:
 +    * Overview: [[http://​api.redberry.cc/​redberry/​1.1.9/​java-api/​cc/​redberry/​core/​groups/​permutations/​package-summary.html| Permutations package]]
 +    * ''​PermutationGroup'':​ [[http://​api.redberry.cc/​redberry/​1.1.9/​java-api/​cc/​redberry/​core/​groups/​permutations/​PermutationGroup.html| PermutationGroup]]
 +    * Schreier-Sims and related algorithms: [[http://​api.redberry.cc/​redberry/​1.1.9/​java-api/​cc/​redberry/​core/​groups/​permutations/​AlgorithmsBase.html| AlgorithmsBase]]
 +     * Backtracking algorithms: [[http://​api.redberry.cc/​redberry/​1.1.9/​java-api/​cc/​redberry/​core/​groups/​permutations/​AlgorithmsBacktrack.html| AlgorithmsBacktrack]]
 +
 +  * Source code:
 +    * ''​PermutationGroup'':​ [[https://​bitbucket.org/​redberry/​redberry/​src/​tip/​core/​src/​main/​java/​cc/​redberry/​core/​groups/​permutations/​PermutationGroup.java| PermutationGroup.java]]
 +    * Schreier-Sims and related algorithms: [[https://​bitbucket.org/​redberry/​redberry/​src/​tip/​core/​src/​main/​java/​cc/​redberry/​core/​groups/​permutations/​AlgorithmsBase.java| AlgorithmsBase.java]]
 +     * Backtracking algorithms: [[https://​bitbucket.org/​redberry/​redberry/​src/​tip/​core/​src/​main/​java/​cc/​redberry/​core/​groups/​permutations/​AlgorithmsBacktrack.java| AlgorithmsBacktrack.java]]