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 |
✅ |
❌ |
✅ |
|
Cycle decomposition of the permutation |
✅ |
✅ |
✅ |
|
Return the cycle notation of the permutation |
✅ |
✅ |
✅ |
|
Check if the permutation is a derangement |
✅ |
✅ |
✅ |
|
Return the map defining the permutation |
✅ |
✅ |
✅ |
|
Return the one line notation of the permutation |
✅ |
❌ |
❌ |
|
Return the support of the permutation |
✅ |
✅ |
✅ |
|
Compute image of a given element under the permutation |
✅ |
✅ |
✅ |
|
Return the order of the permutation |
✅ |
✅ |
✅ |