Ask Your Question
0

cycle index

asked 2013-10-26 12:31:51 -0500

anonymous user

Anonymous

I know that S4 = SymmetricGroup(4) P = S4.cycle_index()

will return the cycle index polynomial for S_4. What I want to do is substitute variables into this polynomial for Polya Enumeration problems. So for instance, how do I substitute x+y into the cycles of length 1, x^2+y^2 into the cycles of length 2, etc.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-10-26 13:33:16 -0500

tmonteil gravatar image

You can extract the contents of P as follows:

sage: list(P)
[([1, 1, 1, 1], 1/24),
 ([4], 1/4),
 ([3, 1], 1/3),
 ([2, 2], 1/8),
 ([2, 1, 1], 1/4)]

I am not sure i understand which polynomial you want, if you want to associate to a permutation the product of the (x^j+y^j) for each cycle of length j contained in the permutation, you can do:

sage: var('x y')
(x, y)
sage: sum([(i[1]*prod([(x^j + y^j) for j in i[0]])) for i in P])
1/24*(x + y)^4 + 1/4*x^4 + 1/4*y^4 + 1/4*(x^2 + y^2)*(x + y)^2 + 1/8*(x^2 + y^2)^2 + 1/3*(x^3 + y^3)*(x + y)

Or, if you want genuine polynomials instead of symbolic functions:

sage: R.<x,y> = PolynomialRing(QQ,2)
sage: sum([(i[1]*prod([(x^j + y^j) for j in i[0]])) for i in P])
x^4 + x^3*y + x^2*y^2 + x*y^3 + y^4

sage: Q = CyclicPermutationGroup(6).cycle_index()
sage: sum([(i[1]*prod([(x^j + y^j) for j in i[0]])) for i in Q])
x^6 + x^5*y + 3*x^4*y^2 + 4*x^3*y^3 + 3*x^2*y^4 + x*y^5 + y^6
edit flag offensive delete link more

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: 2013-10-26 12:31:51 -0500

Seen: 260 times

Last updated: Oct 26 '13