Atelier des rouesLab FR
Objects/Documentation

obstruction33.py

A conflict that disappears when I remove a visit · obstruction33.py

Download ↓
"""Unbounded minimal obstructions to dwell completion on a three-letter alphabet."""
from itertools import combinations, product
from sejour32 import automaton, cuts
import json

def pattern(d,n):
    if d<2 or n<4:raise ValueError('d >= 2 and n >= 4 required')
    times=[0]
    for gap in [1]+[d]*(n-3)+[d-1]:times.append(times[-1]+gap)
    return [(a,i%3) for i,a in enumerate(times)]
def feasible(visits,d):
    if not visits:return True
    return automaton([(a+d,x) for a,x in visits],visits[-1][0]+1+2*d,d)
def study():
    out=[]
    for d,n in product(range(2,7),range(4,17)):

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.