fprintf('graph G {\n');
n=2;
p=2;
P=2^(p*p);
e=eye(p);
%fprintf('page = "11.69,8.27";\n');
%fprintf('rotate = 90;\n');
for i=0:(P-1)
 %fprintf(' %2d [fixedsize=true,height=0.2,width=0.2,label=""]\n',i);
 fprintf(' %2d [fixedsize=true,height=0.5,width=0.5,labelfontsize=6.0]\n',i);
 B1=mat(p,i);
 for j=i:(P-1)
  B2=mat(p,j);
  % fprintf('i==%2d,j==%2d,norm==%4d\n',i,j,norm(B1*B1'+B2*B2'-n*p*e));
  if norm(B1*B1'+B2*B2'-n*p*e)==0
   if norm(B1*B2'+B2*B1')==0
    fprintf(' %2d -- %2d [color=red,len=1];\n',i,j);
   end
   if norm(B1*B2'-B2*B1')==0
    fprintf(' %2d -- %2d [color=blue,len=3];\n',i,j);
   end
  end
 end
end
fprintf('}\n');

