Reductions Complexity ©D.Moshkovitz.

Slides:



Advertisements
Similar presentations
Reductions Complexity ©D.Moshkovitz.
Advertisements

1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.
 2004 SDU Lecture17-P,NP, NPC.  2004 SDU 2 1.Decision problem and language decision problem decision problem and language 2.P and NP Definitions of.
1 ©D.Moshkovitz Complexity The Traveling Salesman Problem.
1 The TSP : Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell ( )
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
Complexity ©D Moshkovitz 1 Approximation Algorithms Is Close Enough Good Enough?
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
Complexity ©D.Moshkovitz 1 Turing Machines. Complexity ©D.Moshkovitz 2 Motivation Our main goal in this course is to analyze problems and categorize them.
The Theory of NP-Completeness
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Class NL.
Analysis of Algorithms CS 477/677
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
Complexity ©D.Moshkovitz 1 Paths On the Reasonability of Finding Paths in Graphs.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
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.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
 2005 SDU Lecture15 P,NP,NP-complete.  2005 SDU 2 The PATH problem PATH = { | G is a directed graph that has a directed path from s to t} s t
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
Complexity Classes.
The NP class. NP-completeness
P & NP.
NP-Completeness NP-Completeness Graphs 5/7/ :49 PM x x x x x x x
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Part VI NP-Hardness.
Decision trees Polynomial-Time
Richard Anderson Lecture 26 NP-Completeness
Lecture 22 Complexity and Reductions
Complexity Introduction Complexity ©D.Moshkovitz.
NP-Completeness Yin Tat Lee
CS21 Decidability and Tractability
Intro to Theory of Computation
NP-Completeness NP-Completeness Graphs 11/16/2018 2:32 AM x x x x x x
CS154, Lecture 16: More NP-Complete Problems; PCPs
Where Can We Draw The Line?
Parameterised Complexity
NP-Completeness NP-Completeness Graphs 12/3/2018 2:46 AM x x x x x x x
Richard Anderson Lecture 28 NP-Completeness
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
Halting Problem.
CSC 4170 Theory of Computation The class NP Section 7.3.
More NP-Complete Problems
CS154, Lecture 13: P vs NP.
NP-completeness The Chinese University of Hong Kong Fall 2008
CS 3343: Analysis of Algorithms
Turing Machines Complexity ©D.Moshkovitz.
Time Complexity Classes
CSC 4170 Theory of Computation The class NP Section 7.3.
NP-Completeness Yin Tat Lee
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
Our First NP-Complete Problem
CS154, Lecture 16: More NP-Complete Problems; PCPs
Reductions Complexity ©D.Moshkovitz.
CSE 589 Applied Algorithms Spring 1999
More NP-Complete Problems
RAIK 283 Data Structures & Algorithms
Theory of Computability
ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
Presentation transcript:

Reductions Complexity ©D.Moshkovitz

Motivation Reductions are our main tool for comparison between problems. Complexity ©D.Moshkovitz

Introduction Objectives: To formalize the notion of “reductions”. Overview: Karp reductions HAMPATH p HAMCYCLE Closeness under reductions Cook reductions Completeness Complexity ©D.Moshkovitz

Reductions – Concept p IF problem A can be efficiently translated to problem B… A B p THEN B is at least as hard as A. Complexity ©D.Moshkovitz

Reductions – Formal Definition SIP 250 Reductions – Formal Definition I.e – there exists a polynomial time TM which halts with f(w) on its tape when given input w. Definition: Language A is polynomial time reducible to language B if… a polynomial time computable function f:** exists, where for every w, wA  f(w)B Denote Ap B f is referred to as a polynomial-time reduction of A to B. Complexity ©D.Moshkovitz

Reductions and Algorithms * B * - B A f * - A * Complexity ©D.Moshkovitz

Reductions and Algorithms polynomial time algorithm for A f polynomial time algorithm for B f(w)B? f(w) wA? w Complexity ©D.Moshkovitz

How to Reduce? Construct f. Show f is polynomial time computable. Prove f is a reduction, i.e show: If wA then f(w)B If f(w)B then wA Complexity ©D.Moshkovitz

Terminology The type of reductions we’ve just described is also called: Polynomial-time mapping reduction Polynomial-time many-one reduction Polynomial-time Karp reduction We’ll always refer to such reductions unless otherwise specified. Complexity ©D.Moshkovitz

Example To demonstrate a reduction, we’ll revisit the example we gave in the introduction. We’ll rephrase and formalize the seating and tour problems And demonstrate a slightly different reduction between them. Complexity ©D.Moshkovitz

Hamiltonian Path Instance: a directed graph G=(V,E) and two vertices stV. Problem: To decide if there exists a path from s to t, which goes through each node once. In the version presented in the introduction we asked for some path, without specifying the start and end vertices. Complexity ©D.Moshkovitz

Hamiltonian Cycle Instance: a directed graph G=(V,E). Problem: To decide if there exists a simple cycle in the graph which goes through each node exactly once. Complexity ©D.Moshkovitz

HAMPATH p HAMCYCLE f( <G=(V,E),s,t> ) = <G’=(V{u},E{(u,s),(t,u)})> f( <G=(V,E),s,t> ) = <G’=(V{u},E{(u,s),(t,u)})> f( <G=(V,E),s,t> ) = <G’=(V{u},E{(u,s),(t,u)})> f( <G=(V,E),s,t> ) = <G’=(V{u},E{(u,s),(t,u)})> s t n s t p Complexity ©D.Moshkovitz

Correctness (Completeness) If there exists a Hamiltonian path (v0=s,v1,…,vn=t) in the original graph, then (u,v0=s,v1,…,vn=t,u) is a Hamiltonian cycle in the new graph. Complexity ©D.Moshkovitz

Correctness (Soundness) (u,s) and (t,u) must be in any Hamiltonian cycle in the constructed graph, thus removing u yields a Hamiltonian path from s to t. Complexity ©D.Moshkovitz

 How to Reduce?     Construct f. Show f is polynomial time computable. Prove f is a reduction, i.e show: If wHAMPATH then f(w)HAMCYCLE If f(w)HAMCYCLE then wHAMPATH  easy to verify    Complexity ©D.Moshkovitz

Closeness Under Reductions Definition: A complexity class C is closed under reductions if, whenever L is reducible to L’ and L’C, then L is also in C. C L’  L Complexity ©D.Moshkovitz

Observation Theorem: P, NP, PSPACE and EXPTIME are closed under polynomial-time Karp reductions. Proof: Filling in the exact details is left to the reader. (See sketch) Complexity ©D.Moshkovitz

Other Types of Reductions Cook Reduction: Use an efficient “black box” (procedure) that decides B, to construct a polynomial-time machine which decides A. polynomial time algorithm for B polynomial time algorithm for A Complexity ©D.Moshkovitz

Cook reduction of HAMCYCLE to HAMPATH. For each edge (u,v)E, if there’s a Hamiltonian path from v to u in the graph where (u,v) is removed, output ‘YES’, exit Output ‘NO’ Make sure it’s efficient! HAMPATH oracle Complexity ©D.Moshkovitz

How do Cook and Karp Reductions Differ? Cook reductions allow us to call the procedure many times (instead of 1). When Karp reducing, we must output the answer of the procedure. Complexity ©D.Moshkovitz

On the Relation Between Cook and Karp Reductions Observation: Karp reductions are special cases of Cook reductions. Complexity ©D.Moshkovitz

Food for Thought… Which complexity classes are closed under Cook reductions? Complexity ©D.Moshkovitz

Completeness Definition: Let C be a complexity class and let L be a language. We say L is C-Complete if: L is in C For every language AC, A is reducible to L. Complexity ©D.Moshkovitz

C-Complete Languages hardness C-Complete C Complexity ©D.Moshkovitz

Observation Theorem: If two classes C and C’ are both closed under reductions (of some specific type) and there is a language L which is complete for both C and C’, then C=C’. Proof: W.l.o.g we’ll only show CC’. All languages in C are reducible to L. Since C’ is closed under reductions, it follows that CC’.  Complexity ©D.Moshkovitz

Corollary ? If any NP-Complete problem is in P, then P=NP. Complexity ©D.Moshkovitz

 Summary In this lecture we’ve introduced many types of reductions: Cook/Karp reductions Polynomial-time reductions We’ve defined the notion of completeness And seen how it can help us prove equality of complexity classes. Nevertheless, we are still not convinced complete languages even exist. Complexity ©D.Moshkovitz