Conjugacy Classes Of The Symmetric Group#

AUTHORS:

• Vincent Delecroix, Travis Scrimshaw (2014-11-23)

class sage.groups.perm_gps.symgp_conjugacy_class.PermutationsConjugacyClass(P, part)[source]#

A conjugacy class of the permutations of $$n$$.

INPUT:

• P – the permutations of $$n$$

• part – a partition or an element of P

set()[source]#

The set of all elements in the conjugacy class self.

EXAMPLES:

sage: G = Permutations(3)
sage: g = G([2, 1, 3])
sage: C = G.conjugacy_class(g)                                              # needs sage.combinat
sage: S = [[1, 3, 2], [2, 1, 3], [3, 2, 1]]
sage: C.set() == Set(G(x) for x in S)                                       # needs sage.combinat
True

>>> from sage.all import *
>>> G = Permutations(Integer(3))
>>> g = G([Integer(2), Integer(1), Integer(3)])
>>> C = G.conjugacy_class(g)                                              # needs sage.combinat
>>> S = [[Integer(1), Integer(3), Integer(2)], [Integer(2), Integer(1), Integer(3)], [Integer(3), Integer(2), Integer(1)]]
>>> C.set() == Set(G(x) for x in S)                                       # needs sage.combinat
True

class sage.groups.perm_gps.symgp_conjugacy_class.SymmetricGroupConjugacyClass(group, part)[source]#

A conjugacy class of the symmetric group.

INPUT:

• group – the symmetric group

• part – a partition or an element of group

set()[source]#

The set of all elements in the conjugacy class self.

EXAMPLES:

sage: G = SymmetricGroup(3)
sage: g = G((1,2))
sage: C = G.conjugacy_class(g)                                              # needs sage.combinat
sage: S = [(2,3), (1,2), (1,3)]
sage: C.set() == Set(G(x) for x in S)                                       # needs sage.combinat
True

>>> from sage.all import *
>>> G = SymmetricGroup(Integer(3))
>>> g = G((Integer(1),Integer(2)))
>>> C = G.conjugacy_class(g)                                              # needs sage.combinat
>>> S = [(Integer(2),Integer(3)), (Integer(1),Integer(2)), (Integer(1),Integer(3))]
>>> C.set() == Set(G(x) for x in S)                                       # needs sage.combinat
True

class sage.groups.perm_gps.symgp_conjugacy_class.SymmetricGroupConjugacyClassMixin(domain, part)[source]#

Bases: object

Mixin class which contains methods for conjugacy classes of the symmetric group.

partition()[source]#

Return the partition of self.

EXAMPLES:

sage: G = SymmetricGroup(5)
sage: g = G([(1,2), (3,4,5)])
sage: C = G.conjugacy_class(g)                                              # needs sage.combinat

>>> from sage.all import *
>>> G = SymmetricGroup(Integer(5))
>>> g = G([(Integer(1),Integer(2)), (Integer(3),Integer(4),Integer(5))])
>>> C = G.conjugacy_class(g)                                              # needs sage.combinat

sage.groups.perm_gps.symgp_conjugacy_class.conjugacy_class_iterator(part, S=None)[source]#

Return an iterator over the conjugacy class associated to the partition part.

The elements are given as a list of tuples, each tuple being a cycle.

INPUT:

• part – partition

• S – (default: $$\{ 1, 2, \ldots, n \}$$, where $$n$$ is the size of part) a set

OUTPUT: an iterator over the conjugacy class consisting of all permutations of the set S whose cycle type is part

EXAMPLES:

sage: from sage.groups.perm_gps.symgp_conjugacy_class import conjugacy_class_iterator       # needs sage.combinat
sage: for p in conjugacy_class_iterator([2,2]): print(p)                        # needs sage.combinat
[(1, 2), (3, 4)]
[(1, 4), (2, 3)]
[(1, 3), (2, 4)]

>>> from sage.all import *
>>> from sage.groups.perm_gps.symgp_conjugacy_class import conjugacy_class_iterator       # needs sage.combinat
>>> for p in conjugacy_class_iterator([Integer(2),Integer(2)]): print(p)                        # needs sage.combinat
[(1, 2), (3, 4)]
[(1, 4), (2, 3)]
[(1, 3), (2, 4)]


In order to get permutations, one just has to wrap:

sage: S = SymmetricGroup(5)
sage: for p in conjugacy_class_iterator([3,2]): print(S(p))                     # needs sage.combinat
(1,3)(2,4,5)
(1,3)(2,5,4)
(1,2)(3,4,5)
(1,2)(3,5,4)
...
(1,4)(2,3,5)
(1,4)(2,5,3)

>>> from sage.all import *
>>> S = SymmetricGroup(Integer(5))
>>> for p in conjugacy_class_iterator([Integer(3),Integer(2)]): print(S(p))                     # needs sage.combinat
(1,3)(2,4,5)
(1,3)(2,5,4)
(1,2)(3,4,5)
(1,2)(3,5,4)
...
(1,4)(2,3,5)
(1,4)(2,5,3)


Check that the number of elements is the number of elements in the conjugacy class:

sage: s = lambda p: sum(1 for _ in conjugacy_class_iterator(p))
sage: all(s(p) == p.conjugacy_class_size() for p in Partitions(5))              # needs sage.combinat
True

>>> from sage.all import *
>>> s = lambda p: sum(Integer(1) for _ in conjugacy_class_iterator(p))
>>> all(s(p) == p.conjugacy_class_size() for p in Partitions(Integer(5)))              # needs sage.combinat
True


It is also possible to specify any underlying set:

sage: it = conjugacy_class_iterator([2,2,2], 'abcdef')                          # needs sage.combinat
sage: sorted(flatten(next(it)))                                                 # needs sage.combinat
['a', 'b', 'c', 'd', 'e', 'f']
sage: all(len(x) == 2 for x in next(it))                                        # needs sage.combinat
True

>>> from sage.all import *
>>> it = conjugacy_class_iterator([Integer(2),Integer(2),Integer(2)], 'abcdef')                          # needs sage.combinat
>>> sorted(flatten(next(it)))                                                 # needs sage.combinat
['a', 'b', 'c', 'd', 'e', 'f']
>>> all(len(x) == Integer(2) for x in next(it))                                        # needs sage.combinat
True

sage.groups.perm_gps.symgp_conjugacy_class.default_representative(part, G)[source]#

Construct the default representative for the conjugacy class of cycle type part of a symmetric group G.

Let $$\lambda$$ be a partition of $$n$$. We pick a representative by

$(1, 2, \ldots, \lambda_1) (\lambda_1 + 1, \ldots, \lambda_1 + \lambda_2) (\lambda_1 + \lambda_2 + \cdots + \lambda_{\ell-1}, \ldots, n),$

where $$\ell$$ is the length (or number of parts) of $$\lambda$$.

INPUT:

• part – partition

• G – a symmetric group

EXAMPLES:

sage: from sage.groups.perm_gps.symgp_conjugacy_class import default_representative         # needs sage.combinat
sage: S = SymmetricGroup(4)
sage: for p in Partitions(4):                                                   # needs sage.combinat
....:     print(default_representative(p, S))
(1,2,3,4)
(1,2,3)
(1,2)(3,4)
(1,2)
()

>>> from sage.all import *
>>> from sage.groups.perm_gps.symgp_conjugacy_class import default_representative         # needs sage.combinat
>>> S = SymmetricGroup(Integer(4))
>>> for p in Partitions(Integer(4)):                                                   # needs sage.combinat
...     print(default_representative(p, S))
(1,2,3,4)
(1,2,3)
(1,2)(3,4)
(1,2)
()