Elements#
The symmetric group boasts a multitude of elements, precisely \(n!\), where \(n\) is the number of elements on which the group operates. These elements can be represented in various forms, such as permutations, cycles, or cycle decompositions.
Symmetria furnishes three distinct classes – Permutation, Cycle, and CycleDecomposition –
to represent an element within the symmetric group in different way. Up to you to pick the representation which
fit at best your needs.
Note
The class Permutation is, in some sense, the basic class to represent a permutation. It is raccomanded to work
with it if you don’t have specific needs to have cycles or cycles decomposition of permutations.
The following table summarize the functionalities provided by each class.
Here, P denotes the class Permutation, C the class Cycle, and CD the class CycleDecomposition.
Feature |
Description |
P |
C |
CD |
|---|---|---|---|---|
|
Call the permutation on an object |
✅ |
✅ |
✅ |
|
Multiplication (composition) between permutations |
✅ |
❌ |
✅ |
|
Power of a permutation |
✅ |
✅ |
✅ |
|
Return the positions of the permutation ascents |
✅ |
❌ |
✅ |
|
Cycle decomposition of the permutation |
✅ |
✅ |
✅ |
|
Return the cycle type of the permutation |
✅ |
❌ |
✅ |
|
Return the cycle notation of the permutation |
✅ |
✅ |
✅ |
|
Return the positions of the permutation descents |
✅ |
❌ |
✅ |
|
Return the positions of the permutation exceedances |
✅ |
❌ |
✅ |
|
Compute the inverse of the permutation |
✅ |
✅ |
✅ |
|
Return the inversions of the permutation |
✅ |
✅ |
✅ |
|
Check if two permutations are conjugate |
✅ |
❌ |
✅ |
|
Check if the permutation is a derangement |
✅ |
✅ |
✅ |
|
Check if the permutation is even |
✅ |
✅ |
✅ |
|
Check if the permutation is odd |
✅ |
✅ |
✅ |
|
Check if the permutation is regular |
✅ |
❌ |
✅ |
|
Return the map defining the permutation |
✅ |
✅ |
✅ |
|
Return the one line notation of the permutation |
✅ |
❌ |
❌ |
|
Compute image of a given element under the permutation |
✅ |
✅ |
✅ |
|
Return the order of the permutation |
✅ |
✅ |
✅ |
|
Return the sign of the permutation |
✅ |
✅ |
✅ |
|
Return the support of the permutation |
✅ |
✅ |
✅ |