Obtaining the adjacency matrix of Cayley graphs

635 Views Asked by At

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.

2

There are 2 best solutions below

7
On
with(GroupTheory):
with(GraphTheory):
G := DirectProduct(CyclicGroup(3), CyclicGroup(5));
H := CayleyGraph(G):
AdjacencyMatrix(H);

So the result will be as follows:

enter image description here

Indeed, the output is great but I did like to know the way we could do it by GAP.

3
On

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