Skip to content

Instantly share code, notes, and snippets.

@tonicanada
Last active January 15, 2022 03:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonicanada/8fcb77fa63ee124db4ec17561b83445f to your computer and use it in GitHub Desktop.
Save tonicanada/8fcb77fa63ee124db4ec17561b83445f to your computer and use it in GitHub Desktop.
# Bipartite graph K_13
graph_k13 = np.array([
[0, 0, 0, 1],
[0, 0, 0, 1],
[0, 0, 0, 1],
[1, 1, 1, 0]
])
k13_automorphisms = generate_automorphisms(graph_k13)
for automorphism in k13_automorphisms:
print(cycle_notation([x+1 for x in automorphism["perm_vertex"]]))
# That would print the following result:
# [[1], [2], [3], [4]]
# [[1], [2, 3], [4]]
# [[1, 2], [3], [4]]
# [[1, 2, 3], [4]]
# [[1, 3, 2], [4]]
# [[1, 3], [2], [4]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment