face_monochromatic_pairs: strengthen Conj 5.5 to face-length ≥ 5, find 28-vertex counterexample
- Paper: Conjecture 5.5 restated with the hypothesis that every face
of H has length ≥ 5 (= the cubic plane analogue of "no triangles
or quadrilaterals as faces"). This kills K_4 and the n=8 trivial
counterexamples (girth 3) and the ad-hoc n=40 counterexample
(which has 2 triangles and 4 quadrilaterals). A new remark catalogues
these excluded counterexamples and the smallest cubic plane graphs
satisfying the hypothesis (dodecahedron at |V| = 20).
- search_smaller_counterexample.py: --min-face=N option to filter
cubic planar graphs by minimum face length.
- search_min_face5_counterexample.py: enumerates triangulations T
with min degree ≥ 5 via graphs.triangulations(n, minimum_degree=5),
takes planar dual (= cubic plane with all faces ≥ 5), and runs the
Heawood-constancy check.
- Result: smallest counterexample at triangulation order n_T = 16,
whose dual is a 28-vertex cubic plane graph (graph6
[kG[A?_A?_?_?K?D?@_CO?o?@_??A??@C??O??AG?C????`???a???W???A_???F).
Faces: 12 pentagons + 4 hexagons (a C28 fullerene). Both
K_{red, blue} and K_{red, green} are 12-cycles sharing the
colour-red edge (0, 1) and both have h_φ ≡ -1. 8 of 28 vertices
lie outside V(K_0) ∪ V(K_1).
- verify_28_vertex_counterexample.py: reproduces the counterexample,
verifies all properties, and renders figures/min-face-5-counterexample.png.
Note on the boundary: face-length ≥ 6 is impossible for cubic plane
graphs by Euler (6F = 6(V/2 + 2) > 3V = sum face lengths for V > 4).
So face-length ≥ 5 is the strongest face-length restriction admitting
any cubic plane graphs at all.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,137 @@
|
||||
"""Search for counterexamples to the strengthened Conjecture 5.5:
|
||||
|
||||
Let H be a cubic plane graph in which every face has length ≥ 5,
|
||||
with a proper 3-edge-colouring φ. If K_0 = {a,b}-Kempe cycle and
|
||||
K_1 = {a,c}-Kempe cycle share a colour-a edge, then h_φ cannot be
|
||||
constant on both V(K_0) and V(K_1).
|
||||
|
||||
The graphs H satisfying the face-length-≥-5 hypothesis are exactly
|
||||
the duals of triangulations of the sphere with minimum degree ≥ 5.
|
||||
We enumerate these via plantri (through Sage's
|
||||
`graphs.triangulations(n, minimum_degree=5)`), take the planar dual,
|
||||
and run the same Heawood-constancy check as
|
||||
`search_smaller_counterexample.py`.
|
||||
|
||||
For each triangulation order n, the dual has 2n - 4 cubic vertices.
|
||||
The smallest case n = 12 is the icosahedron, whose dual is the
|
||||
dodecahedron (20 vertices, all faces pentagonal).
|
||||
|
||||
Run with:
|
||||
sage experiments/search_min_face5_counterexample.py # default max_n=14
|
||||
sage experiments/search_min_face5_counterexample.py 16
|
||||
sage experiments/search_min_face5_counterexample.py 16 --all
|
||||
"""
|
||||
import sys
|
||||
import time
|
||||
|
||||
from sage.all import Graph
|
||||
from sage.graphs.graph_generators import graphs
|
||||
|
||||
# Reuse the verification machinery from the cubic-search script.
|
||||
import os
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
sys.path.insert(0, HERE)
|
||||
from search_smaller_counterexample import (
|
||||
check_graph,
|
||||
min_face_length,
|
||||
)
|
||||
|
||||
|
||||
def planar_dual(G):
|
||||
"""Build the planar dual of a planar graph G with its embedding
|
||||
already set via G.is_planar(set_embedding=True)."""
|
||||
faces = G.faces()
|
||||
D = Graph(multiedges=False, loops=False)
|
||||
n_faces = len(faces)
|
||||
D.add_vertices(range(n_faces))
|
||||
# Map each (undirected) edge of G to the indices of the two faces
|
||||
# that contain it.
|
||||
edge_to_faces = {}
|
||||
for i, face in enumerate(faces):
|
||||
for e in face:
|
||||
key = frozenset(e[:2])
|
||||
edge_to_faces.setdefault(key, []).append(i)
|
||||
for key, fs in edge_to_faces.items():
|
||||
if len(fs) == 2 and fs[0] != fs[1]:
|
||||
D.add_edge(fs[0], fs[1])
|
||||
return D
|
||||
|
||||
|
||||
def main():
|
||||
args = [a for a in sys.argv[1:] if not a.startswith('--')]
|
||||
max_n = int(args[0]) if args else 14
|
||||
flag_all = '--all' in sys.argv[1:]
|
||||
|
||||
print(f"Searching for counterexamples to the face-length-≥-5 form "
|
||||
f"of Conjecture 5.5.\n"
|
||||
f"Iterating over triangulations with min degree ≥ 5 for "
|
||||
f"n_T in [12, {max_n}].\n"
|
||||
f"Each dual is cubic with all faces of length ≥ 5; the dual "
|
||||
f"has 2n_T - 4 vertices.\n"
|
||||
f"{'Continuing past first hit.' if flag_all else 'Stopping at first hit.'}\n")
|
||||
|
||||
first_found = None
|
||||
for n_T in range(12, max_n + 1):
|
||||
start = time.time()
|
||||
count = 0
|
||||
found = None
|
||||
try:
|
||||
gen = graphs.triangulations(n_T, minimum_degree=5)
|
||||
except Exception as ex:
|
||||
print(f"n_T={n_T:>3}: cannot enumerate ({ex})")
|
||||
continue
|
||||
for T in gen:
|
||||
T.is_planar(set_embedding=True)
|
||||
H = planar_dual(T)
|
||||
n_H = H.order()
|
||||
# Sanity: H should be cubic and planar; faces length ≥ 5.
|
||||
if max(H.degree()) != 3 or min(H.degree()) != 3:
|
||||
continue
|
||||
if not H.is_planar(set_embedding=True):
|
||||
continue
|
||||
if min_face_length(H) < 5:
|
||||
continue
|
||||
count += 1
|
||||
res = check_graph(H)
|
||||
if res is not None:
|
||||
found = (T.copy(), H.copy(), res, n_H)
|
||||
if not flag_all:
|
||||
break
|
||||
elapsed = time.time() - start
|
||||
n_H_min = 2 * n_T - 4
|
||||
if found is None:
|
||||
print(f"n_T={n_T:>3}: checked {count} triangulation duals "
|
||||
f"(each with {n_H_min} cubic vertices), no counterexample "
|
||||
f"[{elapsed:.1f}s]")
|
||||
else:
|
||||
T, H, (col, K0, K1, h0, h1, a, b, c, e), n_H = found
|
||||
colour_name = {0: 'red', 1: 'blue', 2: 'green'}
|
||||
print(f"n_T={n_T:>3}: COUNTEREXAMPLE in dual #{count} "
|
||||
f"(|V(H)| = {n_H}) [{elapsed:.1f}s]")
|
||||
print(f" triangulation canonical graph6 = "
|
||||
f"{T.canonical_label().graph6_string()}")
|
||||
print(f" dual (cubic) canonical graph6 = "
|
||||
f"{H.canonical_label().graph6_string()}")
|
||||
print(f" dual edges = {sorted(H.edges(labels=False))}")
|
||||
print(f" colouring = {col}")
|
||||
print(f" shared colour = {colour_name[a]} ({a}), edge {e}")
|
||||
print(f" K_{{a,b}} = K_{{{colour_name[a]},{colour_name[b]}}} "
|
||||
f"= {K0} (h={h0:+d}, |V|={len(K0)})")
|
||||
print(f" K_{{a,c}} = K_{{{colour_name[a]},{colour_name[c]}}} "
|
||||
f"= {K1} (h={h1:+d}, |V|={len(K1)})")
|
||||
if first_found is None:
|
||||
first_found = n_T
|
||||
if not flag_all:
|
||||
break
|
||||
sys.stdout.flush()
|
||||
|
||||
if first_found is not None:
|
||||
print(f"\nSmallest counterexample at triangulation order n_T "
|
||||
f"= {first_found} (dual has {2 * first_found - 4} vertices).")
|
||||
else:
|
||||
print(f"\nNo counterexample found for triangulation orders ≤ "
|
||||
f"{max_n} (dual orders ≤ {2 * max_n - 4}).")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -146,19 +146,45 @@ def check_graph(G):
|
||||
return None
|
||||
|
||||
|
||||
def min_face_length(G):
|
||||
"""Min face length of G in its current planar embedding."""
|
||||
return min(len(f) for f in G.faces())
|
||||
|
||||
|
||||
def main():
|
||||
args = [a for a in sys.argv[1:] if not a.startswith('--')]
|
||||
max_n = int(args[0]) if args else 18
|
||||
flag_all = '--all' in sys.argv[1:]
|
||||
# Parse --min-face N
|
||||
min_face = None
|
||||
for i, a in enumerate(sys.argv[1:]):
|
||||
if a == '--min-face' and i + 1 < len(sys.argv) - 1:
|
||||
min_face = int(sys.argv[i + 2])
|
||||
break
|
||||
if a.startswith('--min-face='):
|
||||
min_face = int(a.split('=', 1)[1])
|
||||
break
|
||||
|
||||
print(f"Searching for cubic plane graph counterexamples to "
|
||||
f"Conjecture 5.5, n in [4, {max_n}] "
|
||||
f"({'continuing past first hit' if flag_all else 'stopping at first hit'})\n")
|
||||
f"({'continuing past first hit' if flag_all else 'stopping at first hit'})"
|
||||
+ (f", min face length >= {min_face}" if min_face else "")
|
||||
+ "\n")
|
||||
|
||||
# If filtering by min face length, skip small n where impossible.
|
||||
# For all-faces-length->=L cubic plane: V - E + F = 2, E = 3V/2,
|
||||
# sum face lengths = 3V, F = V/2 + 2, so min sum = L*(V/2 + 2)
|
||||
# <= 3V gives V >= 2L*(L-3)/(3-L/2)... let's just set V >= 20 for L=5.
|
||||
if min_face is not None and min_face >= 5:
|
||||
n_start = max(4, 20)
|
||||
else:
|
||||
n_start = 4
|
||||
|
||||
first_found = None
|
||||
for n in range(4, max_n + 1, 2): # cubic requires n even
|
||||
for n in range(n_start, max_n + 1, 2): # cubic requires n even
|
||||
start = time.time()
|
||||
count = 0
|
||||
skipped = 0
|
||||
found = None
|
||||
try:
|
||||
gen = graphs.planar_graphs(
|
||||
@@ -172,6 +198,11 @@ def main():
|
||||
for G in gen:
|
||||
if max(G.degree()) != 3:
|
||||
continue # not cubic
|
||||
if min_face is not None:
|
||||
G.is_planar(set_embedding=True)
|
||||
if min_face_length(G) < min_face:
|
||||
skipped += 1
|
||||
continue
|
||||
count += 1
|
||||
res = check_graph(G)
|
||||
if res is not None:
|
||||
@@ -180,8 +211,10 @@ def main():
|
||||
break
|
||||
elapsed = time.time() - start
|
||||
if found is None:
|
||||
print(f"n={n:>3}: checked {count} graphs, no counterexample "
|
||||
f"[{elapsed:.1f}s]")
|
||||
extra = (f", skipped {skipped} due to small face"
|
||||
if min_face is not None else "")
|
||||
print(f"n={n:>3}: checked {count} graphs, no counterexample"
|
||||
f"{extra} [{elapsed:.1f}s]")
|
||||
else:
|
||||
G, (col, K0, K1, h0, h1, a, b, c, e) = found
|
||||
colour_name = {0: 'red', 1: 'blue', 2: 'green'}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
"""Verify the n=28 counterexample (smallest dual of min-degree-5
|
||||
triangulation that violates the face-length-≥-5 form of Conjecture
|
||||
5.5) and render a planar PNG of it.
|
||||
|
||||
The graph H is the planar dual of a 16-vertex triangulation with
|
||||
min degree ≥ 5 (the 3rd one in sage's enumeration). It has 28
|
||||
vertices, 42 edges, and all faces of length ≥ 5. The colouring shown
|
||||
below makes K_{red, blue} and K_{red, green} both 12-cycles sharing
|
||||
the colour-red edge (0, 1) with h_φ ≡ -1 on each.
|
||||
|
||||
Run with: sage experiments/verify_28_vertex_counterexample.py
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
import math
|
||||
|
||||
from sage.all import Graph
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
sys.path.insert(0, HERE)
|
||||
from search_smaller_counterexample import (
|
||||
edge_key, heawood_numbers, trace_kempe,
|
||||
)
|
||||
|
||||
OUT_PNG = os.path.join(HERE, '..', 'figures', 'min-face-5-counterexample.png')
|
||||
|
||||
# Dual edges and the discovered colouring (sorted-edge order).
|
||||
EDGES_LIST = [
|
||||
(0, 1), (0, 4), (0, 6), (1, 2), (1, 5), (2, 3), (2, 8), (3, 4),
|
||||
(3, 11), (4, 13), (5, 7), (5, 9), (6, 7), (6, 15), (7, 17),
|
||||
(8, 10), (8, 12), (9, 10), (9, 19), (10, 20), (11, 12), (11, 14),
|
||||
(12, 22), (13, 14), (13, 16), (14, 23), (15, 16), (15, 18),
|
||||
(16, 25), (17, 18), (17, 19), (18, 26), (19, 21), (20, 21),
|
||||
(20, 22), (21, 27), (22, 24), (23, 24), (23, 25), (24, 27),
|
||||
(25, 26), (26, 27),
|
||||
]
|
||||
COLOURING = (0, 1, 2, 2, 1, 1, 0, 2, 0, 0, 2, 0, 1, 0, 0, 1, 2, 2,
|
||||
1, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 0, 2, 1, 1,
|
||||
2, 1, 2, 0, 1, 2)
|
||||
COLOUR_NAME = {0: 'red', 1: 'blue', 2: 'green'}
|
||||
|
||||
|
||||
def build():
|
||||
G = Graph(multiedges=False, loops=False)
|
||||
for u, v in EDGES_LIST:
|
||||
G.add_edge(u, v)
|
||||
# Sage's sorted edges should align with EDGES_LIST.
|
||||
edges_sorted = sorted([edge_key(u, v) for (u, v) in G.edge_iterator(labels=False)])
|
||||
assert edges_sorted == EDGES_LIST, "edge order mismatch"
|
||||
col_of_edge = {edges_sorted[i]: COLOURING[i] for i in range(len(edges_sorted))}
|
||||
return G, col_of_edge
|
||||
|
||||
|
||||
def main():
|
||||
G, col_of_edge = build()
|
||||
print(f"|V| = {G.order()}, |E| = {G.size()}")
|
||||
assert G.is_planar(set_embedding=True)
|
||||
print(f"face lengths: {sorted([len(f) for f in G.faces()])}")
|
||||
assert all(len(f) >= 5 for f in G.faces()), "face length < 5"
|
||||
# Verify proper 3-edge-colouring.
|
||||
for v in G.vertex_iterator():
|
||||
cs = sorted(col_of_edge[edge_key(v, u)] for u in G.neighbors(v))
|
||||
assert cs == [0, 1, 2], f"vertex {v} colours {cs}"
|
||||
print("proper 3-edge-colouring ✓")
|
||||
|
||||
h = heawood_numbers(G, col_of_edge)
|
||||
plus = sum(1 for v in h if h[v] == +1)
|
||||
minus = sum(1 for v in h if h[v] == -1)
|
||||
print(f"global h_φ: {plus} (+1) / {minus} (-1)")
|
||||
|
||||
# Verify both Kempe cycles through (0, 1) are constant.
|
||||
K0 = trace_kempe(G, col_of_edge, (0, 1), (0, 1)) # red+blue
|
||||
K1 = trace_kempe(G, col_of_edge, (0, 1), (0, 2)) # red+green
|
||||
h_K0 = [h[v] for v in K0]
|
||||
h_K1 = [h[v] for v in K1]
|
||||
print(f"K_{{red, blue}} (len {len(K0)}): {K0}, h = {h_K0[0]} (const? {len(set(h_K0))==1})")
|
||||
print(f"K_{{red, green}} (len {len(K1)}): {K1}, h = {h_K1[0]} (const? {len(set(h_K1))==1})")
|
||||
print(f"V(K0) ∪ V(K1)| = {len(set(K0) | set(K1))} / {G.order()}")
|
||||
|
||||
# Canonical graph6
|
||||
print(f"canonical graph6 = {G.canonical_label().graph6_string()}")
|
||||
|
||||
# Render PNG with planar layout
|
||||
import matplotlib
|
||||
matplotlib.use('Agg')
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
pos = G.layout_planar()
|
||||
fig, ax = plt.subplots(figsize=(10, 10), dpi=160)
|
||||
ax.set_aspect('equal')
|
||||
ax.axis('off')
|
||||
for (u, v) in G.edge_iterator(labels=False):
|
||||
c = COLOUR_NAME[col_of_edge[edge_key(u, v)]]
|
||||
x1, y1 = pos[u]; x2, y2 = pos[v]
|
||||
ax.plot([x1, x2], [y1, y2], color=c, linewidth=2.0, solid_capstyle='round')
|
||||
K0set = set(K0); K1set = set(K1)
|
||||
for v, (x, y) in pos.items():
|
||||
if v in K0set and v in K1set:
|
||||
face_c = '#bbbbff' # on both cycles
|
||||
elif v in K0set or v in K1set:
|
||||
face_c = '#ddddff'
|
||||
else:
|
||||
face_c = 'lightgrey'
|
||||
ax.plot(x, y, 'o', markersize=18, markerfacecolor=face_c,
|
||||
markeredgecolor='black', markeredgewidth=1.0)
|
||||
ax.text(x, y, str(v), ha='center', va='center', fontsize=8)
|
||||
xs = [p[0] for p in pos.values()]
|
||||
ys = [p[1] for p in pos.values()]
|
||||
pad = 0.5
|
||||
ax.set_xlim(min(xs) - pad, max(xs) + pad)
|
||||
ax.set_ylim(min(ys) - pad, max(ys) + pad)
|
||||
os.makedirs(os.path.dirname(OUT_PNG), exist_ok=True)
|
||||
fig.tight_layout()
|
||||
fig.savefig(OUT_PNG, dpi=160, bbox_inches='tight')
|
||||
plt.close(fig)
|
||||
print(f"\nWrote: {OUT_PNG}")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user