use libgap:sage: g=libgap.SymmetricGroup(7)sage: g.Orbits(tuples([1..7],2),libgap.OnTuples)[ [ [ 1, 1 ], [ 2, 2 ], [ 3, 3 ], [ 4, 4 ], [ 5, 5 ], [ 6, 6 ], [ 7, 7 ] ], [ [ 1, 2 ], [ 2, 3 ], [ 2, 1 ], [ 3, 4 ], [ 1, 3 ], [ 3, 2 ], [ 4, 5 ], [ 2, 4 ], [ 4, 3 ], [ 3, 1 ], [ 5, 6 ], [ 3, 5 ], [ 1, 4 ], [ 5, 4 ], [ 4, 2 ], [ 6, 7 ], [ 4, 6 ], [ 2, 5 ], [ 6, 5 ], [ 5, 3 ], [ 4, 1 ], [ 7, 1 ], [ 5, 7 ], [ 3, 6 ], [ 1, 5 ], [ 7, 6 ], [ 6, 4 ], [ 5, 2 ], [ 7, 2 ], [ 6, 1 ], [ 4, 7 ], [ 2, 6 ], [ 1, 7 ], [ 7, 5 ], [ 6, 3 ], [ 5, 1 ], [ 6, 2 ], [ 3, 7 ], [ 1, 6 ], [ 2, 7 ], [ 7, 4 ], [ 7, 3 ] ] ]
Hello!Thanks! I wasn't aware of libgap! One more followup question. Say I want to compute the orbits of the CubeGraph of order 10. The description of respective automorphism group seems to be to heave for libgap====sage: G = graphs.CubeGraph(10)sage: G.relabel()sage: A = G.automorphism_group()sage: libgap(A)python: libgap.c:186: libgap_get_input: Assertion `strlen(libGAP_stdin_buffer) < length' failed.===Is there a way to overcome this limitation?
On Wednesday, March 23, 2016 at 11:10:42 PM UTC, Jernej wrote:Hello!Thanks! I wasn't aware of libgap! One more followup question. Say I want to compute the orbits of the CubeGraph of order 10. The description of respective automorphism group seems to be to heave for libgap====sage: G = graphs.CubeGraph(10)sage: G.relabel()sage: A = G.automorphism_group()sage: libgap(A)python: libgap.c:186: libgap_get_input: Assertion `strlen(libGAP_stdin_buffer) < length' failed.===Is there a way to overcome this limitation?sage: G = graphs.CubeGraph(10)sage: A = G.automorphism_group()sage: T=libgap.Group(map(libgap,A.gens()))sage: T.Order()3715891200works.There is probably a fixed side buffer somewhere that is not big enough for passing the whole of Adirectly.
Thanks. I wasn't aware that passing the group to libgap will actually try to pass all of its elements to gap!
Continuing on the topic though I have two new questions about this libgap magic.When doing g.Orbits(tuples([1..7],2),libgap.OnTuples) are the tuples actually computed in Sage and passed to gap? The reason I am trying to call directly is to make sure this is computed in gap, where I am (blindly) assuming it's faster.
Finally, if I want to repeat the example using combinations it seems that the obvious conversion failsg.Orbits(combinations([1..7],2),libgap.OnSets)gives the (expected) NameError: name 'combinations' is not defined,capitalizing combinations givesValueError: libGAP: Syntax error: ; expectedCombinations of [1, 2, 3, 4, 5, 6, 7] of length 2;