CSE 421 Algorithms Richard Anderson Lecture 28 Survey of NP Complete Problems NP-Complete P.

Slides:



Advertisements
Similar presentations
Reducibility Class of problems A can be reduced to the class of problems B Take any instance of problem A Show how you can construct an instance of problem.
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:
NP-Completeness (2) NP-Completeness Graphs 4/17/2017 6:25 AM x x x x x
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 24 Instructor: Paul Beame.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
February 25, 2015CS21 Lecture 211 CS21 Decidability and Tractability Lecture 21 February 25, 2015.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
CSEP 521 Applied Algorithms Richard Anderson Lecture 10 NP Completeness.
1 3-COLOURING: Input: Graph G Question: Does there exist a way to 3-colour the vertices of G so that adjacent vertices are different colours? 1.What could.
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.
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.
NP-Completeness (Nondeterministic Polynomial Completeness) Sushanth Sivaram Vallath & Z. Joseph.
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.
1 Suppose I construct a TM M f which: 1. Preserves its input u. 2. Simulates a machine M b on input ε. 3. If M b hangs on input ε, force an infinite loop.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
NPC.
CSC 413/513: Intro to Algorithms
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
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.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
34.NP Completeness. Computer Theory Lab. Chapter 34P.2.
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 (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
Richard Anderson Lecture 25 Min Cut Applications and NP-Completeness
Lecture 5 NP Class.
Great Ideas in Computing Complexity Theory
Lecture 24 NP-Complete Problems
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
Richard Anderson Lecture 30 NP-Completeness
Richard Anderson Lecture 28 NP Completeness
Richard Anderson Lecture 27 NP Completeness
Richard Anderson Lecture 26 NP-Completeness
Richard Anderson Lecture 27 Survey of NP Complete Problems
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
Presentation transcript:

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

Announcements Final exam, –Monday, December 14, 2:30-4:20 pm –Comprehensive (2/3 post midterm, 1/3 pre midterm) Review session –Friday, 3:30 – 5:00 pm. More 220 Online course evaluations available

NP Complete Problems 1.Circuit Satisfiability 2.Formula Satisfiability a.3-SAT 3.Graph Problems a.Independent Set b.Vertex Cover c.Clique 4.Path Problems a.Hamiltonian cycle b.Hamiltonian path 5.Partition Problems a.Three dimensional matching b.Exact cover 6.Graph Coloring 7.Number problems a.Subset sum 8.Integer linear programming 9.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

Reduce Hamiltonian Circuit to Hamiltonian Path G 2 has a Hamiltonian Path iff G 1 has a Hamiltonian Circuit v x yz x yz v1v1 v2v2 st

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) 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 Truth Setting Gadget X True X False

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

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 –Graph K-coloring –Graph 3-coloring Polynomial –Graph 2-Coloring

Z 3-SAT < P 3 Colorability Y TF B XY Z X Truth Setting Gadget Clause Testing Gadget XT Z F Y

Number Problems Subset sum problem –Given natural numbers w 1,..., w n 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} => Does there exist a subset that sums to exactly ? Annoying detail: What about the carries?

Integer Linear Programming

Scheduling with release times and deadlines