Add min-degree-5 conjecture and computational verification search
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -81,6 +81,26 @@ def search_counterexample_comprehensive(max_order: int, min_order: int = 4) -> l
|
||||
return counterexamples
|
||||
|
||||
|
||||
def search_min_degree_counterexample_comprehensive(max_order: int, minimum_degree: int, min_order: int = 4) -> list[Graph]:
|
||||
"""
|
||||
Iterate through every maximal planar graph of order in [min_order, max_order]
|
||||
with the given minimum degree, and return all those without a plane diamond
|
||||
coloring.
|
||||
"""
|
||||
counterexamples: list[Graph] = []
|
||||
for n in range(min_order, max_order + 1):
|
||||
checked = 0
|
||||
for g in graphs.planar_graphs(n, minimum_connectivity=3, maximum_face_size=3, minimum_degree=minimum_degree):
|
||||
checked += 1
|
||||
if not has_plane_diamond_coloring(g):
|
||||
print(f"Counterexample at order {n}, min_degree {minimum_degree} (graph #{checked}): {g.graph6_string()}")
|
||||
counterexamples.append(g)
|
||||
if checked % 100 == 0:
|
||||
print(f" order {n}: checked {checked} graphs, {len(counterexamples)} counterexamples so far")
|
||||
print(f"order {n} done: {checked} triangulations of min degree {minimum_degree} checked")
|
||||
return counterexamples
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
if len(sys.argv) > 1 and sys.argv[1] == "comprehensive":
|
||||
@@ -90,6 +110,14 @@ if __name__ == "__main__":
|
||||
print(f"Found {len(counterexamples)} counterexamples in orders {min_order}..{max_order}")
|
||||
for g in counterexamples:
|
||||
canonize_and_save_graph(g)
|
||||
elif len(sys.argv) > 1 and sys.argv[1] == "min-degree":
|
||||
max_order = int(sys.argv[2]) if len(sys.argv) > 2 else 13
|
||||
minimum_degree = int(sys.argv[3]) if len(sys.argv) > 3 else 5
|
||||
min_order = int(sys.argv[4]) if len(sys.argv) > 4 else 4
|
||||
counterexamples = search_min_degree_counterexample_comprehensive(max_order, minimum_degree, min_order)
|
||||
print(f"Found {len(counterexamples)} counterexamples in orders {min_order}..{max_order} with min degree {minimum_degree}")
|
||||
for g in counterexamples:
|
||||
canonize_and_save_graph(g)
|
||||
else:
|
||||
n = int(sys.argv[1]) if len(sys.argv) > 1 else 12
|
||||
num_trials = int(sys.argv[2]) if len(sys.argv) > 2 else 100
|
||||
|
||||
Reference in New Issue
Block a user