all_minimum_vertex_separators

all_minimum_vertex_separators#

graph_tool.flow.all_minimum_vertex_separators(g, max_n=0)[git][source]#

Return all minimum vertex separators of an undirected graph.

Parameters:
gGraph

Undirected graph to be used.

max_nint (optional, default: 0)

If positive, at most this number of separators is returned.

Returns:
separatorslist of numpy.ndarray

The vertices of every minimum separator, i.e. of every set of \(\kappa\) vertices whose removal disconnects the graph, where \(\kappa\) is its vertex connectivity.

See also

all_minimal_separators

All inclusion-minimal vertex separators

vertex_connectivity

Vertex connectivity

all_minimum_st_cuts

All minimum s-t edge cuts

Notes

The separators are found with the method of Kanevsky [kanevsky-finding-1993]: for a set \(X\) of \(\kappa\) vertices of largest degree, every minimum separator is either \(X\) itself or misses a vertex \(x\in X\), and then it is a minimum separator between \(x\) and some non-neighbor of it. These are enumerated from the residual networks of the corresponding maximum flows, as in all_minimum_st_cuts(). The algorithm needs \(O(\kappa V)\) maximum flows, plus \(O(V(V+E))\) time per separator found. If \(\kappa = 1\), the separators are the articulation points, which are found in time \(O(V + E)\). Disconnected and complete graphs have no separators (an empty list is returned).

References

[kanevsky-finding-1993]

Arkady Kanevsky, “Finding all minimum-size separating vertex sets in a graph”, Networks 23, 533-541 (1993), DOI: 10.1002/net.3230230604 [sci-hub, @tor]

Examples

>>> g = gt.collection.data["karate"]
>>> print(gt.all_minimum_vertex_separators(g))
[array([0], dtype=uint64)]