Black-box (oracle) Feed me a weighted graph G and I will tell you the weight of the max-weight matching of G.

Slides:



Advertisements
Similar presentations
NP-Hard Nattee Niparnan.
Advertisements

Polynomial-time reductions We have seen several reductions:
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-Completeness: Reductions
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.
NP-Completeness Lecture for CS 302. Traveling Salesperson Problem You have to visit n cities You want to make the shortest trip How could you do this?
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Complexity 11-1 Complexity Andrei Bulatov NP-Completeness.
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
Computability and Complexity 15-1 Computability and Complexity Andrei Bulatov NP-Completeness.
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.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
Computability and Complexity 16-1 Computability and Complexity Andrei Bulatov NP-Completeness.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
Last class Decision/Optimization 3-SAT  Independent-Set Independent-Set  3-SAT P, NP Cook’s Theorem NP-hard, NP-complete 3-SAT  Clique, Subset-Sum,
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.
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Clique Cover Cook’s Theorem 3SAT and Independent Set
P, NP, and NP-Complete Suzan Köknar-Tezel.
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.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Lecture 22 More NPC problems
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
NP-complete Problems SAT 3SAT Independent Set Hamiltonian Cycle
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.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
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.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
Design and Analysis of Algorithms - Chapter 101 Our old list of problems b Sorting b Searching b Shortest paths in a graph b Minimum spanning tree b Primality.
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.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
CSE 6311 – Spring 2009 ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Lecture Notes – Feb. 3, 2009 Instructor: Dr. Gautam Das notes by Walter Wilson.
NPC.
NP Completeness Piyush Kumar. Today Reductions Proving Lower Bounds revisited Decision and Optimization Problems SAT and 3-SAT P Vs NP Dealing with NP-Complete.
CSC 413/513: Intro to Algorithms
NP-Completeness Note. Some illustrations are taken from (KT) Kleinberg and Tardos. Algorithm Design (DPV)Dasgupta, Papadimitriou, and Vazirani. Algorithms.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
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.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
More NP-Complete and NP-hard Problems
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness Yin Tat Lee
ICS 353: Design and Analysis of Algorithms
Richard Anderson Lecture 25 NP-Completeness
Richard Anderson Lecture 28 NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness Yin Tat Lee
Lecture 24 Classical NP-hard Problems
Lecture 23 NP-Hard Problems
Presentation transcript:

Black-box (oracle) Feed me a weighted graph G and I will tell you the weight of the max-weight matching of G.

2 5 2 Black-box (oracle) Feed me a weighted graph G and I will tell you the weight of the max-weight matching of G.

2 5 2 Black-box (oracle) Feed me a weighted graph G and I will tell you the weight of the max-weight matching of G. 5

Black-box (oracle) Feed me a weighted graph G and I will tell you the weight of the max-weight matching of G. here is a graph G, find the max-weight matching G

Black-box (oracle) Feed me a weighted graph G and I will tell you the weight of the max-weight matching of G. here is a graph G, find the max-weight matching pick a vertex u  V(G) for each edge {u,v}  E(G) w  undefined if oracle(G-u-v) + w(u,v) = oracle (G) then w  v if w is undefined then recurse on (G-u) else print({u,w}); recurse on (G-u-v)

3-SAT x = variable  x = negation of a variable literals clause = disjunction of literals x   y  z  x  z

3-SAT INSTANCE: collection C of clauses, each clause has at most 3 literals QUESTION: does there exist an assignment of true/false to the variables which satisfies all the clauses in C

3-SAT INSTANCE: collection C of clauses, each clause has at most 3 literals QUESTION: does there exist an assignment of true/false to the variables which satisfies all the clauses in C x  y  z x  y   z x   y  x

Independent Set subset S of vertices such that no two vertices in S are connected

Independent Set subset S of vertices such that no two vertices in S are connected

Independent Set INSTANCE: graph G SOLUTION: independent set S in G MEASURE: maximize the size of S INSTANCE: graph G, number K QUESTION: does G have independent set of size  K OPTIMIZATION VERSION: DECISION VERSION:

Independent Set  3-SAT “is easier than” if we have a black-box for 3-SAT then we can solve Independent Set in polynomial time Independent Set reduces to 3-SAT

Independent Set  3-SAT if we have a black-box for 3-SAT then we can solve Independent Set in polynomial time Give me a 3-SAT formula and I will tell you if it is satisfiable We would like to solve the Independent Set problem using the black box in polynomial time.

Independent Set  3-SAT Give me a 3-SAT formula and I will tell you if it is satisfiable Graph G, K  3-SAT formula F efficient transformation (i.e., polynomial – time) G has independent set of size  K  F is satisfiable

Independent Set  3-SAT Give me a 3-SAT formula and I will tell you if it is satisfiable Graph G, K  3-SAT formula F V = {1,...,n} variables x 1,....,x n E = edges  x i   x j for ij  E + we need to ensure that  K of the x i are TRUE

3-SAT  Independent Set Give me a graph G and a number K and I will tell you if G has independent set of size  K 3-SAT formula F  graph G, number K

3-SAT  Independent Set Give me a graph G and a number K and I will tell you if G has independent set of size  K 3-SAT formula F  graph G, number K x   y  z w  y   z x w yy y zz z

3-SAT  Independent Set 3-SAT formula F  graph G, number K x   y  z w  y   z x w yy y zz z 1) efficiently computable 2) F satisfiable   IS of size  m 3)  IS of size  m  F satisfiable

3-SAT  Independent Set Independent Set  3-SAT if 3-SAT is in P then Independent Set is in P if Independent Set is in P then 3-SAT is in P 3-SAT Independent Set

Many more reductions 3-SAT Independent Set Clique Subset-Sum 3-COL Planar 3-COL Hamiltonian path

P and NP P = decision problems that can be solved in polynomial time. NP = decision problems for which the YES answer can be certified and this certificate can be verified in polynomial time.

NP = decision problems for which the YES answer can be certified and this certificate can be verified in polynomial time. 3-SAT Independent Set NOT-3-SAT ?

NP = decision problems for which the YES answer can be certified and this certificate can be verified in polynomial time. Every problem A  NP A  3-SAT COOK’S THEOREM

NP = decision problems for which the YES answer can be certified and this certificate can be verified in polynomial time. if every problem A  NP A  B B is NP-hard B is NP-complete if B is NP-hard, and B is in NP

NP P NP-complete NP-hard

3-SAT Independent Set Clique Subset-Sum 3-COL Planar 3-COL Hamiltonian path Some NP-complete problems

Clique subset S of vertices such that every two vertices in S are connected

Clique INSTANCE: graph G, number K QUESTION: does G have a clique of size  K?

Subset-Sum INSTANCE: numbers a 1,...,a n,B QUESTIONS: is there S  {1,...,n} such that   a i = B iSiS

3-COL INSTANCE: graph G QUESTION: can the vertices of G be assigned colors red,green,blue so that no two neighboring vertices have the same color?

3-SAT  3-COL R G B x  x B x yy z G G G G R G=true

Planar-3-COL INSTANCE: planar graph G QUESTION: can the vertices of G be assigned colors red,green,blue so that no two neighboring vertices have the same color?

3-COL  Planar-3-COL

4-COL INSTANCE: graph G QUESTION: can the vertices of G be assigned one of 4 colors so that no two neighboring vertices have the same color?

3-COL  4-COL

G  G

planar 4-COL INSTANCE: planar graph G QUESTION: can the vertices of G be assigned one of 4 colors so that no two neighboring vertices have the same color? planar 3-COL  planar 4-COL ???

4-COL  3-COL Thus: 4-COL  3-COL 4-COL  NP Cook  4-COL  3-SAT 3-SAT  3-COL

2-COL  3-COL

G  G

3-COL  2-COL ??? 2-COL in P