To show that the Intersecting Set problem is NP-complete, we need to demonstrate two things:
- The problem is in NP.
- The problem is NP-hard (i.e., any problem in NP can be reduced to it in polynomial time).
We will proceed by first showing that the problem is in NP and then reducing a known NP-complete problem to our Intersecting Set problem.
1. The Intersecting Set Problem is in NP
Given a candidate solution ( S \subseteq U ), we can verify in polynomial time whether:
- For each ( Y \in F ), ( S \cap Y \neq \emptyset ).
- For each ( Z \in A ), ( |Z \cap S| \leq b(Z) ).
Since checking these conditions involves simple set operations and cardinality comparisons that can be done in polynomial time, the Intersecting Set problem is in NP.
2. The Intersecting Set Problem is NP-Hard
We will reduce from the Exact Cover by 3-Sets (X3C) problem, which is known to be NP-complete.
Exact Cover by 3-Sets (X3C):
- Instance: A universe ( U ) of ( 3q ) elements and a collection ( C ) of subsets of ( U ), each of size exactly 3.
- Question: Does there exist an exact cover of ( U ), i.e., a subcollection ( C' \subseteq C ) such that every element of ( U ) occurs in exactly one member of ( C' )?
Reduction to Intersecting Set Problem:
Given an instance of X3C, we will construct an instance of the Intersecting Set problem.
-
Universe ( U' ): We create a new universe ( U' ) consisting of elements ( (e, S) ) where ( e \in U ) and ( S \in C ) with ( e \in S ), along with additional elements ( z_S ) for each ( S \in C ). Formally,
[
U' = { (e, S) \mid e \in S, S \in C } \cup { z_S \mid S \in C }
]
-
Family ( F ) of Disjoint Subsets: For each ( S \in C ), define ( Y_S = { z_S } ). Thus, ( F = { Y_S \mid S \in C } ) is a collection of disjoint singleton subsets.
-
Family ( A ) and Budgets:
- For each element ( e \in U ), define ( Z_e = { (e, S) \mid e \in S } ).
- Set ( b(Z_e) = 1 ) for all ( e \in U ).
- For each subset ( S \in C ), define ( Z'_S = { z_S } \cup { (e, S) \mid e \in S } ).
- Set ( b(Z'_S) = 4 ) for all ( S \in C ).
-
Goal: Find a subset ( S \subseteq U' ) of minimal size such that:
- For each ( Y_S \in F ), ( S \cap Y_S \neq \emptyset ) (i.e., ( z_S \in S ) for all ( S \in C )).
- For each ( Z_e \in A ), ( |S \cap Z_e| \leq 1 ).
- For each ( Z'_S \in A ), ( |S \cap Z'_S| \leq 4 ).
Correctness of the Reduction:
-
(⇒) Suppose there is an exact cover ( C' \subseteq C ) of ( U ). We construct the subset ( S \subseteq U' ) as follows:
- For each ( S \in C' ), include ( z_S ) and all elements ( (e, S) ) where ( e \in S ) (so ( |S \cap Z'_S| = 4 )).
- For each ( S \in C \setminus C' ), include only ( z_S ) (so ( |S \cap Z'_S| = 1 )).
This ensures:
- All ( z_S ) are included, so ( S \cap Y_S \neq \emptyset ) for all ( S \in C ).
- For each ( e \in U ), since ( C' ) is an exact cover, ( e ) occurs in exactly one ( S \in C' ), so ( |S \cap Z_e| = 1 ).
- The budgets ( b(Z_e) ) and ( b(Z'_S) ) are not exceeded.
-
(⇐) Conversely, suppose we have a feasible solution ( S \subseteq U' ) to the Intersecting Set problem. Since ( |S \cap Z_e| \leq 1 ) for each ( e \in U ), each ( e ) is associated with at most one subset ( S_e \in C ). Because we must cover all elements ( e ) (to meet the budget constraints for ( Z_e )), and since we included ( z_S ) for all ( S \in C ), the only way the budgets can be respected is if the subsets from which the elements ( (e, S) ) are selected are disjoint and cover ( U ). Thus, the subsets ( S_e ) form an exact cover of ( U ).
Conclusion:
The reduction from X3C to the Intersecting Set problem is polynomial-time computable and correct. Since X3C is NP-complete, and we've reduced it to the Intersecting Set problem, the Intersecting Set problem is NP-hard.
Combined with the earlier observation that the problem is in NP, we conclude that the Intersecting Set problem is NP-complete.
Therefore, the Intersecting Set problem is NP-complete by reduction from the Exact Cover by 3-Sets problem, ensuring the correctness through this reduction.