#20561: Return cycle type of a permutation
-------------------------------------+-------------------------------------
Reporter: andrew.mathas | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-7.2
Component: group theory | Resolution:
Keywords: permutation, | Merged in:
cycle type | Reviewers:
Authors: Andrew Mathas | Work issues:
Report Upstream: N/A | Commit:
Branch: | 64ee9b244f92ded2b5052b2b23a7eee42d07bf05
u/andrew.mathas/return_cycle_type_of_a_permutation| Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Description changed by andrew.mathas:
Old description:
> Given an element of a permutation group, with a fixed embedding in a
> symmetric group, return the cycle type of the permutation as a partition.
>
> {{{#!python
> sage: G=DihedralGroup(3)
> sage: [g.cycle_type() for g in G]
> [[1, 1, 1], [2, 1], [3], [2, 1], [3], [2, 1]]
> sage: PermutationGroupElement('(1,2,3)(4,5)(6,7,8)').cycle_type()
> [3, 3, 2]
> sage: G=SymmetricGroup(3); G('(1,2)').cycle_type()
> [2, 1]
> sage: G=SymmetricGroup(4); G('(1,2)').cycle_type()
> [2, 1, 1]
> }}}
New description:
Given an element of a permutation group, which automatically comes
equipped with a fixed embedding into a symmetric group, return the cycle
type of the permutation as a partition.
{{{#!python
sage: G=DihedralGroup(3)
sage: [g.cycle_type() for g in G]
[[1, 1, 1], [2, 1], [3], [2, 1], [3], [2, 1]]
sage: PermutationGroupElement('(1,2,3)(4,5)(6,7,8)').cycle_type()
[3, 3, 2]
sage: G=SymmetricGroup(3); G('(1,2)').cycle_type()
[2, 1]
sage: G=SymmetricGroup(4); G('(1,2)').cycle_type()
[2, 1, 1]
}}}
--
--
Ticket URL: <http://trac.sagemath.org/ticket/20561#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.