Objects/Documentation
stables18.py
Require a vertex · Reproducible Python implementation.
Download ↓"""Conditional independence polynomial of the unweighted 34-vertex karate graph."""
import csv
import json
from functools import lru_cache
from pathlib import Path
from itertools import combinations
@lru_cache(maxsize=1)
def graph():
n=34
adj=[0]*n
with Path(__file__).with_name("karate.csv").open() as stream:
for line in csv.DictReader(stream):
a,b=int(line["u"]),int(line["v"])
adj[a]|=1<<b