Atelier des rouesLab FR
Objects/Documentation

temoin_xiv.py

Code, data or reproducible check for the couvertures dossier.

Download ↓
"""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

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.