Ask Your Question
0

polya enumeration of non-isomorphic graphs

asked 2013-11-18 12:27:01 +0100

anonymous user

Anonymous

updated 2015-01-18 18:12:05 +0100

FrédéricC gravatar image

I am trying to get Sage to give me the group acting on the potential edges of graph with n vertices for the purposes of Polya enumeration.

I know sage will give me the nth sysmmetric group, S_n. What I want is the group acting on the pairs, usually referred to as S_n^{(2)} in the literature. Any ideas?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2013-11-18 12:39:57 +0100

tmonteil gravatar image

I am affraid cartesian products do not work well with group structures (and their actions) right now in Sage.

sage: G = SymmetricGroup(4)
sage: H = CartesianProduct(G,G)
sage: H
Cartesian product of Symmetric group of order 4! as a permutation group, Symmetric group of order 4! as a permutation group
sage: H.random_element()
[(1,2,4), (1,2)]
sage: s = H.random_element() ; s
[(1,3)(2,4), (1,3)(2,4)]
sage: s.parent()
AttributeError: 'list' object has no attribute 'parent'

sage: H = G.cartesian_product(G)
sage: H
The cartesian product of (Symmetric group of order 4! as a permutation group, Symmetric group of order 4! as a permutation group)
sage: s = H.an_element() ; s
((1,2,3,4), (1,2,3,4))
sage: s([1,2])
TypeError: 'CartesianProduct_with_category.element_class' object is not callable
sage: s[2,3]
TypeError: 'CartesianProduct_with_category.element_class' object has no attribute '__getitem__'

You can follow and have a look at the links given in this trac ticket.

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-11-18 12:27:01 +0100

Seen: 493 times

Last updated: Nov 18 '13