Richard Anderson Lecture 28 NP-Completeness

Slides:



Advertisements
Similar presentations
Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
Advertisements

1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
NP and NP Complete. Definitions A problem is in the class P if there is a polynomial time solution to the problem A problem is in the class NP if there.
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
NP-Completeness (2) NP-Completeness Graphs 4/17/2017 6:25 AM x x x x x
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Lecture 22 More NPC problems
CSEP 521 Applied Algorithms Richard Anderson Lecture 10 NP Completeness.
NP-complete Problems SAT 3SAT Independent Set Hamiltonian Cycle
Polynomial-time reductions We have seen several reductions:
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
Unit 9: Coping with NP-Completeness
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
CSE 6311 – Spring 2009 ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Lecture Notes – Feb. 3, 2009 Instructor: Dr. Gautam Das notes by Walter Wilson.
NPC.
CSC 413/513: Intro to Algorithms
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
CSE 421 Algorithms Richard Anderson Lecture 28 Survey of NP Complete Problems NP-Complete P.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The Theory of NP-Completeness
NP-Completeness A problem is NP-complete if: It is in NP
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
More NP-Complete and NP-hard Problems
More NP-complete problems
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Richard Anderson Lecture 29 NP-Completeness and course wrap-up
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness Proofs
Richard Anderson Lecture 26 NP-Completeness
Hard Problems Introduction to NP
NP-Completeness (36.4-5) P: yes and no in pt NP: yes in pt NPH  NPC
Richard Anderson Lecture 25 Min Cut Applications and NP-Completeness
CS21 Decidability and Tractability
Intro to Theory of Computation
CS154, Lecture 16: More NP-Complete Problems; PCPs
Lecture 24 NP-Complete Problems
ICS 353: Design and Analysis of Algorithms
Intro to NP Completeness
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
Richard Anderson Lecture 25 NP-Completeness
Richard Anderson Lecture 28 Coping with NP-Completeness
Richard Anderson Lecture 29 NP-Completeness
Chapter 34: NP-Completeness
Approximation Algorithms
Richard Anderson Lecture 30 NP-Completeness
Richard Anderson Lecture 28 NP Completeness
Richard Anderson Lecture 27 NP Completeness
CS 3343: Analysis of Algorithms
Richard Anderson Lecture 26 NP-Completeness
CS21 Decidability and Tractability
CSE 6408 Advanced Algorithms.
NP-Completeness Yin Tat Lee
The Theory of NP-Completeness
CS154, Lecture 16: More NP-Complete Problems; PCPs
Richard Anderson Lecture 27 Survey of NP Complete Problems
Richard Anderson Lecture 25 NP Completeness
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
Hamiltonian Circuit (HC) problem
Lecture 24 Vertex Cover and Hamiltonian Cycle
Presentation transcript:

Richard Anderson Lecture 28 NP-Completeness CSE 421 Algorithms Richard Anderson Lecture 28 NP-Completeness

Populating the NP-Completeness Universe Circuit Sat <P 3-SAT 3-SAT <P Independent Set 3-SAT <P Vertex Cover Independent Set <P Clique 3-SAT <P Hamiltonian Circuit Hamiltonian Circuit <P Traveling Salesman 3-SAT <P Integer Linear Programming 3-SAT <P Graph Coloring 3-SAT <P Subset Sum Subset Sum <P Scheduling with Release times and deadlines

Cook’s Theorem The Circuit Satisfiability Problem is NP-Complete Given a boolean circuit, determine if there is an assignment of boolean values to the input to make the output true

Circuit SAT Satisfying assignment x1 = T, x2 = F, x3 = F x4 = T, x5 = T AND Circuit SAT OR OR Find a satisfying assignment AND AND AND AND NOT OR NOT OR AND OR AND NOT AND NOT OR NOT AND x3 x4 x5 x1 x2

Proof of Cook’s Theorem Reduce an arbitrary problem Y in NP to X Let A be a non-deterministic polynomial time algorithm for Y Convert A to a circuit, so that Y is a Yes instance iff and only if the circuit is satisfiable

Satisfiability Given a boolean formula, does there exist a truth assignment to the variables to make the expression true

Definitions Boolean variable: x1, …, xn Term: xi or its negation !xi Clause: disjunction of terms t1 or t2 or … tj Problem: Given a collection of clauses C1, . . ., Ck, does there exist a truth assignment that makes all the clauses true (x1 or !x2), (!x1 or !x3), (x2 or !x3)

3-SAT Each clause has exactly 3 terms Variables x1, . . ., xn Clauses C1, . . ., Ck Cj = (tj1 or tj2 or tj3) Fact: Every instance of SAT can be converted in polynomial time to an equivalent instance of 3-SAT

Find a satisfying truth assignment (x || y || z) && (!x || !y || !z) && (!x || y) && (x || !y) && (y || !z) && (!y || z)

Theorem: CircuitSat <P 3-SAT

Theorem: 3-SAT <P IndSet

Sample Problems Independent Set Graph G = (V, E), a subset S of the vertices is independent if there are no edges between vertices in S 1 2 3 5 4 6 7

Vertex Cover Vertex Cover Graph G = (V, E), a subset S of the vertices is a vertex cover if every edge in E has at least one endpoint in S 1 2 3 5 4 6 7

IS <P VC Lemma: A set S is independent iff V-S is a vertex cover To reduce IS to VC, we show that we can determine if a graph has an independent set of size K by testing for a Vertex cover of size n - K

IS <P VC Find a maximum independent set S Show that V-S is a vertex cover 1 2 1 2 3 5 3 5 4 4 6 6 7 7

Clique Clique Graph G = (V, E), a subset S of the vertices is a clique if there is an edge between every pair of vertices in S 1 2 3 4 5 6 7

Complement of a Graph Defn: G’=(V,E’) is the complement of G=(V,E) if (u,v) is in E’ iff (u,v) is not in E 1 2 1 2 3 5 3 5 4 4 6 6 7 7 Construct the complement

IS <P Clique Lemma: S is Independent in G iff S is a Clique in the complement of G To reduce IS to Clique, we compute the complement of the graph. The complement has a clique of size K iff the original graph has an independent set of size K

Hamiltonian Circuit Problem Hamiltonian Circuit – a simple cycle including all the vertices of the graph

Thm: Hamiltonian Circuit is NP Complete Reduction from 3-SAT

Traveling Salesman Problem Minimum cost tour highlighted Traveling Salesman Problem Given a complete graph with edge weights, determine the shortest tour that includes all of the vertices (visit each vertex exactly once, and get back to the starting point) 3 7 7 2 2 5 4 1 1 4 Find the minimum cost tour

Thm: HC <P TSP