![Page 1: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/1.jpg)
The Hamiltonian Cycle Problem is NP-Complete
Karthik Gopalan
CMSC 452
November 25, 2014
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 1 / 31
![Page 2: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/2.jpg)
Outline
Section 1
Outline
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 2 / 31
![Page 3: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/3.jpg)
Outline
1 Introduction
2 3-SAT ≤P Directed Ham PathProcedureConstructionExamplesA Dialog
3 Hamiltonian Path ≤P Hamiltonian Cycle
4 3-SAT ≤P Undirected Planar Hamiltonian CycleGadgetsConstruction
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 3 / 31
![Page 4: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/4.jpg)
Introduction
Section 2
Introduction
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 4 / 31
![Page 5: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/5.jpg)
Introduction
What is a Hamiltonian Cycle
A cycle through a graph G = (V ,E ) that touches every vertex once.
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 5 / 31
![Page 6: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/6.jpg)
Introduction
Hamiltonian Path ∈ NP
1 The certificate: a path represented by an ordering of the verticies
2 Verify:
I Each node is in the path onceI An edge exists between each consecutive pair of nodes
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 6 / 31
![Page 7: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/7.jpg)
Introduction
Hamiltonian Path ∈ NP
1 The certificate: a path represented by an ordering of the verticies2 Verify:
I Each node is in the path onceI An edge exists between each consecutive pair of nodes
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 6 / 31
![Page 8: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/8.jpg)
3-SAT ≤P Directed Ham Path
Section 3
3-SAT ≤P Directed Ham Path
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 7 / 31
![Page 9: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/9.jpg)
3-SAT ≤P Directed Ham Path Procedure
Subsection 1
Procedure
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 8 / 31
![Page 10: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/10.jpg)
3-SAT ≤P Directed Ham Path Procedure
Procedure
1 Start with a 3-CNF formula
φ = (a1 ∨ b1 ∨ c1) ∧ (a2 ∨ b2 ∨ c2) ∧ · · · ∧ (ak ∨ bk ∨ ck)
2 Create a graph G that has a Hamiltonian Path iff φ is satisfiable
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 9 / 31
![Page 11: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/11.jpg)
3-SAT ≤P Directed Ham Path Procedure
Procedure
1 Start with a 3-CNF formula
φ = (a1 ∨ b1 ∨ c1) ∧ (a2 ∨ b2 ∨ c2) ∧ · · · ∧ (ak ∨ bk ∨ ck)
2 Create a graph G that has a Hamiltonian Path iff φ is satisfiable
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 9 / 31
![Page 12: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/12.jpg)
3-SAT ≤P Directed Ham Path Construction
Subsection 2
Construction
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 10 / 31
![Page 13: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/13.jpg)
3-SAT ≤P Directed Ham Path Construction
Variables
Represent each variable xi with a gadget with 3k + 3 nodes:
xi . . .
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 11 / 31
![Page 14: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/14.jpg)
3-SAT ≤P Directed Ham Path Construction
2 Ways
True:
xi . . .
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 12 / 31
![Page 15: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/15.jpg)
3-SAT ≤P Directed Ham Path Construction
2 Ways
False:
xi . . .
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 12 / 31
![Page 16: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/16.jpg)
3-SAT ≤P Directed Ham Path Construction
Clauses
Each clause cj is represented as a single node:
cj
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 13 / 31
![Page 17: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/17.jpg)
3-SAT ≤P Directed Ham Path Construction
Connect the Variables
x1
s
x2
. . .
. . .
xn
t
c1
c2
c3
c4
ck
...
. . .
...
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 14 / 31
![Page 18: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/18.jpg)
3-SAT ≤P Directed Ham Path Construction
Connect the Clauses
if xi ∈ Cj
xi 3j. . . . . .
cj
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 15 / 31
![Page 19: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/19.jpg)
3-SAT ≤P Directed Ham Path Construction
Connect the Clauses
if xi ∈ Cj
xi 3j. . . . . .
cj
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 15 / 31
![Page 20: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/20.jpg)
3-SAT ≤P Directed Ham Path Examples
Subsection 3
Examples
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 16 / 31
![Page 21: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/21.jpg)
3-SAT ≤P Directed Ham Path Examples
(x ∨ y) ∧ (x ∨ y)
y
x
C1 C2
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 17 / 31
![Page 22: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/22.jpg)
3-SAT ≤P Directed Ham Path Examples
x ∧ x
x
C1 C2
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 18 / 31
![Page 23: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/23.jpg)
3-SAT ≤P Directed Ham Path A Dialog
Subsection 4
A Dialog
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 19 / 31
![Page 24: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/24.jpg)
3-SAT ≤P Directed Ham Path A Dialog
At this point...
Gasarch [to class]: So, could you code this up?
Class: Yes!
Gasarch: Would you want to?
Class: No...
Scott: Maybe in Prolog.
Liz: If you paid me.
Gasarch: What happened to the love of computer science! WhenClyde was an undergrad... The answer is 0 or on the board!... blahblah blah
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 20 / 31
![Page 25: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/25.jpg)
3-SAT ≤P Directed Ham Path A Dialog
At this point...
Gasarch [to class]: So, could you code this up?
Class: Yes!
Gasarch: Would you want to?
Class: No...
Scott: Maybe in Prolog.
Liz: If you paid me.
Gasarch: What happened to the love of computer science! WhenClyde was an undergrad... The answer is 0 or on the board!... blahblah blah
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 20 / 31
![Page 26: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/26.jpg)
3-SAT ≤P Directed Ham Path A Dialog
At this point...
Gasarch [to class]: So, could you code this up?
Class: Yes!
Gasarch: Would you want to?
Class: No...
Scott: Maybe in Prolog.
Liz: If you paid me.
Gasarch: What happened to the love of computer science! WhenClyde was an undergrad... The answer is 0 or on the board!... blahblah blah
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 20 / 31
![Page 27: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/27.jpg)
3-SAT ≤P Directed Ham Path A Dialog
At this point...
Gasarch [to class]: So, could you code this up?
Class: Yes!
Gasarch: Would you want to?
Class: No...
Scott: Maybe in Prolog.
Liz: If you paid me.
Gasarch: What happened to the love of computer science! WhenClyde was an undergrad... The answer is 0 or on the board!... blahblah blah
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 20 / 31
![Page 28: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/28.jpg)
3-SAT ≤P Directed Ham Path A Dialog
At this point...
Gasarch [to class]: So, could you code this up?
Class: Yes!
Gasarch: Would you want to?
Class: No...
Scott: Maybe in Prolog.
Liz: If you paid me.
Gasarch: What happened to the love of computer science! WhenClyde was an undergrad... The answer is 0 or on the board!... blahblah blah
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 20 / 31
![Page 29: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/29.jpg)
3-SAT ≤P Directed Ham Path A Dialog
At this point...
Gasarch [to class]: So, could you code this up?
Class: Yes!
Gasarch: Would you want to?
Class: No...
Scott: Maybe in Prolog.
Liz: If you paid me.
Gasarch: What happened to the love of computer science! WhenClyde was an undergrad... The answer is 0 or on the board!... blahblah blah
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 20 / 31
![Page 30: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/30.jpg)
3-SAT ≤P Directed Ham Path A Dialog
At this point...
Gasarch [to class]: So, could you code this up?
Class: Yes!
Gasarch: Would you want to?
Class: No...
Scott: Maybe in Prolog.
Liz: If you paid me.
Gasarch: What happened to the love of computer science! WhenClyde was an undergrad... The answer is 0 or on the board!... blahblah blah
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 20 / 31
![Page 31: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/31.jpg)
Hamiltonian Path ≤P Hamiltonian Cycle
Section 4
Hamiltonian Path ≤P Hamiltonian Cycle
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 21 / 31
![Page 32: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/32.jpg)
Hamiltonian Path ≤P Hamiltonian Cycle
...
Question 4 on the Final
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 22 / 31
![Page 33: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/33.jpg)
3-SAT ≤P Undirected Planar Hamiltonian Cycle
Section 5
3-SAT ≤P Undirected Planar Hamiltonian Cycle
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 23 / 31
![Page 34: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/34.jpg)
3-SAT ≤P Undirected Planar Hamiltonian Cycle Gadgets
Subsection 1
Gadgets
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 24 / 31
![Page 35: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/35.jpg)
3-SAT ≤P Undirected Planar Hamiltonian Cycle Gadgets
Or
v v ′
u u′
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 25 / 31
![Page 36: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/36.jpg)
3-SAT ≤P Undirected Planar Hamiltonian Cycle Gadgets
Or
v v ′
u u′
∨
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 25 / 31
![Page 37: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/37.jpg)
3-SAT ≤P Undirected Planar Hamiltonian Cycle Gadgets
X-Or
v v ′
u u′
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 26 / 31
![Page 38: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/38.jpg)
3-SAT ≤P Undirected Planar Hamiltonian Cycle Gadgets
X-Or
v v ′
u u′
X
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 26 / 31
![Page 39: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/39.jpg)
3-SAT ≤P Undirected Planar Hamiltonian Cycle Construction
Subsection 2
Construction
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 27 / 31
![Page 40: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/40.jpg)
3-SAT ≤P Undirected Planar Hamiltonian Cycle Construction
Variables
xi
xi
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 28 / 31
![Page 41: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/41.jpg)
3-SAT ≤P Undirected Planar Hamiltonian Cycle Construction
Variables
xi = false
xi
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 28 / 31
![Page 42: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/42.jpg)
3-SAT ≤P Undirected Planar Hamiltonian Cycle Construction
Variables
xi = true
xi
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 28 / 31
![Page 43: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/43.jpg)
3-SAT ≤P Undirected Planar Hamiltonian Cycle Construction
Variables
xi
xi
X
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 28 / 31
![Page 44: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/44.jpg)
3-SAT ≤P Undirected Planar Hamiltonian Cycle Construction
Clauses
∨
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 29 / 31
![Page 45: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/45.jpg)
3-SAT ≤P Undirected Planar Hamiltonian Cycle Construction
(x ∨ y ∨ z) ∧ (x ∨ y ∨ w) ∧ (y ∨ z ∨ w)
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 30 / 31
![Page 46: The Hamiltonian Cycle Problem is NP-Completegasarch/COURSES/452/F14/hamtalk.pdfThe Hamiltonian Cycle Problem is NP-Complete Karthik Gopalan CMSC 452 November 25, 2014 ... Karthik Gopalan](https://reader030.vdocuments.site/reader030/viewer/2022040722/5e318c61c175ae03837d9546/html5/thumbnails/46.jpg)
3-SAT ≤P Undirected Planar Hamiltonian Cycle Construction
That’s BS Man!
Karthik Gopalan (2014) The Hamiltonian Cycle Problem is NP-Complete November 25, 2014 31 / 31