Atelier des rouesLab FR
Objects/Documentation

types09.py

I provide the computation for “A binary type rank and its header”.

Download ↓
"""Cross-check type cardinalities by words and a recurrence over remaining edges."""
from collections import Counter
from functools import lru_cache
from itertools import product
import json
from math import comb


def experiment(n=12):
    groups=Counter()
    for tail in product(range(2),repeat=n-1):
        w=(0,)+tail
        c=Counter(2*x+y for x,y in zip(w,w[1:]))
        groups[tuple(c[i] for i in range(4))]+=1
    @lru_cache(None)
    def ways(x,counts):

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.