In graph theory, an edge cover of a graph is a set of edges such that every vertex of the graph is incident to at least one edge of the set.In computer science, the minimum edge cover problem is the problem of finding an edge cover of minimum size. It is an optimization problem that belongs to the class of covering problems and can be solved in polynomial time.
Formally, an edge cover of a graph is a set of edges such that each vertex in is incident with at least one edge in . The set is said to cover the vertices of . The following figure shows examples of edge coverings in two graphs (the set is marked with red).
A minimum edge covering is an edge covering of smallest possible size. The edge covering number is the size of a minimum edge covering. The following figure shows examples of minimum edge coverings (again, the set is marked with red).
Note that the figure on the right is not only an edge cover but also a matching. In particular, it is a perfect matching: a matching in which every vertex is incident with exactly one edge in . A perfect matching (if it exists) is always a minimum edge covering.
A smallest edge cover can be found in polynomial time by finding a maximum matching and extending it greedily so that all vertices are covered.[1] In the following figure, a maximum matching is marked with red; the extra edges that were added to cover unmatched nodes are marked with blue. (The figure on the right shows a graph in which a maximum matching is a perfect matching; hence it already covers all vertices and no extra edges were needed.)
On the other hand, the related problem of finding a smallest vertex cover is an NP-hard problem.[2]
Looking at the image it already becomes obvious why, for a given minimum edge cover
C
M
c
m
C
M
|V|=c+m
C
C
m
2m
c-m
C
|V|
|V|=2m+(c-m)