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)

Bases: sage.groups.perm_gps.symgp_conjugacy_class.SymmetricGroupConjugacyClassMixin, sage.groups.conjugacy_classes.ConjugacyClass

A conjugacy class of the permutations of \(n\).

INPUT:

  • P – the permutations of \(n\)
  • part – a partition or an element of P
set()

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)
sage: S = [[1, 3, 2], [2, 1, 3], [3, 2, 1]]
sage: C.set() == Set(G(x) for x in S)
True
class sage.groups.perm_gps.symgp_conjugacy_class.SymmetricGroupConjugacyClass(group, part)

Bases: sage.groups.perm_gps.symgp_conjugacy_class.SymmetricGroupConjugacyClassMixin, sage.groups.conjugacy_classes.ConjugacyClassGAP

A conjugacy class of the symmetric group.

INPUT:

  • group – the symmetric group
  • part – a partition or an element of group
set()

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)
sage: S = [(2,3), (1,2), (1,3)]
sage: C.set() == Set(G(x) for x in S)
True
class sage.groups.perm_gps.symgp_conjugacy_class.SymmetricGroupConjugacyClassMixin(domain, part)

Bases: object

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

partition()

Return the partition of self.

EXAMPLES:

sage: G = SymmetricGroup(5)
sage: g = G([(1,2), (3,4,5)])
sage: C = G.conjugacy_class(g)
sage.groups.perm_gps.symgp_conjugacy_class.conjugacy_class_iterator(part, S=None)

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 – (optional, 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
sage: for p in conjugacy_class_iterator([2,2]): print(p)
[(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))
(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))
True

It is also possible to specify any underlying set:

sage: it = conjugacy_class_iterator([2,2,2], 'abcdef')
sage: next(it) # py2
[('a', 'b'), ('c', 'd'), ('e', 'f')]
sage: next(it) # py2
[('a', 'f'), ('c', 'b'), ('e', 'd')]
sage: sorted(flatten(next(it)))
['a', 'b', 'c', 'd', 'e', 'f']
sage: all(len(x) == 2 for x in next(it))
True
sage.groups.perm_gps.symgp_conjugacy_class.default_representative(part, G)

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
sage: S = SymmetricGroup(4)
sage: for p in Partitions(4):
....:     print(default_representative(p, S))
(1,2,3,4)
(1,2,3)
(1,2)(3,4)
(1,2)
()