Warning

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

networkx.algorithms.covering.is_edge_cover

is_edge_cover(G, cover)[source]

Decides whether a set of edges is a valid edge cover of the graph.

Given a set of edges, whether it is an edge covering can be decided if we just check whether all nodes of the graph has an edge from the set, incident on it.

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

  • cover (set) – Set of edges to be checked.

Returns

Whether the set of edges is a valid edge cover of the graph.

Return type

bool

Notes

An edge cover of a graph is a set of edges such that every node of the graph is incident to at least one edge of the set.