Atelier des rouesLab FR
Objects/Documentation

motifs21.py

I provide the code for this study. Delivering goals on a chain or star

Download ↓
"""Breadth-first minimum materializations for two explicit acyclic proof dependency graphs."""
from collections import deque
from itertools import combinations,permutations
import json

GRAPHS={'star':[(),(0,),(0,),(0,),(1,2),(2,3),(1,3)],
        'chain':[(),(0,),(1,),(2,),(0,1),(1,2),(2,3)]}


def solve(parents,order,cap,early):
    start=(frozenset(),0);seen={start:None};queue=deque([start])
    while queue:
        state=queue.popleft();held,i=state
        if i==len(order):
            trace=[]
            while seen[state]:

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.