This is a class for permutation group.
Create element with 'cyclic' way.
(考1,考2,...,考k)
(This is one-to-one mapping,考1->考2,考2->考3,..,考(k-1)->考k,考k->考1)
See Permute.
Initialize
Initialize with dimension and list of 'cyclic' tuple.>>>ep=ExPermute(dimension,[cyclic tuple,..])
Example
>>>a=ExPermute(5,[(1,2,3),(4,5)])
(This means multiplication of permutation, [2,3,1,4,5]*[1,2,3,5,4].)
== | Equality |
* | Multiplication |
/ | Division |
** | Powering |
Return inverse(-1 powering).
>>>a.inverse() [(4,5),(3,2,1)](5)
Return identity element(unit) of permutation group.
>>>a.identity() [](5)
Return group order(Cardinality) of permutation group.
>>>a.grouporder() 120
Return order.
GroupElement method faster with large dimension.
>>>a.order() 6
Return the Permute element.
>>>a.ToNormal() [2,3,1,5,4]
Return the more simple cyclic element.
>>>a*a [(1,2,3),(4,5),(1,2,3),(4,5)](5) >>>(a*a).simplify() [(1,3,2)](5)