Download presentation
Presentation is loading. Please wait.
Published byAubrey Booth Modified over 9 years ago
1
Prof. Busch - LSU1 Busch Complexity Lectures: More NP-complete Problems
2
Prof. Busch - LSU2 Theorem: If: Language is NP-complete Language is in NP is polynomial time reducible to Then: is NP-complete (proven in previous class)
3
Prof. Busch - LSU3 Using the previous theorem, we will prove that 2 problems are NP-complete: Vertex-Cover Hamiltonian-Path
4
Prof. Busch - LSU4 Vertex cover of a graph is a subset of nodes such that every edge in the graph touches one node in Vertex Cover S = red nodes Example:
5
Prof. Busch - LSU5 |S|=4Example: Size of vertex-cover is the number of nodes in the cover
6
Prof. Busch - LSU6 graph contains a vertex cover of size } VERTEX-COVER = { : Corresponding language: Example:
7
Prof. Busch - LSU7 Theorem: 1. VERTEX-COVER is in NP 2. We will reduce in polynomial time 3CNF-SAT to VERTEX-COVER Can be easily proven VERTEX-COVER is NP-complete Proof: (NP-complete)
8
Prof. Busch - LSU8 Let be a 3CNF formula with variables and clauses Example: Clause 1 Clause 2Clause 3
9
Prof. Busch - LSU9 Formula can be converted to a graph such that: is satisfied if and only if Contains a vertex cover of size
10
Prof. Busch - LSU10 Clause 1 Clause 2Clause 3 Clause 1 Clause 2Clause 3 Variable Gadgets Clause Gadgets nodes
11
Prof. Busch - LSU11 Clause 1 Clause 2Clause 3 Clause 1 Clause 2Clause 3
12
Prof. Busch - LSU12 If is satisfied, then contains a vertex cover of size First direction in proof:
13
Prof. Busch - LSU13 Satisfying assignment Example: We will show that contains a vertex cover of size
14
Prof. Busch - LSU14 Put every satisfying literal in the cover
15
Prof. Busch - LSU15 Select one satisfying literal in each clause gadget and include the remaining literals in the cover
16
Prof. Busch - LSU16 This is a vertex cover since every edge is adjacent to a chosen node
17
Prof. Busch - LSU17 Explanation for general case: Edges in variable gadgets are incident to at least one node in cover
18
Prof. Busch - LSU18 Edges in clause gadgets are incident to at least one node in cover, since two nodes are chosen in a clause gadget
19
Prof. Busch - LSU19 Every edge connecting variable gadgets and clause gadgets is one of three types: Type 1 Type 2 Type 3 All adjacent to nodes in cover
20
Prof. Busch - LSU20 If graph contains a vertex-cover of size then formula is satisfiable Second direction of proof:
21
Prof. Busch - LSU21 Example:
22
Prof. Busch - LSU22 exactly one literal in each variable gadget is chosen exactly two nodes in each clause gadget is chosen To include “internal’’ edges to gadgets, and satisfy chosen out of
23
Prof. Busch - LSU23 For the variable assignment choose the literals in the cover from variable gadgets
24
Prof. Busch - LSU24 since the respective literals satisfy the clauses is satisfied with
25
Prof. Busch - LSU25 Theorem: 1. HAMILTONIAN-PATH is in NP 2. We will reduce in polynomial time 3CNF-SAT to HAMILTONIAN-PATH Can be easily proven HAMILTONIAN-PATH is NP-complete Proof: (NP-complete)
26
Prof. Busch - LSU26 Gadget for variable the directions change
27
Prof. Busch - LSU27 Gadget for variable
28
Prof. Busch - LSU28
29
Prof. Busch - LSU29
30
Prof. Busch - LSU30
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.