Log in to edit a copy.
Download.
Other published documents...
Circulant example
1562 days ago by hthall
G = graphs.CirculantGraph(9,[1,3]) G
show(G.adjacency_matrix())
M = Matrix(ZZ, [[1, 1, 0, 5, 0, 0, -2, 0, 1], [0, 6, 0, 0, 3, 0, 2, 1, 4], [0, 0, 2, 0, 2, 1, 1, 0, 4], [0, 5, 1, 1, 4, 0, 2, 0, 5]]) show(M)
D = diagonal_matrix([1, 1, 1, -1]) show(D)
A = M.transpose() * D * M show(A)
G.is_isomorphic(Graph(A - diagonal_matrix(A.diagonal())))
True
True