average_vertex_connectivity

average_vertex_connectivity#

graph_tool.flow.average_vertex_connectivity(g, approx=False)[git][source]#

Compute the average number of internally vertex-disjoint paths between the pairs of vertices.

Parameters:
gGraph

Graph to be used.

approxbool (optional, default: False)

If True, the fast lower bound described in all_pairs_vertex_connectivity() is used.

Returns:
kappafloat

The average connectivity.

See also

vertex_connectivity

Vertex connectivity

all_pairs_vertex_connectivity

Vertex connectivity of all pairs

Notes

The average connectivity [beineke-average-2002] is

\[\bar\kappa = \frac{1}{V(V-1)}\sum_{s\neq t}\kappa(s,t),\]

where \(\kappa(s,t)\) is the maximum number of internally vertex-disjoint paths from \(s\) to \(t\) (see all_pairs_vertex_connectivity()), and the sum runs over the ordered pairs. Unlike the vertex connectivity (see vertex_connectivity()), it is not determined by the weakest pair. The values are computed as in all_pairs_vertex_connectivity(), in parallel, and without storing them, in time \(O(\bar\kappa V^2 E)\).

Parallel edges and self-loops are ignored.

Parallel implementation.

If enabled during compilation, this algorithm will run in parallel using OpenMP. See the parallel algorithms section for information about how to control several aspects of parallelization.

References

[beineke-average-2002]

Lowell W. Beineke, Ortrud R. Oellermann and Ronald E. Pippert, “The average connectivity of a graph”, Discrete Mathematics 252, 31-45 (2002), DOI: 10.1016/S0012-365X(01)00180-7 [sci-hub, @tor]

Examples

>>> g = gt.collection.data["karate"]
>>> print(gt.average_vertex_connectivity(g))
2.2174688...