Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

networkx.algorithms.connectivity.edge_augmentation.is_k_edge_connected

is_k_edge_connected(G, k)[source]

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

Is it impossible to disconnect the graph by removing fewer than k edges? If so, then G is k-edge-connected.

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

  • k (integer) – edge connectivity to test for

Returns

True if G is k-edge-connected.

Return type

boolean

Example

>>> G = nx.barbell_graph(10, 0)
>>> nx.is_k_edge_connected(G, k=1)
True
>>> nx.is_k_edge_connected(G, k=2)
False