









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Show that the Hitting Set problem is NP-complete: Input: A collection C of subsets of a set S, positive integer k. Question: Does S contain a subset S′^ such that |S′| ≤ k and each subset in C contains at least one element from S′?
Proving that problems are hard is an skill. Once you get the hang of it, it is surprisingly straightforward and pleasurable to do. Indeed, the dirty little secret of NP-completeness proofs is that they are usually easier to recreate than explain, in the same way that it is usually easier to rewrite old code than the try to understand it. I offer the following advice to those needing to prove the hardness of a given problem:
Don’t be afraid to add extra constraints or weights or freedoms in order to make your problem more general (at least temporarily).
Selecting the right source problem makes a big difference is how difficult it is to prove a problem hard. This is the first and easiest place to go wrong. I usually consider four and only four problems as candidates for my hard source problem. Limiting them to four means that I know a lot about these problems – which variants of these problems are hard and which are soft. My favorites are:
You are trying to translate one problem into another, while making them stay the same as much as possible. The easiest way to do this is to be bold with your penalties, to punish anyone trying to deviate from your proposed solution. “If you pick this, then you have to pick up this huge set which dooms you to lose.” The sharper the consequences for doing what is undesired, the easier it is to prove if and only if.
You should be asking these kinds of questions. “How can I force that either A or B but not both are chosen?” “How can I force that A is taken before B?” “How can I clean up the things I did not select?”
To demonstrate how one goes about proving a problem hard, I accept the challenge of showing how a proof can be built on the fly. I need a volunteer to pick a random problem from the 400+ hard problems in the back of Garey and Johnson.
Open: Graph Isomorphism, Factoring Integers.
Just changing a problem a little can make the difference between it being in P or N P -complete:
P N P -complete Shortest Path Longest Path Eulerian Circuit Hamiltonian Circuit Edge Cover Vertex Cover
The first thing you should do when you suspect a problem might be NP-complete is look in Garey and Johnson, Computers and Intractability.