Undirected graph code