Atelier des rouesLab FR
Objects/Documentation

experience.py

Cause enumeration, independent path calculation and bridge test.

Download ↓
"""Shared Bernoulli causes in undirected simple two-terminal networks, vertices 0 and 1."""
from fractions import Fraction as F
from itertools import combinations, product
from math import prod
import json


def reachable(edges):
    seen = {0}
    while True:
        before = len(seen)
        for a, b in edges:
            if a in seen or b in seen:
                seen.update((a, b))
        if len(seen) == before:
            return seen

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.