Intractability
not on exam
Poly-Time Reductions
General definition of Reduction reduces to poly-time.
- say we have a blackbox to solve . We give it an instance of .
If is solvable in polynomial time, then is solvable in polynomial time. The contrapositive is that: if is not solvable in polynomial time, then is not solvable in polynomial time.
- i.e., is no easier than .
Desiderata: suppose we could solve problem in polynomial time. What else could we solve in polynomial time?
Reduction: probelm polynomial-time (cook) reduces to problem if arbitrary instances of porblem can be solved using:
- polynomial number of standard computational steps, plus
- polynomial number of calls to oracle (a computational model supplemented by special piece of hardware that solves instaces of in a single step) that solves problem .
Notation:
Note: we pay for time to write down instance of sent to oracle instances of must be of polynomial size.
Novice mistake: confusing with
Design algorithms: If and can be solved in polynomial time, then can be solved in polynomial time
Establish intractability: If and cannot be solved in polynomial time, then cannot be solved in polynomial time.
Establish equivalence: If both and , we use notation . In this case, can be solved in polynomial time iff can be.
packing and covering problems
Are these questions the same in terms of complexity? (i.e., can O reduce to D or can D reduce to O)
- Optimization question: what is the size of the largest possible independent set?
- Decision question: is there an independent set of size at least
Answer: if you have the solution to the optimization problem, you have the solution to the decision question. Therefore, , i.e., D can reduce to O. You can make calls of D again and again to find the answer for O. Therefore, and .
More formally,
Independent-Set: given a graph and an integer , is there a subset of (or more ) verticies such that no two are adjacent?
Vertex-Cover: given a graph and an integer , is there a subset of (or fewer) verticies such that each edge is incident to at least one vertex in the subset?
Do vertex cover and independent set reduce to one another? Theorem: Independent-Set Vertex-Cover. Proof: we show is an independent set of size iff is a vertex cover of size .
- Let be any independent set of size .
- is of size
- Consider an arbitrary edge
- independent
- either , or or both.
- either , or , or both
- Thus, covers .
- Let be any vertex cover of size
- is of size .
- Consider an arbitrary edge .
- is a vertex cover
- either , or or both
- either or or both
- Thus, is an independent set
Set Cover
Given a set of elements, a collection of subsets of , and an integer , are there of these subsets whose union is equal to ?
Sample application:
- available pieces of software
- of capabilities that we would like our system t have
- The piece of software provides the set of capabilities
- Goal: achieve all capabilities using fewest peices of software.
Theorem: vertex-cover set-cover. Proof:
- given a vertex-cover instance and , we construct a Set-Cover instance that has a set cover of size iff has a vertex cover of size .
Construction:
- universe
- include one subset for each node :
Vertex cover reduces to set cover. Lemma: contains a vertex cover of size iff contains a set cover of size . Proof:
- Let be a vertex cover of size in . Then is a set cover of size .
- "yes" instances of vertex-cover are solved correctly.
- Let be a set cover of size in . Then is a vertex cover of size in .
- "no" instances of Vertex-Cover are solved correctly.
Constraint satisfaction problems
Satisfiability terms:
- literal: a boolean variable or its negation. or
- clause: a disjunction of literals
- conjunctive normal form (CNF): a propositional formula that is a conjunction of clauses.
- sat: given a CNF formula , does it have a satisfying truth assignment?
- 3-sat: sat where each clause contains exactly 3 literals (and each literal corresponds to a different variable)
- yes instance occurs when true and false.
key application: elecetronic design automation (EDA)
There does not exist a poly-time algorithm for .
vs this hypothesis is equivalen to conjecture.
3-satisfiability reduces to independent set
Theorem: Proof: given an instance of , we construct an instance of Independent-set that has an independent set of size iff is satisfiable
Construction:
- contains 3 nodes for each clause, one for each literal
- connect 3 literals in a clause in a triangle
- connect litearl to each of its negations.
Lemma: is satisfiable iff contains an independent set of size .
Proof consider any satisfying assignment for
- select one true litearl from each clause/triangle
- this is an independent set of size .
- "yes" instances of 3-sat are solved correctly.
let be indepnedent set of size
- must contain exactly one node in each triangle
- set these literals to true (and remaining literals consistently)
- all clauses in are satisfied
- "no" instances of 3-sat are solved correctly.
Review
Basic reduction strategies:
- simple equivalence
- special case to general case
- encoding with gadgets ($3-Sat \leq_P Independent-set)
transitivity: if and , then proof idea: compose the two algorithms. e.g., .
Linked from Algorithms