GroupTheory
RandomElement
produce a random element of a group
RandomInvolution
produce a random involution of a group
RandomPElement
produce a random p-element of a group
RandomPPrimeElement
produce a random element of a group with order relatively prime to p
Calling Sequence
Parameters
Description
Examples
Compatibility
RandomElement( G )
RandomInvolution( G )
RandomPElement( p, G )
RandomPPrimeElement( p, G )
G
-
a permutation group
p
a prime number
The RandomElement( G ) command returns a randomly selected element of the group G.
The RandomInvolution( G ) command returns a randomly selected involution (element of order 2) of the group G. An exception is raised if G has odd order (as in that case, G contains no involutions).
For a prime number p, the RandomPElement( p, G ) command returns a random element of the group G with order equal to a power of p. An exception is raised in case p does not divide the order of G.
For a prime number p, the RandomPPrimeElement( p, G ) command returns a random element of the group G with order relatively prime to p. An exception is raised if G is a p-group.
with⁡GroupTheory:
G≔Group⁡Perm⁡1,2,Perm⁡1,2,3,4,5
G≔1,2,1,2,34,5
RandomElement⁡G
1,24,5
1,3,2
G≔ExceptionalGroup⁡G2(3)
G≔G23
RandomInvolution⁡G
1,1842,3253,1444,1275,2076,1217,1938,1069,23810,29411,1312,32614,19715,30317,26718,6720,10721,21122,21923,31824,16125,20926,12627,33328,25629,29830,4431,31632,19433,32434,25035,17236,7837,30438,32139,8240,11741,9142,27643,22445,4746,13548,28049,14350,34451,16852,9653,16654,16555,27756,23057,29258,33859,31360,33461,15862,23763,10064,8965,26266,19568,31569,7170,23372,26373,16074,13175,27977,15479,15181,12483,18184,26886,28287,14188,22990,19192,26093,10894,31095,15297,11898,25299,271101,192102,287103,203104,210105,272109,183110,347111,213112,142113,322114,115116,317119,284120,137122,288123,342125,218128,259129,157130,264132,349133,200134,198136,305139,330140,182145,270146,255147,240148,225149,351153,247155,169156,244159,306162,319163,320164,340167,314170,185171,220173,297174,269175,296177,302178,215179,285180,226186,335187,301188,234189,227190,293199,266201,241202,261204,254205,327206,251208,323212,236216,336217,308221,299222,295223,265228,311232,248235,291242,246243,286245,312249,253257,290258,307273,309274,283275,281278,300328,350329,346332,348337,341343,345
g≔RandomInvolution⁡G
g≔2,2303,2584,1355,1336,2997,1178,1459,11210,1611,8512,28113,9015,17018,21119,22320,26721,7522,8723,21824,2625,24427,4429,19130,7031,9732,30233,30834,31635,27836,27637,34838,13139,6140,27141,7342,4743,10645,22546,30648,34049,26450,8451,28852,18053,29454,18655,26556,31757,19958,33459,30360,27062,11963,23464,19765,31266,18867,12568,11869,30971,21272,9574,17776,23577,34178,15879,20080,21081,30582,12283,13086,34688,33289,19391,16792,24093,22094,32996,15698,31999,134100,178101,304102,216103,307104,260105,142107,321108,248109,337110,147111,330113,192114,165115,139116,339120,279121,161123,326124,238126,162127,228128,336129,213136,345138,203140,245141,349143,163144,160146,268148,296149,189150,266151,313152,324153,215154,196155,295157,289159,184164,256166,243168,227169,342173,269174,241175,323176,198179,284181,338182,297183,285185,242187,239190,262194,231195,257201,247202,221204,282205,351206,229207,343208,327214,318217,253219,274222,261224,254226,292232,325233,236246,272249,301250,251252,350259,315275,328277,283280,286287,322290,293291,311298,344300,347310,320331,333
ginG
true
PermOrder⁡g
2
G≔QuasicyclicGroup⁡5,form=multiplicative
G≔C5∞
g≔RandomElement⁡G
g≔ⅇ2140214⁢I9765625⁢π
G≔DihedralGroup⁡5
G≔D5
g≔RandomPElement⁡5,G
g≔1,3,5,2,4
5
g≔RandomPPrimeElement⁡5,G
g≔1,23,5
G≔DihedralGroup⁡120:
{ to 100 do PermOrder( RandomPElement( 2, G ) ) end };
2,4,8
{ to 100 do PermOrder( RandomPPrimeElement( 2, G ) ) end };
3,5,15
{ to 100 do PermOrder( RandomInvolution( G ) ) end };
The GroupTheory[RandomElement] command was introduced in Maple 17.
For more information on Maple 17 changes, see Updates in Maple 17.
The GroupTheory[RandomInvolution], GroupTheory[RandomPElement] and GroupTheory[RandomPPrimeElement] commands were introduced in Maple 2019.
For more information on Maple 2019 changes, see Updates in Maple 2019.
See Also
GroupTheory[Group]
Download Help Document