Download presentation

Presentation is loading. Please wait.

Published byElle Wimbish Modified over 2 years ago

1
More NP-completeness Sipser 7.5 (pages 283-294)

2
CS 311 Fall 2008 2 NP’s hardest problems Definition 7.34: A language B is NP-complete if 1.B ∈ NP 2.A≤ p B, for all A ∈ NP NP A1A1 SAT A3A3 A2A2 CLIQUE

3
CS 311 Fall 2008 3 Hamiltonian paths HAMPATH = { | ∃ Hamiltonian path from s to t} Theorem 7.46: HAMPATH is NP-complete. s t

4
CS 311 Fall 2008 4 Hamiltonian paths HAMPATH = { | ∃ Hamiltonian path from s to t} Theorem 7.46: HAMPATH is NP-complete. s t

5
CS 311 Fall 2008 5 Remember… HAMPATH ∈ NP N = "On input : 1.Guess an orderings, p 1, p 2,..., p n, of the nodes of G 2.Check whether s = p 1 and t = p n 3.For each i=1 to n-1, check whether (p i, p i+1 ) is an edge of G. If any are not, reject. Otherwise, accept.”

6
CS 311 Fall 2008 6 3SAT≤ p HAMPATH NP A1A1 3SAT A3A3 A2A2 HAMPATH

7
CS 311 Fall 2008 7 Proof outline Given a boolean formula φ, we convert it to a directed graph G such that φ has a valid truth assignment iff G has a Hamiltonian graph

8
CS 311 Fall 2008 8 3SAT ’s main features Choice: Each variable has a choice between two truth values. Consistency: Different occurrences of the same variable have the same value. Constraints: Variable occurrences are organized into clauses that provide constraints that must be satisified. *We model each of these three features by a different a "gadget" in the graph G.

9
CS 311 Fall 2008 9 The choice gadget Modeling variable x i

10
CS 311 Fall 2008 10 Zig-zagging and zag-zigging Zig-zag (TRUE)Zag-zig (FALSE)

11
CS 311 Fall 2008 11 The consistency gadget

12
CS 311 Fall 2008 12 Clauses Modeling clause c j cjcj

13
CS 311 Fall 2008 13 The global structure

14
CS 311 Fall 2008 14 The constraint gadget Modeling when clause c j contains x i

15
CS 311 Fall 2008 15 The constraint gadget Modeling when clause c j contains x i

16
CS 311 Fall 2008 16 A situation that cannot occur

17
CS 311 Fall 2008 17 TSP is NP-complete TSP : Given n cities, 1, 2,..., n, together with a nonnegative distance d ij between any two cities, find the shortest tour.

18
CS 311 Fall 2008 18 HAMPATH ≤ p TSP NP A1A1 HAMPATH A3A3 A2A2 TSP

19
CS 311 Fall 2008 19 SUBSET-SUM is NP-complete SUBSET-SUM= { | S = {x 1,…,x k } and, for some {y 1,…,y l } ⊆ S, y i =t} Why is SUBSET-SUM in NP?

20
CS 311 Fall 2008 20 3SAT ≤ p SUBSET-SUM

21
CS 311 Fall 2008 21 And…if that’s not enough There are more than 3000 known NP-complete problems! http://en.wikipedia.org/wiki/List_of_NP-complete_problems

22
CS 311 Fall 2008 22 Other types of complexity Space complexity Circuit complexity Descriptive complexity Randomized complexity Quantum complexity …

Similar presentations

OK

CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT 200710.1 Lecture 10-11 NP-Completeness Jan Maluszynski, IDA, 2007

CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT 200710.1 Lecture 10-11 NP-Completeness Jan Maluszynski, IDA, 2007

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on unity in diversity Ppt on condition based maintenance Ppt on indian textile industries in bangladesh Ppt on institute management system Free download ppt on google app engine seminar Ppt on 9/11 conspiracy theory facts Ppt on object oriented programming with c++ book Ppt on video teleconferencing jobs Ppt on image compression using different types of wavelets Ppt on power factor correction using capacitor bank