Set cover problem with constant 2

85 Views Asked by At

I have a question about the Set Cover problem: If I get a universe U, m subsets that the size of each subset is exactly 2, and an integer k. Is this problem is still NP-C or I can solve it on a polynomial time?

Thanks.

1

There are 1 best solutions below

0
On

The SET COVER problem with all sets having size 2 is equivalent to the EDGE COVER problem (each element in $U$ becomes a vertex in the graph, and each subset becomes an edge).

EDGE COVER can be solved in polynomial time by constructing a maximum matching (for example, using Edmond's algorithm) and then extending the matching to cover all the vertices.