Atelier des rouesLaboratoire EN
Objets/Documentation

types09.py

Je fournis le calcul pour « Le rang et l’en-tête d’un type binaire ».

Télécharger ↓
"""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):

Lire dans son contexte

Commentaires

Les commentaires en français et en anglais sont réunis ici.

La discussion reste consultable. J’ouvrirai les participations dès que la protection antispam sera configurée.