PermutationGroup[{perm1,…,permn}]
represents the group generated by multiplication of the permutations perm1,…,permn.
PermutationGroup
PermutationGroup[{perm1,…,permn}]
represents the group generated by multiplication of the permutations perm1,…,permn.
Details
- The generating permutations permi must be given in disjoint cyclic form, with head Cycles.
- Properties of a permutation group are typically computed by constructing a strong generating set representation of the group using the Schreier–Sims algorithm.
Examples
open all close allBasic Examples (1)
Scope (3)
An empty list of generators represents the identity (or trivial, or neutral) group:
GroupElements[PermutationGroup[{}]]Find the order of a group generated by two permutations:
GroupOrder[PermutationGroup[{Cycles[{{1, 18, 25, 8, 11, 33, 45, 34, 19, 39, 4, 35, 46, 37, 10, 48, 7, 31, 6, 42, 36, 15, 29}, {2, 21, 14, 38, 26, 24, 41, 22, 12, 49}, {3, 28, 20, 50, 43, 23, 9, 5, 16, 44, 30, 27, 17}, {13, 40, 32, 47}}], Cycles[{{1, 5, 4, 9, 10, 6}, {2, 7, 8}}]}]]Test the equality of permutation groups with the same support but possibly generated by different permutations:
PermutationGroup[{Cycles[{{1, 4}}], Cycles[{{1, 2, 3, 4, 5}}]}] == PermutationGroup[{Cycles[{{1, 2}}], Cycles[{{2, 3}}], Cycles[{{3, 4}}], Cycles[{{4, 5}}]}]They are different as Wolfram Language expressions:
PermutationGroup[{Cycles[{{1, 4}}], Cycles[{{1, 2, 3, 4, 5}}]}] === PermutationGroup[{Cycles[{{1, 2}}], Cycles[{{2, 3}}], Cycles[{{3, 4}}], Cycles[{{4, 5}}]}]Applications (2)
This is the group of all rotations and reflections of a regular
-sided polygon, the dihedral
group, for
. It can be generated by a rotation of an angle
and a reflection along an axis through a vertex:
dihedral8 = GroupElements[PermutationGroup[{Cycles[{{1, 2, 3, 4, 5, 6, 7, 8}}], Cycles[{{1, 8}, {2, 7}, {3, 6}, {4, 5}}]}]]Construct the octagon corresponding to each group element:
octagon[perm_] := With[{list = PermutationList[perm, 8]}, Graph[Thread[list -> RotateLeft[list]], VertexLabels -> Placed["Name", Center], VertexSize -> 0.4, ImageSize -> 100]]This is the original polygon and its seven rotations. Numbers increase counterclockwise:
octagon /@ dihedral8[[{1, 4, 6, 8, 10, 12, 14, 15}]]This is the polygon reflected along the bisection 1–5 and its seven rotations. Numbers increase clockwise:
octagon /@ dihedral8[[{2, 3, 5, 7, 9, 11, 13, 16}]]The group of automorphisms of a graph is represented using PermutationGroup:
GraphData[{"Barbell", 10}]GraphAutomorphismGroup[%]This is the number of automorphisms of the graph:
GroupOrder[%]Properties & Relations (3)
Explicit representation of a named group:
PermutationGroup[GroupGenerators[AlternatingGroup[9]]]Generate the symmetric group of degree
using
transpositions:
PermutationGroup[Table[Cycles[{{1, i}}], {i, 2, 15}]] == SymmetricGroup[15]Generate the alternating group of degree
using
generators:
PermutationGroup[Table[Cycles[{{1, 2, i}}], {i, 3, 15}]] == AlternatingGroup[15]Neat Examples (1)
The moves of a Rubik's cube form a group. Number the moving facelets from 1 to 48:
These are the six basic rotations:
rot1 = Cycles[{{1, 3, 8, 6}, {2, 5, 7, 4}, {9, 48, 15, 12}, {10, 47, 16, 13}, {11, 46, 17, 14}}];
rot2 = Cycles[{{6, 15, 35, 26}, {7, 22, 34, 19}, {8, 30, 33, 11}, {12, 14, 29, 27}, {13, 21, 28, 20}}];
rot3 = Cycles[{{1, 12, 33, 41}, {4, 20, 36, 44}, {6, 27, 38, 46}, {9, 11, 26, 24}, {10, 19, 25, 18}}];
rot4 = Cycles[{{1, 24, 40, 17}, {2, 18, 39, 23}, {3, 9, 38, 32}, {41, 43, 48, 46}, {42, 45, 47, 44}}];
rot5 = Cycles[{{3, 43, 35, 14}, {5, 45, 37, 21}, {8, 48, 40, 29}, {15, 17, 32, 30}, {16, 23, 31, 22}}];
rot6 = Cycles[{{24, 27, 30, 43}, {25, 28, 31, 42}, {26, 29, 32, 41}, {33, 35, 40, 38}, {34, 37, 39, 36}}];
RubikGroup = PermutationGroup[{rot1, rot2, rot3, rot4, rot5, rot6}];GroupOrder[RubikGroup]Swapping two neighbor edge facelets is not allowed:
GroupElementQ[RubikGroup, Cycles[{{2, 47}}]]Simultaneous swaps of two edge pairs is allowed:
GroupElementQ[RubikGroup, Cycles[{{2, 47}, {31, 37}}]]This is the superflip move, which switches all edge pairs simultaneously without changing any corner:
superflip = Cycles[{{2, 47}, {4, 10}, {7, 13}, {5, 16}, {20, 19}, {21, 22}, {28, 34}, {18, 44}, {25, 36}, {45, 23}, {42, 39}, {31, 37}}];GroupElementQ[RubikGroup, superflip]Edges and corners cannot be mixed (as the action of the group on the cube is not transitive), but any two corners or any two edges can be swapped:
GroupOrbits[RubikGroup]See Also
Cycles GroupOrder GroupElements GroupElementQ GroupStabilizerChain GraphAutomorphismGroup
Function Repository: SubsetGroup StauduharGaloisGroup FindGroupIsomorphism
Tech Notes
Related Guides
History
Text
Wolfram Research (2010), PermutationGroup, Wolfram Language function, https://reference.wolfram.com/language/ref/PermutationGroup.html.
CMS
Wolfram Language. 2010. "PermutationGroup." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PermutationGroup.html.
APA
Wolfram Language. (2010). PermutationGroup. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PermutationGroup.html
BibTeX
@misc{reference.wolfram_2026_permutationgroup, author="Wolfram Research", title="{PermutationGroup}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/PermutationGroup.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_permutationgroup, organization={Wolfram Research}, title={PermutationGroup}, year={2010}, url={https://reference.wolfram.com/language/ref/PermutationGroup.html}, note=[Accessed: 12-June-2026]}