Last chance! 50% off unlimited learning
Sale ends in
Listing all minimum
st_min_cuts(graph, source, target, capacity = NULL)
The input graph. It must be directed.
The id of the source vertex.
The id of the target vertex.
Numeric vector giving the edge capacities. If this is
NULL
and the graph has a weight
edge attribute, then this
attribute defines the edge capacities. For forcing unit edge capacities,
even for graphs that have a weight
edge attribute, supply NA
here.
A list with entries:
Numeric scalar, the size of the minimum cut(s).
A list of numeric vectors containing edge ids.
Each vector is a minimum
A list of
numeric vectors containing vertex ids, they correspond to the edge cuts.
Each vertex set is a generator of the corresponding cut, i.e. in the graph
Given a
The size of an
An
JS Provan and DR Shier: A Paradigm for listing (s,t)-cuts in graphs, Algorithmica 15, 351--372, 1996.
# NOT RUN {
# A difficult graph, from the Provan-Shier paper
g <- graph_from_literal(s --+ a:b, a:b --+ t,
a --+ 1:2:3:4:5, 1:2:3:4:5 --+ b)
st_min_cuts(g, source="s", target="t")
# }
Run the code above in your browser using DataLab