Quick example with minibn#
import mpbn
from colomoto_jupyter import tabulate
mbn = mpbn.MPBooleanNetwork({
"a": "!b",
"b": "!a",
"c": "!a & b"
})
c0 = dict(a=0, b=0, c=0)
c1 = dict(a=1, b=1, c=1)
c2 = dict(a=0, b=1, c=0)
a = list(mbn.attractors())
tabulate(a)
a | b | c | |
---|---|---|---|
0 | 0 | 1 | 1 |
1 | 1 | 0 | 0 |
mbn.reachability(c0, c1)
True
mbn.reachability(c0, a[0])
True
mbn.reachability(a[1], a[0])
False
ra = mbn.attractors(reachable_from=c2)
tabulate(ra)
a | b | c | |
---|---|---|---|
0 | 0 | 1 | 1 |