Intractability

Created

not on exam

Poly-Time Reductions

General definition of Reduction y≤pX:Yy \leq pX : Y reduces to xx poly-time.

  • say we have a blackbox to solve xx. We give it an instance of yy.

If xx is solvable in polynomial time, then yy is solvable in polynomial time. The contrapositive is that: if yy is not solvable in polynomial time, then xx is not solvable in polynomial time.

  • i.e., xx is no easier than yy.

Desiderata: suppose we could solve problem YY in polynomial time. What else could we solve in polynomial time?

Reduction: probelm XX polynomial-time (cook) reduces to problem YY if arbitrary instances of porblem XX 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 YY in a single step) that solves problem YY.

Notation: X≤PYX \leq _P Y

Note: we pay for time to write down instance of YY sent to oracle   ⟹  \implies instances of YY must be of polynomial size.

Novice mistake: confusing X≤PYX \leq _P Y with Y≤PXY \leq_P X

Design algorithms: If X≤PYX \leq _P Y and YY can be solved in polynomial time, then XX can be solved in polynomial time

Establish intractability: If X≤PYX \leq _P Y and XX cannot be solved in polynomial time, then YY cannot be solved in polynomial time.

Establish equivalence: If both X≤PYX \leq _P Y and Y≤PXY \leq _P X, we use notation X≡PYX \equiv _P Y. In this case, XX can be solved in polynomial time iff YY 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 kk

Answer: if you have the solution to the optimization problem, you have the solution to the decision question. Therefore, D≤POD\leq_P O, i.e., D can reduce to O. You can make calls of D again and again to find the answer for O. Therefore, O≤PDO \leq_P D and O≡PDO \equiv_P D.

More formally,

Independent-Set: given a graph G=(V,E)G=(V,E) and an integer kk, is there a subset of kk (or more ) verticies such that no two are adjacent?

Vertex-Cover: given a graph G=(V,E)G=(V,E) and an integer kk, is there a subset of kk (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 ≡P\equiv_P Vertex-Cover. Proof: we show SS is an independent set of size kk iff V−SV-S is a vertex cover of size n−kn-k.

⇒\Rightarrow

  • Let SS be any independent set of size kk.
  • V−SV-S is of size n−kn-k
  • Consider an arbitrary edge (u,v)∈E(u,v) \in E
  • SS independent
    •   ⟹  \implies either u∉Su \notin S, or v∉Sv \notin S or both.
    •   ⟹  \implies either u∈V−Su \in V-S, or v∈V−Sv \in V-S, or both
  • Thus, V−SV-S covers (u,v)(u,v).

⇐\Leftarrow

  • Let V−SV-S be any vertex cover of size n−kn-k
  • SS is of size kk.
  • Consider an arbitrary edge (u,v)∈E(u,v) \in E.
  • V−SV-S is a vertex cover
    •   ⟹  \implies either u∈V−Su\in V-S, or v∈V−Sv \in V-S or both
    •   ⟹  \implies either u∉Su \notin S or v∉Sv \notin S or both
  • Thus, SS is an independent set

Set Cover

Given a set UU of elements, a collection SS of subsets of UU, and an integer kk, are there ≤k\leq k of these subsets whose union is equal to UU?

Sample application:

  • mm available pieces of software
  • UU of nn capabilities that we would like our system t have
  • The ithi^{th} piece of software provides the set Si⊆US_i \subseteq U of capabilities
  • Goal: achieve all nn capabilities using fewest peices of software.

Theorem: vertex-cover ≤P\leq_P set-cover. Proof:

  • given a vertex-cover instance G=(V,E)G=(V,E) and kk, we construct a Set-Cover instance (U,S,k)(U,S,k) that has a set cover of size KK iff GG has a vertex cover of size kk.

Construction:

  • universe U=EU=E
  • include one subset for each node v∈Vv\in V: Sv={e∈E:e incident to v}S_v = \{e\in E: e \text{ incident to } v\}

Vertex cover reduces to set cover. Lemma: G=(V,E)G= (V,E) contains a vertex cover of size kk iff (U,S,k)(U,S,k) contains a set cover of size kk. Proof: ⇒\Rightarrow

  • Let X⊆VX \subseteq V be a vertex cover of size kk in GG. Then Y={Sv:v∈}Y = \{S_v : v \in \} is a set cover of size kk.
  • "yes" instances of vertex-cover are solved correctly.

⇐\Leftarrow

  • Let Y⊆SY \subseteq S be a set cover of size kk in (U,S,k)(U,S,k). Then X={v:Sv∈Y}X = \{ v: S_v \in Y \} is a vertex cover of size kk in GG.
  • "no" instances of Vertex-Cover are solved correctly.

Constraint satisfaction problems

Satisfiability terms:

  • literal: a boolean variable or its negation. xix_i or xiˉ\bar{x_i}
  • clause: a disjunction of literals Cj=x1∨x2ˉ∨x3C_j = x_1 \lor \bar{x_2} \lor x_3
  • conjunctive normal form (CNF): a propositional formula Φ\Phi that is a conjunction of clauses. Φ=C1∧C2\Phi = C_1 \land C_2
  • sat: given a CNF formula Φ\Phi, 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)

Φ=(xˉ1∨x2∨x3)∧(x1∨xˉ2∨x3)∧(xˉ1∨x2∨x4)\Phi = (\bar x_1 \lor x_2 \lor x_3) \land (x_1 \lor \bar x_2 \lor x_3) \land (\bar x_1 \lor x_2 \lor x_4)

  • yes instance occurs when x1=x2=x_1 = x_2 = true and x3=x4=x_3 = x_4 = false.

key application: elecetronic design automation (EDA)

There does not exist a poly-time algorithm for 3−sat3-sat.

PP vs NPNP this hypothesis is equivalen to P≠NPP \neq NP conjecture.

3-satisfiability reduces to independent set

Theorem: 3−sat≤PIndependent−set3-sat \leq_P Independent-set Proof: given an instance Φ\Phi of 3−SAT3-SAT, we construct an instance (G,k)(G,k) of Independent-set that has an independent set of size k=∣Φ∣k=|\Phi| iff Φ\Phi is satisfiable

Construction:

  • GG 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: Φ\Phi is satisfiable iff GG contains an independent set of size k=Φk=\Phi.

Proof ⇒\Rightarrow consider any satisfying assignment for Φ\Phi

  • select one true litearl from each clause/triangle
  • this is an independent set of size k=Φk=\Phi.
  • "yes" instances of 3-sat are solved correctly.

⇐\Leftarrow let SS be indepnedent set of size kk

  • SS must contain exactly one node in each triangle
  • set these literals to true (and remaining literals consistently)
  • all clauses in Φ\Phi 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 X≤PyX \leq_P y and Y≤PZY \leq_P Z, then X≤PZX \leq_P Z proof idea: compose the two algorithms. e.g., 3-SAT≤PIndependent-Set≤PVertex-Cover≤PSet-Cover\text{3-SAT} \leq_P \text{Independent-Set} \leq_P \text{Vertex-Cover} \leq_P \text{Set-Cover}.