Atelier des rouesLab FR
Objects/Documentation

bords31.py

Counting schedules lost at the endpoints · bords31.py

Download ↓
"""Count all six rotations by visit order and the two boundary slots."""
from itertools import combinations
from math import comb
from functools import lru_cache
import json
from longueurs28 import transfer
from strate29 import accepts

def predict(n,rotation,k,check=False):
    import numpy as np
    pattern=(2,0,2)*2;sizes=pattern[rotation:]+pattern[:rotation]
    active=[i for i,v in enumerate(sizes) if v];pairs=list(combinations(range(n),2));mats=[];tests=0
    for a,b in zip(active,active[1:]+active[:1]):
        entries=[]
        for left in pairs:
            row=[]

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.