Back to the 2024 paper

Module 4: Tractable and Intractable Problems

20247m

Answer the following:
(i) What is polynomial-time reduction?
(ii) How is it used to prove that a problem is NP-complete?
(iii) Explain the process of reducing 3-SAT to Vertex Cover.

Worked SolutionAI Assisted

Polynomial-Time Reduction & NP-Completeness via 3-SAT → Vertex Cover

(i) Polynomial-Time Reduction

Many-one Karp reduction A≤pBA ≤_p B: deterministic algorithm transforming any instance xx of AA into instance f(x)f(x) of BB in time poly(∣x∣)poly(|x|) such that x∈A⇔f(x)∈Bx∈A ⇔ f(x)∈B. Implies if B∈PB∈P then A∈PA∈P; transitivity holds; ≤p≤_p orders hardness.

(ii) Use to Prove NP-Completeness

To prove BB NP-complete: show B∈NPB∈NP + pick known NP-complete AA (e.g., 3-SAT) and show A≤pBA ≤_p B. By transitivity every NPNP problem reduces to AA reduces to BB → BB NP-hard; with B∈NPB∈NP → NP-complete.

(iii) Reduction 3-SAT → Vertex Cover (Sketch)

3-SAT: Conjunctive normal form with 3 literals per clause, decide satisfiability.
Vertex Cover decision: Given G(V,E)G(V,E) and integer kk, is there C⊆VC⊆V, ∣C∣≤k|C|≤k covering all edges?

Construction: Given 3-SAT formula with nn vars, mm clauses.

  • Variable gadget: For each variable xix_i, create two vertices xix_i, xˉi\bar x_i with edge (xi,xˉi)(x_i,\bar x_i). Cover must pick at least one per gadget (choosing truth assignment).
  • Clause gadget: For each clause Cj=(la∨lb∨lc)C_j = (l_a ∨ l_b ∨ l_c), create triangle of 3 vertices aj,bj,cja_j,b_j,c_j with edges among them. Cover must pick at least 2 of 3 per triangle.
  • Connection edges: Connect each triangle vertex to its literal vertex (e.g., aja_j — literal lal_a's variable node). This forces covering choice to correspond to satisfying literal.
  • Set k=n+2mk = n + 2m.

Claim: Formula satisfiable ⇔ graph has vertex cover of size ≤ kk.

  • ⇒ If assignment satisfies, pick per variable the true literal vertex, per clause pick 2 triangle vertices covering clause's false literals (at least one literal true, so the edge to its variable vertex is already covered, allowing to pick the other two triangle vertices).
  • ⇐ If cover size kk, it must use exactly 1 per variable gadget and 2 per clause triangle. Extract assignment from variable vertices in cover; each clause triangle leaves one literal uncovered → that literal's edge must be covered by its variable vertex → that literal true → clause satisfied.

Reduction is polytime (O(n+m)O(n+m) vertices/edges). Since 3-SAT NP-complete → Vertex Cover NP-hard; clearly ∈NP (certificate = cover, verifier checks edges) → NP-complete.

Similar questions

Student FinanceWeb Platform

Pocketly — Personal Finance for Students

Keep your hostel and college expenses under control. Track accounts, log spending in seconds, and stay within your monthly budget.