Elements

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.

overview#

Feature

Description

P

C

CD

__call__

Call the permutation on an object

__mul__

Multiplication (composition) between permutations

cycle_decomposition

Cycle decomposition of the permutation

cycle_notation

Return the cycle notation of the permutation

is_derangement

Check if the permutation is a derangement

map

Return the map defining the permutation

one_line_notation

Return the one line notation of the permutation

support

Return the support of the permutation

orbit

Compute image of a given element under the permutation

order

Return the order of the permutation