To show that the Intersecting Set problem is NP-complete, we need to do two things:
-
Show that the problem is in NP: Given a candidate solution ( S \subseteq U ), we can verify in polynomial time whether:
- For every ( Y \in F ), ( S \cap Y \neq \emptyset ).
- For every ( Z \in A ), ( |S \cap Z| \leq b(Z) ).
Since verification can be done efficiently, the problem is in NP.
-
Show that the problem is NP-hard by reducing a known NP-complete problem to it. We will reduce the well-known Vertex Cover problem to the Intersecting Set problem.
Vertex Cover Problem: Given a graph ( G = (V, E) ) and an integer ( k ), determine whether there exists a subset ( C \subseteq V ) of size at most ( k ) such that every edge in ( E ) has at least one endpoint in ( C ).
Reduction to Intersecting Set Problem:
Given an instance of the Vertex Cover problem ( G = (V, E) ) and integer ( k ), we construct an instance of the Intersecting Set problem as follows:
-
Universe ( U ): Set of vertices ( V ). So ( U = V ).
-
Family ( F ): For each edge ( e = (u, v) \in E ), we define a subset ( Y_e \subseteq U ):
[
Y_e = {u, v}
]
So ( F = { Y_e \mid e \in E } ). Note that the sets ( Y_e ) are not necessarily disjoint because vertices can be shared between edges. However, we will adjust this in our reduction.
To ensure that the subsets in ( F ) are disjoint (as required), we introduce unique copies of vertices for each edge:
-
For each edge ( e = (u, v) \in E ), create unique elements ( u_e ) and ( v_e ).
-
Adjusted Universe ( U' ): All these unique vertex copies:
[
U' = { u_e, v_e \mid e = (u, v) \in E }
]
-
Adjusted Family ( F' ): Each edge corresponds to a unique set in ( F' ):
[
Y_e = { u_e, v_e }
]
Now, the sets ( Y_e ) are disjoint because each ( u_e ) and ( v_e ) are unique to their edge.
-
Family ( A ) and Budgets ( b(Z) ): For each original vertex ( v \in V ), we define:
[
Z_v = { v_e \mid v \text{ is an endpoint of edge } e }
]
Set the budget for each ( Z_v ) to be:
[
b(Z_v) = 1
]
This ensures that in any valid solution ( S ), we can select at most one copy of ( v ) across all its edges.
Correctness of the Reduction:
-
From Vertex Cover to Intersecting Set:
If there is a vertex cover ( C \subseteq V ) of size at most ( k ) in ( G ), we can construct a corresponding subset ( S \subseteq U' ) in the Intersecting Set problem as follows:
- For each edge ( e = (u, v) \in E ):
- If ( u \in C ), include ( u_e ) in ( S ).
- Else if ( v \in C ), include ( v_e ) in ( S ).
- Since ( C ) is a vertex cover, at least one of ( u ) or ( v ) is in ( C ), so ( S ) will intersect every ( Y_e ).
- Since each ( v \in V ) can only be used once (because of the budget ( b(Z_v) = 1 )), and ( |C| \leq k ), the total number of unique ( v_e ) included in ( S ) is at most ( k ).
-
From Intersecting Set to Vertex Cover:
Conversely, suppose we have a subset ( S \subseteq U' ) satisfying the Intersecting Set problem constraints, with ( |S| \leq k ). We can construct a vertex cover ( C \subseteq V ):
- For each ( v \in V ), if ( S \cap Z_v \neq \emptyset ), include ( v ) in ( C ).
- Since ( |S \cap Z_v| \leq 1 ), each ( v ) is included at most once.
- For each edge ( e = (u,v) ), ( S ) must include either ( u_e ) or ( v_e ) (since ( S ) intersects ( Y_e )), so at least one of ( u ) or ( v ) is in ( C ).
-
Since the sizes correspond (( |C| = |S| )), and budgets ensure no vertex is counted more than once, the Intersecting Set solution corresponds to a vertex cover of ( G ).
Conclusion:
-
Since Vertex Cover is NP-complete and can be reduced to the Intersecting Set problem in polynomial time, the Intersecting Set problem is NP-hard.
-
Combined with the fact that it's in NP, the Intersecting Set problem is NP-complete.
Therefore, the Intersecting Set problem is NP-complete.