On Tuesday, 15 May 2012 01:02:46 UTC+2, Dima Pasechnik wrote: > > > > On Monday, 14 May 2012 16:57:40 UTC+2, Nathann Cohen wrote: >> >> Hellooooooo everybody !!! >> >> I would like to play with groups in Sage but I do not know how. I >> actually get my groups from a graph in the following way : >> >> sage: g = graphs.PetersenGraph() >> sage: ag = g.automorphism_group() >> sage: type(ag) >> <class >> 'sage.groups.perm_gps.permgroup.PermutationGroup_generic_with_category'> >> >> What I would like to do with this group is to consider it as a group >> action on my vertices and compute the orbits of some *sets* of >> vertices. Indeed, the method ag.orbits() would give me the list of all >> orbits of my vertices, but I would like to compute the orbit of a Set >> of vertices, that is all sets of the form "gg * my_set for gg in ag". >> >> Is there any way to achieve it with Sage ? >> > > Well, you can call GAP, e.g. as follows: > > sage: gap("Orbit("+str(ag._gap_())+",[1,2,7],OnSets);") > [ [ 1, 2, 7 ], [ 1, 2, 3 ], [ 1, 6, 9 ], [ 2, 3, 4 ], [ 3, 4, 10 ], > [ 1, 6, 8 ], [ 3, 4, 8 ], [ 4, 9, 10 ], [ 4, 7, 9 ], [ 5, 8, 10 ], > [ 2, 5, 7 ], [ 5, 6, 8 ], [ 3, 5, 8 ], [ 4, 6, 9 ], [ 5, 7, 10 ], > [ 5, 7, 9 ], [ 6, 7, 9 ], [ 3, 6, 8 ], [ 1, 6, 10 ], [ 2, 7, 9 ], > [ 1, 2, 10 ], [ 2, 3, 8 ], [ 6, 8, 9 ], [ 1, 5, 10 ], [ 2, 3, 7 ], > [ 1, 4, 10 ], [ 5, 7, 8 ], [ 3, 4, 9 ], [ 4, 5, 10 ], [ 1, 2, 6 ] ] > sage: > > PS. it should not be hard to expand the ag.orbit method to incorporate the action type...
> >> Thaank youuuuuuuuuuuuuuuuuuuuuuuuuu !!!! >> >> Nathann >> > -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org