[GAP Forum] Cayley sum graph

饶广 generalrao at hotmail.com
Tue Aug 16 08:22:28 BST 2011


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.
 
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
 
 
 
 
  		 	   		  


More information about the Forum mailing list