1.6 KiB
1.6 KiB
Exam 2 Review
Reductions
We say that a problem A reduces to a problem B if there is a polynomial time reduction function f such that for all x, x \in A \iff f(x) \in B.
To prove a reduction, we need to show that the reduction function f:
- runs in polynomial time
x \in A \iff f(x) \in B.
Useful results from reductions
Bis at least as hard asAifA \leq B.- If we can solve
Bin polynomial time, then we can solveAin polynomial time. - If we want to solve problem
A, and we already know an efficient algorithm forB, then we can use the reductionA \leq Bto solveAefficiently. - If we want to show that
Bis NP-hard, we can do this by showing thatA \leq Bfor some known NP-hard problemA.
P is the class of problems that can be solved in polynomial time. NP is the class of problems that can be verified in polynomial time.
We know that P \subseteq NP.
NP-complete problems
A problem is NP-complete if it is in NP and it is also NP-hard.
NP
A problem is in NP if
- there is a polynomial size certificate for the problem, and
- there is a polynomial time verifier for the problem that takes the certificate and checks whether it is a valid solution.
NP-hard
A problem is NP-hard if every instance of NP hard problem can be reduced to it in polynomial time.
List of known NP-hard problems:
- 3-SAT (or SAT)
- Independent Set
- Vertex Cover
- 3-coloring
- Hamiltonian Cycle
- Hamiltonian Path