TITLE: Obtaining the adjacency matrix of Cayley graphs
QUESTION [5 upvotes]: Is it possible to obtain the adjacency matrix of a Cayley graph of $Z_3 \times Z_5$? (Manually or by using a software like GAP).
Will there be a pattern for adjacency matrices of Cayley graphs for a particular type of groups considered (i.e. if we consider Cayley graphs of the groups $Z_p \times Z_q$, where p,q are distinct primes, will the adjacency matrices obtained for various choices of p and q  be related to each other by some pattern)?
I know we obtain different Cayley graphs for different generating sets chosen to construct the Cayley graph. So if the adjacency matrix is difficult to be taken due to this reason please mention at least for one generating set chosen.
Thanks a lot in advance.

REPLY [4 votes]: In GAP: With the function
AdjacencyMatrixCayleyGraph:=function(elms,gens)
local g,A,i,l;
  l:=Length(elms);
  A:=NullMat(l,l);
  for i in [1..Length(elms)] do
    for g in gens do
      A[i][Position(elms,elms[i]*g)]:=1;
      A[i][Position(elms,elms[i]/g)]:=1; # or -1 if digraph is wanted
    od;
  od;
  return A;
end;

you can call AdjacencyMatrixCayleyGraph with a list of elements of the group and a list of generator.
For example, in the case of a cyclic generator of $Z_3\times Z_5$:
gap> g:=AbelianGroup([3,5]);
<pc group of size 15 with 2 generators>    
gap> m:=AdjacencyMatrixCayleyGraph(Elements(g),[g.1*g.2]);
[ [ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ],
  [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0 ],
  [ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ],
  [ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 ],
  [ 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 ],
  [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0 ],
  [ 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
  [ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ],
  [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0 ],
  [ 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 ],
  [ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 ],
  [ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ],
  [ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ],
  [ 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 ],
  [ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ] ]