Replace counterexample with minimal n=13 graph found by exhaustive search

Adds search_counterexample_comprehensive iterating Sage's planar_graphs
generator across all maximal planar graphs of bounded order. Exhaustive
enumeration through order 13 (9150+49566 triangulations) yields exactly
one graph with no plane diamond coloring, at order 13. Updates Theorem
2.6 to assert minimality and uniqueness, and replaces the figure and
edge list with the smaller counterexample.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-09 12:52:30 -04:00
parent 2ae729db1e
commit 88031c9d73
7 changed files with 74 additions and 58 deletions
+34 -7
View File
@@ -62,13 +62,40 @@ def search_counterexample(n: int, num_trials: int) -> Graph | None:
return None
def search_counterexample_comprehensive(max_order: int, min_order: int = 4) -> list[Graph]:
"""
Iterate through every maximal planar graph of order in [min_order, max_order]
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):
checked += 1
if not has_plane_diamond_coloring(g):
print(f"Counterexample at order {n} (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 checked")
return counterexamples
if __name__ == "__main__":
import sys
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
counterexample = search_counterexample(n, num_trials)
if counterexample is None:
print(f"No counterexample found in {num_trials} random triangulations of order {n}")
if len(sys.argv) > 1 and sys.argv[1] == "comprehensive":
max_order = int(sys.argv[2]) if len(sys.argv) > 2 else 10
min_order = int(sys.argv[3]) if len(sys.argv) > 3 else 4
counterexamples = search_counterexample_comprehensive(max_order, min_order)
print(f"Found {len(counterexamples)} counterexamples in orders {min_order}..{max_order}")
for g in counterexamples:
canonize_and_save_graph(g)
else:
canonical, graph_dir = canonize_and_save_graph(counterexample)
print(f"Counterexample saved to {graph_dir}")
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
counterexample = search_counterexample(n, num_trials)
if counterexample is None:
print(f"No counterexample found in {num_trials} random triangulations of order {n}")
else:
canonical, graph_dir = canonize_and_save_graph(counterexample)
print(f"Counterexample saved to {graph_dir}")