Ask Your Question
1

How to represent and calculate the product of non disjoint cycles in SageMath

asked 1 year ago

Siocnarf2579 gravatar image

Ex: Permutation("(3,5)(1,2)(2,5)(1,4)")

How do you do that in Sagemath.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 1 year ago

slelievre gravatar image

Define the permutation for each cycle, and multiply them.

Of course the result depends on the order in which you multiply.

Example:

sage: prod(Permutation(c) for c in ("(3, 5)", "(1, 2)", "(2, 5)", "(1, 4)"))
[5, 4, 2, 1, 3]
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 1 year ago

Seen: 138 times

Last updated: Jun 06 '23