Atelier des rouesLab FR
Objects/Documentation

kernels_audit.py

A breadth-first search gives exact distances for the strip reductions. I test the two-representative failure and the signed variant separately.

Download ↓
"""Independent BFS audit of unsigned strip compression; signed contraction test."""
from collections import deque
from math import factorial
from itertools import permutations,product
import csv
from pathlib import Path

def bands(q,signed=False):
    out=[]
    for x in q:
        if out and (x==out[-1][-1]+1 if signed else abs(x-out[-1][-1])==1):out[-1].append(x)
        else:out.append([x])
    return out

def reduce_unsigned(q,m):
    out=[]

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.