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=[]