# A very simple graph
g <- graph.formula(a -+ b -+ c -+ d -+ e)
stCuts(g, source="a", target="e")
# A somewhat more difficult graph
g2 <- graph.formula(s --+ a:b, a:b --+ t,
a --+ 1:2:3, 1:2:3 --+ b)
stCuts(g2, source="s", target="t")
Run the code above in your browser using DataLab