networkx.algorithms.connectivity.edge_augmentation.is_locally_k_edge_connected¶

is_locally_k_edge_connected(G, s, t, k)[source]

Tests to see if an edge in a graph is locally k-edge-connected.

Is it impossible to disconnect s and t by removing fewer than k edges? If so, then s and t are locally k-edge-connected in G.

Parameters
• G (NetworkX graph) – An undirected graph.

• s (node) – Source node

• t (node) – Target node

• k (integer) – local edge connectivity for nodes s and t

Returns

True if s and t are locally k-edge-connected in G.

Return type

boolean

Example

>>> from networkx.algorithms.connectivity import is_locally_k_edge_connected
>>> G = nx.barbell_graph(10, 0)
>>> is_locally_k_edge_connected(G, 5, 15, k=1)
True
>>> is_locally_k_edge_connected(G, 5, 15, k=2)
False
>>> is_locally_k_edge_connected(G, 1, 5, k=2)
True