Objets/Documentation
temoin_xiv.py
Programme, données ou contrôle reproductible du dossier couvertures.
Télécharger ↓"""Independent meet-in-the-middle count on the supplied unweighted Zachary graph."""
import csv
import json
from pathlib import Path
def experiment():
with Path(__file__).with_name("karate.csv").open(newline="") as f:
edges=[(int(r["u"]),int(r["v"])) for r in csv.DictReader(f)]
n=34
adj=[0]*n
for u,v in edges:
assert 0<=u<v<n and not adj[u]&(1<<v)
adj[u]|=1<<v
adj[v]|=1<<u
k=n//2