We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byPerry Eldridge
Modified over 2 years ago
Complexity ©D.Moshkovitz 1 Reductions
Complexity ©D.Moshkovitz 2 Motivation Reductions are our main tool for comparison between problems.
Complexity ©D.Moshkovitz 3 Introduction Objectives: –To formalize the notion of reductions. Overview: –Karp reductions –HAMPATH p HAMCYCLE –Closeness under reductions –Cook reductions –Completeness
Complexity ©D.Moshkovitz 4 Reductions – Concept A p B IF problem A can be efficiently translated to problem B… THEN B is at least as hard as A.
Complexity ©D.Moshkovitz 5 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 Reductions – Formal Definition SIP 250 I.e – there exists a polynomial time TM which halts with f(w) on its tape when given input w. f is referred to as a polynomial-time reduction of A to B. Denote A p B
Complexity ©D.Moshkovitz 6 Reductions and Algorithms * A * - A f * B * - B
Complexity ©D.Moshkovitz 7 Reductions and Algorithms f polynomial time algorithm for A polynomial time algorithm for B w f(w) B ? f(w) w A ?
Complexity ©D.Moshkovitz 8 How to Reduce? 1.Construct f. 2.Show f is polynomial time computable. 3.Prove f is a reduction, i.e show: 1.If w A then f(w) B 2.If f(w) B then w A
Complexity ©D.Moshkovitz 9 Terminology The type of reductions weve just described is also called: –Polynomial-time mapping reduction –Polynomial-time many-one reduction –Polynomial-time Karp reduction Well always refer to such reductions unless otherwise specified.
Complexity ©D.Moshkovitz 10 Example To demonstrate a reduction, well revisit the example we gave in the introduction. Well rephrase and formalize the seating and tour problems And demonstrate a slightly different reduction between them.
Complexity ©D.Moshkovitz 11 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 12 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 13 f( ) = HAMPATH p HAMCYCLE p f( ) = s t s t n
Complexity ©D.Moshkovitz 14 Correctness (Completeness) If there exists a Hamiltonian path (v 0 =s,v 1,…,v n =t) in the original graph, then (u,v 0 =s,v 1,…,v n =t,u) is a Hamiltonian cycle in the new graph.
Complexity ©D.Moshkovitz 15 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 16 How to Reduce? 1.Construct f. 2.Show f is polynomial time computable. 3.Prove f is a reduction, i.e show: 1.If w HAMPATH then f(w) HAMCYCLE 2.If f(w) HAMCYCLE then w HAMPATH easy to verify
Complexity ©D.Moshkovitz 17 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. L L C
Complexity ©D.Moshkovitz 18 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)See sketch
Complexity ©D.Moshkovitz 19 Log-Space Reductions Definition: Language A is log-space reducible to language B if… where for every w, w A f(w) B a log-space computable function f: * * exists, I.e – there exists a log-space TM which halts with f(w) on its tape when given input w. f is referred to as a log-space reduction of A to B. Denote A L B
Complexity ©D.Moshkovitz 20 Observation Theorem: L, NL, P, NP, PSPACE and EXPTIME are closed under log-space reductions.
Complexity ©D.Moshkovitz 21 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 A polynomial time algorithm for B
Complexity ©D.Moshkovitz 22 Cook reduction of HAMCYCLE to HAMPATH. For each edge (u,v) E, –if theres a Hamiltonian path from v to u in the graph where (u,v) is removed, output YES, exit Output NO HAMPATH oracle Make sure its efficient!
Complexity ©D.Moshkovitz 23 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 24 On the Relation Between Cook and Karp Reductions Observation: Karp reductions are special cases of Cook reductions.
Complexity ©D.Moshkovitz 25 Food for Thought… Which complexity classes are closed under Cook reductions?
Complexity ©D.Moshkovitz 26 Completeness Definition: Let C be a complexity class and let L be a language. We say L is C-Complete if: 1.L is in C 2.For every language A C, A is reducible to L.
Complexity ©D.Moshkovitz 27 C-Complete Languages C C-Complete hardness
Complexity ©D.Moshkovitz 28 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 well 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 29 Corollary If any NP-Complete problem is in P, then P=NP.
Complexity ©D.Moshkovitz 30 Summary In this lecture weve introduced many types of reductions: –Cook/Karp reductions –Polynomial-time reductions Weve 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.
Analysis of Algorithms NP & NP-Complete Prof. Muhammad Saeed.
CS4026 Formal Models of Computation Part III Computability & Complexity Part III-A – Computability Theory.
1 P, NP, and NP-Complete Dr. Ying Lu RAIK 283 Data Structures & Algorithms.
Automata Theory CS 3313 Chapter 4 An Introduction to Finite Automata.
1 NP-Completeness Zeph Grunschlag. 2 Announcement HW9 Due Now HW Amnesty I’ll drop your lowest hw score.
NP-Complete Proof of correctness; More reductions.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
NP CS 4102: Algorithms Spring 2011 Aaron Bloomfield 1.
1 § 1-4 Limits, Continuity, and Intermediate Value Thereom The student will learn about: limits, infinite limits, and continuity. limits, finding limits,
CS 336 March 19, 2012 Tandy Warnow. Basic Graph Terminology Nodes, vertices, edges, degrees, paths, cycles, connected components, adjacency, isolated.
Algorithm Analysis. Assignment #8 Submit in PDF format ONLY !!! Assignment will NOT be accepted in format other than pdf. See and blackboard announcements.
Lecture 07: Theory of Automata:08 Properties of Regular Languages.
1 Incomputable Languages Zeph Grunschlag. 2 Announcements HW Due Tuesday.
Complexity Theory Lecture 8 Lecturer: Moni Naor. Recap Last week: –Randomized Reductions –Low memory verifiers –#P Completeness of Permanent This Week:
Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Computational Learning Theory.
Computational Complexity. Problem complexity vs. algorithmic complexity Upper bounds vs. lower bounds Exact solutions vs. approximate solutions Deterministic.
1 Optimization Spring Some practical remarks Lecturers: Kristoffer Arnsfelt Hansen and Peter Bro Miltersen. Homepage:
Page 0. Page 1 Section IThe Basics Page 2 Antiderivatives If I ask you what is the derivative of x, you will say 1. If I ask you what is the antiderivative.
Checking -Calculus Structural Congruence is Graph Isomorphism Complete Victor Khomenko 1 and Roland Meyer 2 1 School of Computing Science, Newcastle.
1 Introduction to Algorithms 6.046J/18.401J/SMA5503 Lecture 18 Prof. Erik Demaine.
5.3 Inverse Function. After this lesson, you should be able to: Verify that one function is the inverse function of another function. Determine whether.
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.
Copyright © Cengage Learning. All rights reserved. 2.2 Polynomial Functions of Higher Degree.
Dr. A.I. Cristea CS 319: Theory of Databases.
1 Excursions in Modern Mathematics Sixth Edition Peter Tannenbaum.
© Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems Introduction.
Lower Bounds for Local Search by Quantum Arguments Scott Aaronson.
© 2016 SlidePlayer.com Inc. All rights reserved.