Reductions Complexity ©D.Moshkovitz.

Slides:



Advertisements
Similar presentations
You have been given a mission and a code. Use the code to complete the mission and you will save the world from obliteration…
Advertisements

Mathematical Preliminaries
Advanced Piloting Cruise Plot.
Chapter 1 The Study of Body Function Image PowerPoint
Analysis of Algorithms
and 6.855J Cycle Canceling Algorithm. 2 A minimum cost flow problem , $4 20, $1 20, $2 25, $2 25, $5 20, $6 30, $
Summary of Convergence Tests for Series and Solved Problems
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
My Alphabet Book abcdefghijklm nopqrstuvwxyz.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Year 6 mental test 10 second questions
Formal Models of Computation Part III Computability & Complexity
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Turing Machines.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
Randomized Algorithms Randomized Algorithms CS648 1.
ABC Technology Project
COMP 482: Design and Analysis of Algorithms
Comp 122, Spring 2004 Graph Algorithms – 2. graphs Lin / Devi Comp 122, Fall 2004 Identification of Edges Edge type for edge (u, v) can be identified.
1 Undirected Breadth First Search F A BCG DE H 2 F A BCG DE H Queue: A get Undiscovered Fringe Finished Active 0 distance from A visit(A)
VOORBLAD.
1 Breadth First Search s s Undiscovered Discovered Finished Queue: s Top of queue 2 1 Shortest path from s.
1 SIP 250, AB We’ll use reductions that, by default, would be of this type, which is called: Polynomial-time mapping reduction Polynomial-time.
BIOLOGY AUGUST 2013 OPENING ASSIGNMENTS. AUGUST 7, 2013  Question goes here!
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
© 2012 National Heart Foundation of Australia. Slide 2.
1 P, NP, and NP-Complete Dr. Ying Lu RAIK 283 Data Structures & Algorithms.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
Chapter 5 Test Review Sections 5-1 through 5-4.
GG Consulting, LLC I-SUITE. Source: TEA SHARS Frequently asked questions 2.
1 On c-Vertex Ranking of Graphs Yung-Ling Lai & Yi-Ming Chen National Chiayi University Taiwan.
Addition 1’s to 20.
25 seconds left…...
Slippery Slope
Complexity ©D.Moshkovits 1 Where Can We Draw The Line? On the Hardness of Satisfiability Problems.
Introduction to Computability Theory
Januar MDMDFSSMDMDFSSS
Week 1.
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Copyright © 2012 Pearson Education, Inc. Chapter 12: Theory of Computation Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear.
PSSA Preparation.
1 Complexity ©D.Moshkovitz Cryptography Where Complexity Finally Comes In Handy…
Bart Jansen 1.  Problem definition  Instance: Connected graph G, positive integer k  Question: Is there a spanning tree for G with at least k leaves?
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
Epp, section 10.? CS 202 Aaron Bloomfield
Complexity ©D.Moshkovitz 1 NPC More NP-Complete Problems.
1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.
1 The TSP : Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell ( )
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 13-1 Complexity Andrei Bulatov Hierarchy Theorem.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
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.
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Class NL.
Analysis of Algorithms CS 477/677
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.
 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
Reductions Complexity ©D.Moshkovitz.
Reductions Complexity ©D.Moshkovitz.
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

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

Observation Theorem: L, NL, P, NP, PSPACE and EXPTIME are closed under log-space reductions. 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