Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- all(len(G.longest_path(v)) == len(G) for v in G.vertices())
- def homtrac_orbits(g):
- orbits = g.automorphism_group(return_group=False, orbits=True)
- n = len(g)
- return all(len(g.longest_path(o[0])) == n for o in orbits)
- def ptfnh(G):
- """Graph property: planar, triangle-free, non-hamiltonian.
- If G has the property, then any subgraph obtained by deleting one edge also has it,
- so this may be used with the Sage graphs generator.
- """
- return G.is_planar() and G.is_triangle_free() and not G.is_hamiltonian()
- for n in range(5, 12):
- totct = 0
- for G in graphs(n, ptfnh):
- if not G.is_connected():
- continue
- totct += 1
- if homtrac_orbits(G):
- print G.to_dictionary()
- print n, ':', totct, 'planar connected triangle-free non-hamiltonian graphs'
- 5 : 5 planar connected triangle-free non-hamiltonian graphs
- 6 : 15 planar connected triangle-free non-hamiltonian graphs
- 7 : 51 planar connected triangle-free non-hamiltonian graphs
- 8 : 210 planar connected triangle-free non-hamiltonian graphs
- 9 : 1006 planar connected triangle-free non-hamiltonian graphs
- 10 : 5831 planar connected triangle-free non-hamiltonian graphs
- 11 : 39210 planar connected triangle-free non-hamiltonian graphs
Add Comment
Please, Sign In to add comment