Back the 2^(n-2) floor with validated diverse-disk search
The stacked-only search missed non-stacked disks, and cocircular boundary points gave degenerate Delaunay (invalid disks, spurious sub-floor |Phi|). Add floor_diverse_disks.py: 1700+ validated disks per n (convex non- cocircular boundary, face-count and boundary-edge checks) confirm min|Phi| = 2^(n-2). Note records that interior structure tends to ENLARGE Phi (wheel 5 vs fan 4) and that depth adds two faces per one constraint. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+94
@@ -0,0 +1,94 @@
|
||||
"""
|
||||
Robustness check for the 2^(n-2) constraint floor over DIVERSE (not just stacked)
|
||||
triangulated disks.
|
||||
|
||||
maximally_constrain.py searches Apollonian-stacked disks only, which miss
|
||||
non-stacked triangulations (e.g. a wheel with a high-degree center). Here we
|
||||
generate disks from random interior points + Delaunay, with boundary points in
|
||||
convex but NON-cocircular position (cocircular boundary points are a Delaunay
|
||||
degeneracy that yields INVALID disks -- missing a boundary edge -- and spuriously
|
||||
report sub-floor |Phi|). Every disk is validated (2k+n-2 faces, all n boundary
|
||||
edges present) before Phi is computed.
|
||||
|
||||
Finding: min |Phi| over validated diverse disks is exactly 2^(n-2), attained by
|
||||
the interior-free triangulation; deeper structure never goes below it (and the
|
||||
central-apex wheel actually ENLARGES Phi: 5 vs the fan's 4 on the 4-cycle).
|
||||
"""
|
||||
|
||||
import sys
|
||||
from collections import Counter
|
||||
from itertools import product
|
||||
|
||||
import numpy as np
|
||||
from scipy.spatial import Delaunay
|
||||
|
||||
np.seterr(all="ignore")
|
||||
|
||||
|
||||
def disk(n, k, rng):
|
||||
ang = 2 * np.pi * np.arange(n) / n
|
||||
rad = 1.0 + 0.15 * rng.random(n) # convex but not cocircular
|
||||
bpts = np.c_[rad * np.cos(ang), rad * np.sin(ang)]
|
||||
if k:
|
||||
r = 0.75 * np.sqrt(rng.random(k)); t = 2 * np.pi * rng.random(k)
|
||||
ipts = np.c_[r * np.cos(t), r * np.sin(t)]
|
||||
pts = np.vstack([bpts, ipts])
|
||||
else:
|
||||
pts = bpts
|
||||
tri = Delaunay(pts)
|
||||
return [tuple(int(x) for x in s) for s in tri.simplices]
|
||||
|
||||
|
||||
def valid(faces, n, k):
|
||||
if len(faces) != 2 * k + n - 2:
|
||||
return False
|
||||
ec = Counter()
|
||||
for a, b, c in faces:
|
||||
for e in ((a, b), (b, c), (a, c)):
|
||||
ec[frozenset(e)] += 1
|
||||
return all(ec[frozenset((i, (i + 1) % n))] == 1 for i in range(n))
|
||||
|
||||
|
||||
def phi(faces, n, k):
|
||||
F = len(faces)
|
||||
interior = list(range(n, n + k))
|
||||
Bint = np.zeros((len(interior), F), dtype=np.int64)
|
||||
Cinc = np.zeros((n, F), dtype=np.int64)
|
||||
for j, (a, b, c) in enumerate(faces):
|
||||
for v in (a, b, c):
|
||||
if v >= n:
|
||||
Bint[interior.index(v), j] = 1
|
||||
else:
|
||||
Cinc[v, j] = 1
|
||||
labs = np.array(list(product((1, 2), repeat=F)), dtype=np.int64)
|
||||
if interior:
|
||||
labs = labs[np.all((labs @ Bint.T) % 3 == 0, axis=1)]
|
||||
if labs.shape[0] == 0:
|
||||
return set()
|
||||
return set(map(tuple, np.unique((labs @ Cinc.T) % 3, axis=0)))
|
||||
|
||||
|
||||
def main():
|
||||
ns = [int(x) for x in sys.argv[1:]] or [4, 5, 6]
|
||||
rng = np.random.default_rng(1)
|
||||
print("Min |Phi| over validated diverse (Delaunay) disks\n")
|
||||
for n in ns:
|
||||
best = 10 ** 9; bk = None; nval = 0; max_seen = 0
|
||||
for k in range(0, 7):
|
||||
for _ in range(250):
|
||||
faces = disk(n, k, rng)
|
||||
if not valid(faces, n, k) or len(faces) > 20:
|
||||
continue
|
||||
nval += 1
|
||||
P = phi(faces, n, k)
|
||||
if P:
|
||||
max_seen = max(max_seen, len(P))
|
||||
if len(P) < best:
|
||||
best = len(P); bk = k
|
||||
print(f" n={n}: {nval} valid disks min|Phi|={best} (k={bk}) "
|
||||
f"max|Phi|={max_seen} 2^(n-2)={2**(n-2)} "
|
||||
f"below-floor={best < 2**(n-2)}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user