Skip to content

GroupOrder ​

∣G∣|G|: how many elements a group has. Works over every carrier this package knows — CyclicGroup, DihedralGroup, GroupDirectProduct, SymmetricGroup, AlternatingGroup and PermutationGroup.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageGroupOrder✓
GroupOrder(group)the number of elements of group
Oscarorder((group).G)
Typed signatures
TypePackageApplies
(expression<AlternatingGroup> | expression<CyclicGroup> | expression<DihedralGroup> | expression<GroupDirectProduct> | expression<PermutationGroup> | expression<SymmetricGroup> | indexed_collection<list<integer>>) -> integergroupalgebraalways

Domain: Permutations

Details
  • For a PermutationGroup, the order comes from a breadth-first closure over its generators, not a stored table
  • GroupOrder(SymmetricGroup(n)) is n!n!, and GroupOrder(AlternatingGroup(n)) is n!/2n!/2, without materialising the permutations

Examples

Basic #
live ↗
InGroupOrder(DihedralGroup(100))\mathrm{GroupOrder}(\mathrm{DihedralGroup}(100))Out200200

Order of a group generated by two permutations of 11 points

live ↗
InGroupOrder(PermutationGroup([Cycles([[2,10],[4,11],[5,7],[8,9]]),Cycles([[1,4,3,8],[2,5,6,7]])]))\mathrm{GroupOrder}(\mathrm{PermutationGroup}(\bigl\lbrack\mathrm{Cycles}(\bigl\lbrack\bigl\lbrack2, 10\bigr\rbrack, \bigl\lbrack4, 11\bigr\rbrack, \bigl\lbrack5, 7\bigr\rbrack, \bigl\lbrack8, 9\bigr\rbrack\bigr\rbrack), \mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 4, 3, 8\bigr\rbrack, \bigl\lbrack2, 5, 6, 7\bigr\rbrack\bigr\rbrack)\bigr\rbrack))Out2 8802\,880
Scope #
live ↗
InGroupOrder(PermutationGroup([Cycles([[1,9,6],[3,7]])]))\mathrm{GroupOrder}(\mathrm{PermutationGroup}(\bigl\lbrack\mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 9, 6\bigr\rbrack, \bigl\lbrack3, 7\bigr\rbrack\bigr\rbrack)\bigr\rbrack))Out66

4!4!, without unranking every permutation

live ↗
InGroupOrder(SymmetricGroup(4))\mathrm{GroupOrder}(\mathrm{SymmetricGroup}(4))Out2424
Properties #

No generators gives the trivial group of order 1

live ↗
InGroupOrder(PermutationGroup([]))\mathrm{GroupOrder}(\mathrm{PermutationGroup}(\bigl\lbrack\bigr\rbrack))Out11

The identity alone also generates a group of order 1

live ↗
InGroupOrder(PermutationGroup([Cycles([])]))\mathrm{GroupOrder}(\mathrm{PermutationGroup}(\bigl\lbrack\mathrm{Cycles}(\bigl\lbrack\bigr\rbrack)\bigr\rbrack))Out11
About
Examples6
Checked againstWolfram Language 6 agreeOscar 1 agree
CrosswalkWolfram LanguageOscar

Implementation

mappedoscarpackages/oracle/src/mappings.ts

See also: GroupElements, PermutationGroup, DihedralGroup, CyclicGroup, SymmetricGroup, AlternatingGroup