Richard Anderson Lecture 27 Survey of NP Complete Problems

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.
Approximation Algorithms Lecture for CS 302. What is a NP problem? Given an instance of the problem, V, and a ‘certificate’, C, we can verify V is in.
Transitivity of  poly Theorem: Let ,  ’, and  ’’ be three decision problems such that   poly  ’ and  ’  poly  ’’. Then  poly  ’’. Proof:
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.
CSEP 521 Applied Algorithms Richard Anderson Lecture 10 NP Completeness.
DP TSP Have some numbering of the vertices We will think of all our tours as beginning and ending at 1 C(S, j) = length of shortest path visiting each.
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.
CSE332: Data Abstractions Lecture 24.5: Interlude on Intractability Dan Grossman Spring 2012.
Techniques for Proving NP-Completeness Show that a special case of the problem you are interested in is NP- complete. For example: The problem of finding.
1 Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
Instructor Neelima Gupta Table of Contents Class NP Class NPC Approximation Algorithms.
1.1 Chapter 3: Proving NP-completeness Results Six Basic NP-Complete Problems Some Techniques for Proving NP-Completeness Some Suggested Exercises.
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.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
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 29 Complexity Theory NP-Complete P.
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.
Exhaustive search Exhaustive search is simply a brute- force approach to combinatorial problems. It suggests generating each and every element of the problem.
CSC 172 P, NP, Etc.
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 (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
Lecture 2-2 NP Class.
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
Richard Anderson Lecture 25 Min Cut Applications and NP-Completeness
Lecture 5 NP Class.
Lecture 24 NP-Complete Problems
ICS 353: Design and Analysis of Algorithms
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 NP-Completeness
Richard Anderson Lecture 28 Coping with NP-Completeness
Richard Anderson Lecture 29 NP-Completeness
Richard Anderson Lecture 29 Complexity Theory
CSE 421 Richard Anderson Autumn 2016, Lecture 3
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
NP-Completeness Yin Tat Lee
The Theory of NP-Completeness
Richard Anderson Lecture 25 NP Completeness
Lecture 24 Classical NP-hard Problems
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
Lecture 23 NP-Hard Problems
CSE 421 Richard Anderson Autumn 2019, Lecture 3
Presentation transcript:

Richard Anderson Lecture 27 Survey of NP Complete Problems CSE 421 Algorithms P Richard Anderson Lecture 27 Survey of NP Complete Problems

Announcements Final exam, Review session Monday, December 12, 2:30-4:20 pm Comprehensive (2/3 post midterm, 1/3 pre midterm) Review session TBD Online course evaluations available

NP Complete Problems Circuit Satisfiability Formula Satisfiability Graph Problems Independent Set Vertex Cover Clique Path Problems Hamiltonian cycle Hamiltonian path Traveling Salesman Partition Problems Three dimensional matching Exact cover Graph Coloring Number problems Subset sum Integer linear programming Scheduling with release times and deadlines

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 Page 475 in text

Clause Gadget X1 Group X2 Group X3 Group

Reduce Hamiltonian Circuit to Hamiltonian Path G2 has a Hamiltonian Path iff G1 has a Hamiltonian Circuit s t v v1 v2 x y z x y z

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

Matching Two dimensional matching Three dimensional matching (3DM)

3-SAT <P 3DM X X X X X X X X X True X False Truth Setting Gadget

3-SAT <P 3DM X Y Z Garbage Collection Gadget (Many copies) Clause gadget for (X OR Y OR Z)

Exact Cover (sets of size 3) XC3 Given a collection of sets of size 3 of a domain of size 3N, is there a sub-collection of N sets that cover the sets (A, B, C), (D, E, F), (A, B, G), (A, C, I), (B, E, G), (A, G, I), (B, D, F), (C, E, I), (C, D, H), (D, G, I), (D, F, H), (E, H, I), (F, G, H), (F, H, I) 3DM <P XC3

Graph Coloring NP-Complete Polynomial Graph K-coloring

3-SAT <P 3 Colorability F B X X Y Y Y Z Z X T Z F Truth Setting Gadget Clause Testing Gadget (Can be colored if at least one input is T)

Number Problems Subset sum problem Subset sum problem is NP-Complete Given natural numbers w1,. . ., wn and a target number W, is there a subset that adds up to exactly W? Subset sum problem is NP-Complete Subset Sum problem can be solved in O(nW) time

XC3 <P SUBSET SUM Idea: Represent each set as a bit vector, then interpret the bit vectors as integers. Add them up to get the all one’s vector. {x3, x5, x9} => 001010001000 Does there exist a subset that sums to exactly 111111111111? Annoying detail: What about the carries?

Integer Linear Programming Linear Programming – maximize a linear function subject to linear constraints Integer Linear Programming – require an integer solution NP Completeness reduction from 3-SAT Use 0-1 variables for xi’s Constraint for clause x1 + (1 – x2) + (1-x3) > 0

Scheduling with release times and deadlines Tasks T1,…,Tn with release time ri, deadline di, and work wi Reduce from Subset Sum Given natural numbers w1,. . ., wn and a target number K, is there a subset that adds up to exactly K? Suppose the sum w1+…+ wn = W Task Ti has release time 0 and deadline W+1 Add an additional task with release time K, deadline K+1 and work 1