Example: HP ≤ p HC Hamiltonian Path –Input: Undirected Graph G = (V,E) –Y/N Question: Does G contain a Hamiltonian Path? Hamiltonian Cycle –Input: Undirected.

Slides:



Advertisements
Similar presentations
JAYASRI JETTI CHINMAYA KRISHNA SURYADEVARA
Advertisements

Polynomial-time reductions We have seen several reductions:
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.
What is Intractable? Some problems seem too hard to solve efficiently. Question 1: Does an efficient algorithm exist?  An O(a ) algorithm, where a > 1,
The class NP Section 7.3 Giorgi Japaridze Theory of Computability.
Department of Computer Science & Engineering
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Combinatorial Algorithms
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
On the Hardness of Graph Isomorphism Jacobo Tor á n SIAM J. Comput. Vol 33, p , Presenter: Qingwu Yang April, 2006.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Definition of complexity class NP –Nondeterministic computation –Problems.
1 NP-Completeness Objectives: At the end of the lesson, students should be able to: 1. Differentiate between class P, NP, and NPC 2. Reduce a known NPC.
Reduction Techniques Restriction Local Replacement Component Design Examples.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
NP-complete and NP-hard problems
Is the following graph Hamiltonian- connected from vertex v? a). Yes b). No c). I have absolutely no idea v.
Analysis of Algorithms CS 477/677
Near-Optimal Network Design with Selfish Agents By Elliot Anshelevich, Anirban Dasgupta, Eva Tardos, Tom Wexler STOC’03 Presented by Mustafa Suleyman CIFTCI.
NP-complete examples CSC3130 Tutorial 11 Xiao Linfu Department of Computer Science & Engineering Fall 2009.
Odds and Ends HP ≤ p HC (again) –Turing reductions Strong NP-completeness versus Weak NP-completeness Vertex Cover to Hamiltonian Cycle.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
Toward NP-Completeness: Introduction Almost all the algorithms we studies so far were bounded by some polynomial in the size of the input, so we call them.
Complexity Issues Mark Allen Weiss: Data Structures and Algorithm Analysis in Java Lydia Sinapova, Simpson College.
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
Hardness Results for Problems
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
Prof. Swarat Chaudhuri COMP 482: Design and Analysis of Algorithms Spring 2012 Lecture 10.
1 Steiner Tree Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
Polynomial-time reductions We have seen several reductions:
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
NP-COMPLETENESS PRESENTED BY TUSHAR KUMAR J. RITESH BAGGA.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
Unit 9: Coping with NP-Completeness
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Lecture 10: Graph-Path-Circuit
NP-Completeness (Nondeterministic Polynomial Completeness) Sushanth Sivaram Vallath & Z. Joseph.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 29.
Fundamentals of Informatics Lecture 14 Intractability and NP-completeness Bas Luttik.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Discrete Optimization Lecture 4 – Part 1 M. Pawan Kumar
David Luebke 1 2/18/2016 CS 332: Algorithms NP Completeness Continued: Reductions.
CSC 413/513: Intro to Algorithms
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
Discrete Optimization Lecture 6 – Part 1 M. Pawan Kumar
Computational Complexity Shirley Moore CS4390/5390 Fall 2013 August 27, 2013.
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
Introduction to NP Instructor: Neelima Gupta 1.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
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 589 Applied Algorithms Spring 1999 Prim’s Algorithm for MST Load Balance Spanning Tree Hamiltonian Path.
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.
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
NP-Completeness A problem is NP-complete if: It is in NP
Decision trees Polynomial-Time
Richard Anderson Lecture 26 NP-Completeness
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
Depth-First Search Graph Traversals Depth-First Search DFS.
CSE 589 Applied Algorithms Spring 1999
Presentation transcript:

Example: HP ≤ p HC Hamiltonian Path –Input: Undirected Graph G = (V,E) –Y/N Question: Does G contain a Hamiltonian Path? Hamiltonian Cycle –Input: Undirected Graph G = (V,E) –Y/N Question: Does G contain a Hamiltonian Cycle?

Specification of R(x) Consider any undirected graph G = (V,E) as input x R(x) will be a graph G’ = (V’, E’) where –V’ = V union {v} where v is not in V –E’ = E union {(v,w) | w in V} Argument that R(x) has polynomial size –We add exactly 1 node and |V| edges.

x is yes  R(x) is yes Suppose graph G has a Hamiltonian Path Let this path be v 1, v 2, …, v n We now argue that v 1, v 2, …, v n, v is a Hamiltonian Cycle in G’ –First, all nodes in V’ are included exactly once above or else v 1, v 2, …, v n would not be a HP in G –Since G’ has all the edges that G has, (v i,v i+1 ) is an edge in E’ for 1 ≤ i ≤ n-1 –Finally, since E’ contains edge (v,w) for all w in V, it must be the case that E’ contains edges (v n, v) and (v,v 1 ).

R(x) is yes  x is yes Suppose graph G’ has a Hamiltonian Cycle Let this cycle be v 1, v 2, …, v n, v We now argue that v 1, v 2, …, v n is a Hamiltonian Path in G –First, all nodes in V are included exactly once above or else v 1, v 2, …, v n, v would not be a HC in G’ –Since the only extra edges in E’ compared to E are edges involving node v, it must be the case that E contains edge (v i,v i+1 ) for 1 ≤ i ≤ n-1

Turing Reducibility Steve made a suggestion for an alternate reduction. Given graph G, output  (n 2 ) graphs G v,w = (V,E v,w ) where –E v,w = E union {(v,w)} where v,w are nodes in V This is not a polynomial-time reduction because we are outputting  (n 2 ) graphs. However, this idea can be used to show that if HC can be solved in polynomial time, then HP can be solved in polynomial time. –Run each graph G v,w through our procedure that solves HC. –If HC says yes for any one of these graphs, return yes. –Otherwise return no. This more general reduction is often called a Turing reduction. We allow ourselves to use the procedure that solves HC (or  2 ) a polynomial number of times rather than just once.