Download presentation
Presentation is loading. Please wait.
1
Lecture 24 NP-Complete Problems
2
(1) Polynomial-time many-one reduction
3
A < m B p A set A in Σ* is said to be polynomial-time many-one reducible to B in Γ* if there exists a polynomial-time computable function f: Σ* → Γ* such that x ε A iff f(x) ε B. Σ* Γ*
4
A = Hamiltonian cycle (HC)
Given a graph G, does G contain a Hamiltonian cycle?
5
B = decision version of Traveling Salesman Problem (TSP)
Given n cities and a distance table between these n cities, find a tour (starting from a city and come back to start point passing through each city exactly once) with minimum total length. Given n cities, a distance table and k > 0, does there exist a tour with total length < k?
6
HC < m TSP p From a given graph G, we need to construct (n cities, a distance table, k).
7
3-SAT < m SAT p SAT: Given a Boolean formula F, does F have a satisfied assignment? An assignment is satisfied if it makes F =1. 3-SAT: Given a 3-CNF F, does F have a satisfied assignment?
8
Boolean Algebra
9
Boolean Algebra
10
3CNF
11
Examples
13
SAT < m 3-SAT p SAT: Given a Boolean formula F, does F have a satisfied assignment? An assignment is satisfied if it makes F =1. 3-SAT: Given a 3-CNF F, does F have a satisfied assignment?
17
Property of < m A < m B and B < m C imply A < m C
A < m B and B ε P imply A ε P p p p
18
NP-complete A set A is NP-hard if for any B in NP, B < m A.
A set A is NP-complete if it is in NP and NP-hard. A decision problem is NP-complete if its corresponding language is NP-complete. An optimization problem is NP-hard if its decision version is NP-hard. p
19
(2) Cook Theorem SAT is NP-complete
20
Proof of Cook Theorem
24
The 1st tape should be
25
The last tape should contain
The final state.
30
Exercise!!!
31
3-SAT is NP-complete
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.