Dear all, 2011/8/16 饶广 <general...@hotmail.com>: > > Dear forum, > > I am new in GAP. Maybe this is just a very simple question. > > Cayley sum graph Cay^+(G,S) is a graph on an abelian group G and two vertices > are adjacent iff their sum lies in S. > > I am trying to draw Cay^+(Z_2\timesZ_6,{(0,1),(1,2),(1,3)}) and do the > following in GAP: > >>G:=AbelianGroup([2,6]); >>gen:=GeneratorsOfGroup(G); >>S:=[gen[2],gen[1]*gen[2]^2,gen[1],gen[1]*gen[2]^3]; >>Graph(Group(()),Elements(G),OnPoints, function(x,y) return x*y in S; end, >>true); > > This returns an error. I guess the problem is how to refer the elements of a > group to the vertex set.
you need to do Graph(G,Elements(G),OnPoints, function(x,y) return x*y in S; end, true); (assuming you did LoadPackage("grape");) HTH, Dmitrii > > In addition, I also want to test if this graph is hamiltonian or not. But I > couldn't find a direct function for this. Does anyone know about this? > > > Thanks very much, > Grant > > > > > > _______________________________________________ > Forum mailing list > Forum@mail.gap-system.org > http://mail.gap-system.org/mailman/listinfo/forum > -- Dmitrii Pasechnik ----- DISCLAIMER: Any text following this sentence does not constitute a part of this message, and was added automatically during transmission. CONFIDENTIALITY: This email is intended solely for the person(s) named and may be confidential and/or privileged. If you are not the intended recipient, please delete it, notify us and do not copy, use, or disclose its content. Thank you. Towards A Sustainable Earth: Print Only When Necessary _______________________________________________ Forum mailing list Forum@mail.gap-system.org http://mail.gap-system.org/mailman/listinfo/forum