Interface MinimumVertexCutAllGlobal
-
- All Known Implementing Classes:
MinimumVertexCutAllGlobalAbstract
,MinimumVertexCutAllGlobalKanevsky
public interface MinimumVertexCutAllGlobal
Minimum Vertex-Cut algorithm that finds all minimum vertex-cuts in a graph (global vertex-cut).Given a graph \(G=(V,E)\), a vertex cut (or separating set) is a set of vertices \(C\) whose removal transforms \(G\) into a disconnected graph. In case the graph is a clique of size \(k\), any vertex set of size \(k-1\) is considered by convention a vertex cut of the graph. Given a vertex weight function, the weight of a vertex-cut \(C\) is the weight sum of all vertices in \(C\). There are two variants of the problem to find a minimum weight vertex-cut: (1) With terminal vertices, and (2) without terminal vertices. In the variant with terminal vertices, we are given two special vertices
source (S)
andsink (T)
and we need to find the minimum vertex-cut \(C\) such that such that thesource
and thesink
are not in the same connected components after the removal of the vertices of \(C\). In the variant without terminal vertices (also called 'global vertex-cut') we need to find the minimal cut among all possible cuts, and the removal of the vertices of \(C\) should simply disconnect the graph (or make it trivial, containing a single vertex).Algorithms implementing this interface compute all minimum vertex-cuts without terminal vertices. For a single minimum cut global cut, use
MinimumVertexCutGlobal
. For the variant with terminal vertices, seeMinimumVertexCutSt
orMinimumVertexCutAllSt
.The cardinality (unweighted) global minimum vertex-cut is equal to the vertex connectivity of a graph.
Use
newInstance()
to get a default implementation of this interface.- Author:
- Barak Ugav
- See Also:
MinimumVertexCutGlobal
,MinimumVertexCutAllSt
,MinimumVertexCutSt
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <V,E>
List<Set<V>>allMinimumCuts(Graph<V,E> g, WeightFunction<V> w)
Find all the minimum vertex-cuts in a graph.<V,E>
Iterator<Set<V>>minimumCutsIter(Graph<V,E> g, WeightFunction<V> w)
Iterate over all the minimum vertex-cuts in a graph.static MinimumVertexCutAllGlobal
newInstance()
Create a new global minimum all vertex-cuts algorithm object.
-
-
-
Method Detail
-
minimumCutsIter
<V,E> Iterator<Set<V>> minimumCutsIter(Graph<V,E> g, WeightFunction<V> w)
Iterate over all the minimum vertex-cuts in a graph.Given a graph \(G=(V,E)\), a vertex-cut is a set of vertices whose removal disconnect graph into more than one connected components.
If
g
is anIntGraph
, the returned iterator will iterate overIntSet
objects. In that case, its better to pass aIWeightFunction
asw
to avoid boxing/unboxing.- Type Parameters:
V
- the vertices typeE
- the edges type- Parameters:
g
- the graphw
- a vertex weight function- Returns:
- an iterator over all the minimum vertex-cuts in a graph
-
allMinimumCuts
default <V,E> List<Set<V>> allMinimumCuts(Graph<V,E> g, WeightFunction<V> w)
Find all the minimum vertex-cuts in a graph.Given a graph \(G=(V,E)\), a vertex-cut is a set of vertices whose removal disconnect graph into more than one connected components.
If
g
is anIntGraph
, the returned list will containIntSet
objects. In that case, its better to pass aIWeightFunction
asw
to avoid boxing/unboxing.- Type Parameters:
V
- the vertices typeE
- the edges type- Parameters:
g
- the graphw
- a vertex weight function- Returns:
- a list of all the minimum vertex-cuts in a graph
-
newInstance
static MinimumVertexCutAllGlobal newInstance()
Create a new global minimum all vertex-cuts algorithm object.This is the recommended way to instantiate a new
MinimumVertexCutAllGlobal
object.- Returns:
- a default implementation of
MinimumVertexCutAllGlobal
-
-