dwave_networkx.algorithms.cover.is_vertex_cover

is_vertex_cover(G, vertex_cover)[source]

Determines whether a given set of vertices is a cover.

A vertex cover is a set of vertices such that each edge of the graph is incident with at least one vertex in the set.

Parameters:
  • G (NetworkX graph) –
  • vertex_cover – Iterable of nodes that the form a the minimum vertex cover, as determined by the given sampler.
Returns:

is_cover – True if the given iterable forms a vertex cover.

Return type:

bool