#!/usr/bin/env python3 """Job 975: depth-1 (one-anchor) frontier at the frozen support a = 9409. For n = 47..52 and every anchor q0 in Q = 101..193: count the phases b whose residual LP is not closed by an integer-rechecked strict certificate. An anchor closes n at depth 1 iff that count is 0. Reuses anchor975.py's LP and checks. .venv/bin/python frontier975.py > frontier975.out """ import sys import anchor975 as a9 sys.stdout.reconfigure(newline='\n') print('n\tL\tanchors closing at depth 1 (q0)\tmin over q0 of #unclosed phases (q0)') for n in range(47, 53): D = a9.rw.slots_from(a9.A, n, a9.OLD) closes, best = [], None for q0 in a9.QS0: bad = sum(1 for b in range(q0) if a9.branch(D, q0, b)[2][0] != 'STRICT') if bad == 0: closes.append(q0) if best is None or bad < best[0]: best = (bad, q0) print(f'{n}\t{D[-1] - a9.A + 1}\t{",".join(map(str, closes)) or "none"}\t{best[0]} ({best[1]})')