RandomElement - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


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

Calling Sequence

RandomElement( G )

RandomInvolution( G )

RandomPElement( p, G )

RandomPPrimeElement( p, G )

Parameters

G

-

a permutation group

p

-

a prime number

Description

• 

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.

Examples

withGroupTheory:

GGroupPerm1,2,Perm1,2,3,4,5

G1,2,34,5,1,2

(1)

RandomElementG

1,2

(2)

RandomElementG

1,3,2

(3)

GExceptionalGroupG2(3)

GG23

(4)

RandomInvolutionG:

gRandomInvolutionG:

g∈G

true

(5)

PermOrderg

2

(6)

GQuasicyclicGroup5,'form'=multiplicative

GC5∞

(7)

gRandomElementG

gⅇ40851989765625Iπ

(8)

g∈G

true

(9)

GDihedralGroup5

GD5

(10)

gRandomPElement5,G

g1,5,4,3,2

(11)

g∈G

true

(12)

PermOrderg

5

(13)

gRandomPPrimeElement5,G

g1,42,3

(14)

g∈G

true

(15)

PermOrderg

2

(16)

GDihedralGroup120:

{ to 100 do PermOrder( RandomPElement( 2, G ) ) end };

2,4,8

(17)

{ to 100 do PermOrder( RandomPPrimeElement( 2, G ) ) end };

3,5,15

(18)

{ to 100 do PermOrder( RandomInvolution( G ) ) end };

2

(19)

Compatibility

• 

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

GroupTheory[Group]