Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proving NP-Completeness of a problem

We are given a set A = {a1,a2,...,an}

Given subsets of A named B1,B2, ..., Bm. If a subset of A named H has intersection with all given B's, we call H "Covering subset". Is there any "covering subset" of size K (cardinality of H is K) for given A and Bs? Prove that this problem is NP-Complete.

We should reduce some known problem to "covering subset" problem.

like image 507
parsa rastegari Avatar asked Feb 03 '26 22:02

parsa rastegari


1 Answers

update This is called a hitting set. You can read the same answer in wikipedia article.

This problem is, in a way, dual to set cover problem.

We'll change some terminology. Let {B1, B2, ...} be elements and {a1, a2, ...} be sets. 'Set' ai contains 'element' Bj in a new problem if set Bj contains ai in original problem.

Now, you just need to select minimum number of 'sets' ai covering all 'elements' Bj. And that problem is NP-complete, as shown in the link above.

To clarify the transformation, one problem definition can be produced from another just by replacing set/element and contains/contained. Compare following

Every set Bj contains some selected element ai
Every 'element' Bj is contained by some selected 'set' ai

like image 154
Nikita Rybak Avatar answered Feb 05 '26 11:02

Nikita Rybak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!