Hamiltonian Circuit (HC) problem

Slides:



Advertisements
Similar presentations
P, NP, NP-Complete Problems
Advertisements

Limitation of Computation Power – P, NP, and NP-complete
Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
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 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.
Complexity 11-1 Complexity Andrei Bulatov NP-Completeness.
Transitivity of  poly Theorem: Let ,  ’, and  ’’ be three decision problems such that   poly  ’ and  ’  poly  ’’. Then  poly  ’’. Proof:
Computability and Complexity 16-1 Computability and Complexity Andrei Bulatov NP-Completeness.
NP-complete examples CSC3130 Tutorial 11 Xiao Linfu Department of Computer Science & Engineering Fall 2009.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Complexity ©D.Moshkovitz 1 Paths On the Reasonability of Finding Paths in Graphs.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Complexity Classes (Ch. 34) The class P: class of problems that can be solved in time that is polynomial in the size of the input, n. if input size is.
MCS 312: NP Completeness and Approximation algorithms Instructor Neelima Gupta
Lecture 22 More NPC problems
NP-complete Problems SAT 3SAT Independent Set Hamiltonian Cycle
Prabhas Chongstitvatana1 NP-complete proofs The circuit satisfiability proof of NP- completeness relies on a direct proof that L  p CIRCUIT-SAT for every.
Polynomial-time reductions We have seen several reductions:
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
Unit 9: Coping with NP-Completeness
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
NP-Complete problems.
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.
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
Young CS 331 D&A of Algo. NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and.
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.
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
Young CS 530 Ad. Algo. D&A NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
The Theory of NP-Completeness
Limitation of Computation Power – P, NP, and NP-complete
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
P & NP.
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
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
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
CS21 Decidability and Tractability
CS154, Lecture 16: More NP-Complete Problems; PCPs
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 NP-Completeness
Richard Anderson Lecture 29 NP-Completeness
Approximation Algorithms
Richard Anderson Lecture 30 NP-Completeness
Prabhas Chongstitvatana
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979.
The Theory of NP-Completeness
CS154, Lecture 16: More NP-Complete Problems; PCPs
Richard Anderson Lecture 27 Survey of NP Complete Problems
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
Lecture 24 Vertex Cover and Hamiltonian Cycle
Presentation transcript:

Hamiltonian Circuit (HC) problem Example 2 : Show that the Traveling Salesman (TS) Problem is NP-complete. Given a known NPC problem - Hamiltonian Circuit (HC), show that TS problem is NPC. Hamiltonian Circuit (HC) problem Instance : Give an undirected graph G=(V, E) Question : Does G contain a Hamiltonian circuit, i.e. a sequence < v1, v2, …, vn > of all vertices in V which is a simple cycle. Young CS 530 Ad. Algo. D&A NP-Completeness

Traveling Salesman (TS) Problem Instance : Give an undirected complete graph G=(V, E) with distance d(i,j)  0 for each edge (i,j) for i  j and a positive integer B. Question : Is there a tour of all cities (a simple cycle with all vertices) having total distance no more than B. TS is in NP guess a tour, i.e. sequence of all vertices O(|V|) verify that it is a cycle covering all vertices and total distance  B O(|V|) Young CS 530 Ad. Algo. D&A NP-Completeness

Given arbitrary instance of HC, i.e. G=(V, E). HC  TS Given arbitrary instance of HC, i.e. G=(V, E). Construct an instance of TS as follows : G’ = (V , E’ ), where (u,v)  E’ for all u, v  V and u  v d(u,v) = 0 if (u,v)  E d(u,v) = 1 if (u,v)  E and B = 0 Note : The transformation can be done in polynomial time (based on input size of V and E) Young CS 530 Ad. Algo. D&A NP-Completeness

To show the transformation is correct : The HC problem has a solution if and only if the TS problem has a solution. If HC problem has a solution, then TS problem has a solution Assume a < v1, v2, …, vn > is the solution for HC  It is a simple cycle which contains all vertices  Each edge (u,v) in this cycle has d(u,v) = 0  Total distance is 0  Solution for TS If TS problem has a solution then HC problem has a solution Obvious to see. Young CS 530 Ad. Algo. D&A NP-Completeness

Example 3 : Show that the Vertex Cover (VC) Problem is NP-complete. Given 3SAT problem is NPC, show that VC problem is NPC. 3SAT Problem Instance : Given a set of variables U = {u1, u2, …, un} and a collection of clauses C = {c1, c2, …, cm} over U such that | ci | = 3 for 1  i  m. Question : Is there a truth assignment for U that satisfies all clauses in C? Note : 3SAT problem is a restricted problem of SATISFIABILITY problem. Young CS 530 Ad. Algo. D&A NP-Completeness

Vertex Cover (VC) Problem Instance : Given an undirected graph G=(V, E) and a positive integer K  |V| Question : Is there a vertex cover of size K or less for G, i.e. a subset V’  V such that |V’|  K and, for each (u,v)  E, at least one of u or v  V’. VC is in NP guess a set of vertices V’  V O(|V|) verify that |V’|  K and, for each (u,v)  E, u  V’ or v  V’ O(|V|+|E|) Young CS 530 Ad. Algo. D&A NP-Completeness