Atelier des rouesLab FR
Objects/Documentation

ambiguite.py

I provide the computation for “Two geodesics at the same isolation count”.

Download ↓
"""Count increasing suffix-reversal paths and endpoint multiplicities."""
from collections import Counter, defaultdict
import json


def gaps(perm):
    path=(-1,)+perm
    return sum(abs(a-b)!=1 for a,b in zip(path,path[1:]))


def experiment(k=9,d=4):
    initial=tuple(range(k))
    layer=Counter({initial:1})
    for step in range(1,d+1):
        after=Counter()
        for perm,n in layer.items():

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.