function printgraph(G)
nbrnodes = size(G,2);
for k=1:nbrnodes
 for l=1:nbrnodes
  if G(k,l) == 0
   printf('  ');
  elseif G(k,l) == -1
   printf(' -');
  elseif G(k,l) == 1
   printf(' 1');
  else
   printf(' X');
  end
 end
 printf('\n');
end
