Reductions in Computability Theory

Similar documents
Computability Crib Sheet

Lecture Notes: The Halting Problem; Reductions

Decidability: Reduction Proofs

1 Reducability. CSCC63 Worksheet Reducability. For your reference, A T M is defined to be the language { M, w M accepts w}. Theorem 5.

CSE 105 THEORY OF COMPUTATION

CS 125 Section #10 (Un)decidability and Probability November 1, 2016

Turing Machines Part III

ECS 120 Lesson 18 Decidable Problems, the Halting Problem

Turing Machines, diagonalization, the halting problem, reducibility

Non-emptiness Testing for TMs

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch

CS154, Lecture 10: Rice s Theorem, Oracle Machines

Introduction to Turing Machines. Reading: Chapters 8 & 9

Lecture 12: Mapping Reductions

Decidability and Undecidability

1 Showing Recognizability

Computational Models Lecture 9, Spring 2009

Introduction to Languages and Computation

2 Computable and Computably Enumerable Sets

Decidability. Linz 6 th, Chapter 12: Limits of Algorithmic Computation, page 309ff

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012

Computation Histories

V Honors Theory of Computation

CSCE 551: Chin-Tser Huang. University of South Carolina

Theory of Computation

CSCE 551 Final Exam, Spring 2004 Answer Key

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

Computability and Complexity

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 1 Turing Reducibility

A non-turing-recognizable language

On Rice s theorem. Hans Hüttel. October 2001

SD & Turing Enumerable. Lecture 33: Reductions and Undecidability. Lexicographically Enumerable. SD & Turing Enumerable

Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009

problem X reduces to Problem Y solving X would be easy, if we knew how to solve Y

Turing Machines Part Three

CSE 105 THEORY OF COMPUTATION

Undecidable Problems and Reducibility

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page.

Automata Theory CS S-FR2 Final Review

UNIT-VIII COMPUTABILITY THEORY

Mapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement:

CS154, Lecture 17: conp, Oracles again, Space Complexity

Chap. 4,5 Review. Algorithms created in proofs from prior chapters

CSCE 551: Chin-Tser Huang. University of South Carolina

CSE 105 Theory of Computation

CSCE 551 Final Exam, April 28, 2016 Answer Key

Undecidability. Andreas Klappenecker. [based on slides by Prof. Welch]

CSCI3390-Lecture 6: An Undecidable Problem

CSE 105 Theory of Computation

CSE 105 THEORY OF COMPUTATION

Turing Machines. Reading Assignment: Sipser Chapter 3.1, 4.2

Reading Assignment: Sipser Chapter 3.1, 4.2

16.1 Countability. CS125 Lecture 16 Fall 2014

Languages, regular languages, finite automata

34.1 Polynomial time. Abstract problems

ITCS:CCT09 : Computational Complexity Theory Apr 8, Lecture 7

Turing Machine Recap

CS 7220 Computational Complexity and Algorithm Analysis

Theory of Computation

CS 361 Meeting 26 11/10/17

Undecidability. We are not so much concerned if you are slow as when you come to a halt. (Chinese Proverb)

CS5371 Theory of Computation. Lecture 15: Computability VI (Post s Problem, Reducibility)

What languages are Turing-decidable? What languages are not Turing-decidable? Is there a language that isn t even Turingrecognizable?

The Unsolvability of the Halting Problem. Chapter 19

Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK

Advanced Undecidability Proofs

Computability and Complexity

CS481F01 Solutions 8

CPSC 421: Tutorial #1

TURING MAHINES

Exam Computability and Complexity

1 Computational Problems

Notes on Complexity Theory Last updated: November, Lecture 10

CS5371 Theory of Computation. Lecture 14: Computability V (Prove by Reduction)

4.2 The Halting Problem

Mapping Reductions. Mapping Reductions. Introduction to Computability. Theory. Mapping Reductions. Lecture13: Mapping. Reductions

Theory of Computation (IX) Yijia Chen Fudan University

ACS2: Decidability Decidability

Decidability (What, stuff is unsolvable?)

Computational Models Lecture 8 1

Notes for Lecture Notes 2

Decidability: Church-Turing Thesis

The Turing Machine. Computability. The Church-Turing Thesis (1936) Theory Hall of Fame. Theory Hall of Fame. Undecidability

6.045 Final Exam Solutions

Week 3: Reductions and Completeness

CS5371 Theory of Computation. Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)

CSE 105 THEORY OF COMPUTATION

Decidable Languages - relationship with other classes.

(Refer Slide Time: 0:21)

Further discussion of Turing machines

Solutions to Old Final Exams (For Fall 2007)

A Note on Turing Machine Design

Problems, and How Computer Scientists Solve Them Manas Thakur

DRAFT. Diagonalization. Chapter 4

} Some languages are Turing-decidable A Turing Machine will halt on all inputs (either accepting or rejecting). No infinite loops.

CSCI3390-Assignment 2 Solutions

P is the class of problems for which there are algorithms that solve the problem in time O(n k ) for some constant k.

Computational Models Lecture 8 1

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 10 Nancy Lynch

Transcription:

Reductions in Computability Theory Prakash Panangaden 9 th November 2015 The concept of reduction is central to computability and complexity theory. The phrase P reduces to Q is often used in a confusing way. In this note I will clarify how it is used and explain the difference between two different notions of reduction: many-one reduction and Turing reduction. Intuitively P reduces to Q means that if you can solve problem Q then you can solve problem P. A reduction is an explicit proof of this implication. The notation is P Q. The phrasing is, in my opinion confusing, whereas the notation conveys a clear message. If P Q then Q is more difficult than P, this is what the notation suggests. If Q is more difficult than P then if we show P Q and P is something that we know is undecidable then we know that Q must be undecidable. This is usually how we use reductions. We start with HP Q where HP stands for the halting problem and thus show Q is undecidable. Thus we expand out stock of undecidable problems. When we know that Q is undecidable we can do another reduction Q R and now we know that the problem R is undecidable. Thus the relation is transitive: we can chain reductions together. It is time for some precise definitions. We assume that we are working with some fixed alphabet Σ and we are considering strings in Σ. We assume that all the problems that we consider are language membership problems. Recall that a language is just a subset of Σ. This is not a restriction: all computational problems can be recast easily as language membership problems. Now we can talk about a language A being reduced to B: this means that if you can solve the problem is the word w in B? you can solve the problem is the word x in A? Definition 1. A language A is said to be mapping reducible to 1 B, 1 Many, in fact, most books call this many-one reducibility. 1

written A m B, if there is a total computable function f : Σ Σ such that x A if and only if f(x) B. The function f is called the reduction. Even though there is an if and only if in the definition it is not a symmetric concept. If we have such a reduction and we have an algorithm to decide membership in B we can clearly use it to decide membership in A. It is crucial that we have the if and only if for this to work correctly. Note, however, that if we had an algorithm to decide membership in A it cannot be used to decide membership in B. Why not? Because there is no reason to assume that f is a surjection. So given a word w for which we wish to answer the question is w in B? we would need to find an x such that f(x) = w: there is no reason to think that we can find such an x. The following theorem is obvious from the discussion above. Theorem 2. If A m B and B is decidable then A is decidable. Conversely, if A is undecidable then B must be undecidable. In fact mapping reduction is a very strong relation and can be used to establish more. Theorem 3. If A m B and B is CE (or Turing recognizable) then so is A. If A is not CE then neither is B. Proof. Suppose that B is CE so there is an algorithm isinb which on an input x will halt and say true if x is in B and may loop forever if x is not in B. Now we define an algorithm isina as follows: 1. Read input x 2. Apply f to x to produce y 3. Run isinb on y 4. Output whatever the line 3 produces Line 2 must terminate because f is total. If x is in A and the reduction is correct then f(x) = y B. Since we have an algorithm isinb that is guaranteed to terminate and say true if its input is in B we know that isina terminates and says true if x A. If x is not in A, then f(x) will not be in B and line 3 may run forever. Thus A is CE. If A is not CE, then B cannot be CE by contraposing what we just proved. Recall that a set is called co-ce if its complement is CE. Thus the nonhalting set def = { M, x M(x) } H T M is a typical example of a co-ce set. We can use mapping reductions to 2

show that some sets are not CE by showing reductions from this set. First an important observation. It says that mapping reduction respects complementation. It is obvious from the definition of m. Observation 4. If A m B then A m B. Now we can state the following corollary. Corollary 5. If A m B and A is CE but not decidable then B is not co-ce. Proof. If B were co-ce then B would be CE and the mapping reduction could be rewritten as A m B so we would have that A is CE. But if A is CE and A is also CE then A is decidable. This contradicts the assumption that A is not decidable. Now for an example. We define the language of (encodings of) Turing machines that accept nothing: EMP T M def = { M L(M) = }. Intuitively, this should be clearly undecidable. We will prove this by showing A T M m EMP T M. We need to define a reduction function f : Σ Σ which is total and computable. We assume that Σ consists of all the characters that one has in a typical programming language. The problem we are trying to solve is: given M, w, the encoding of a Turing machine M and a word w, accept if and only if M accepts w. Our reduction function has to work with any string, not just strings that are encodings of acceptance problems. We settle this by mapping any string that is not of the right form to the string fubar. This string is certainly not part of EMP T M so we are fine. Now, we define a new TM M : Input x Simulate M on w If M accepts w accept x Now clearly if M accepts w, M will accept every input and if M does not accept w then M will not accept anything. Thus w L(M) L(M ). We do not ever run M. We write the code of M and feed M to the supposed decision algorithm for EMP T M. Thus if we could decide EMP T M we could decide A T M which we know is impossible. Our function f reads its input, if it is in the right format it will output the code of M, if it is in 3

the wrong format it will output fubar ; this is a total computable string to string function. In subsequent discussions I will not mention what to do if the strings are not in the right format to constitute an instance of the decision problem of interest. Of course, this also shows that EMP T M is undecidable. However, it is impossible to find a mapping reduction from A T M to EMP T M. If we could do that we would have also shown that A T M m EMP T M. But we can easily see by dovetailing that EMP T M is CE. Then we would conclude that A T M is CE, hence A T M is co-ce; but we known that A T M is CE. These two facts together imply that A T M is decidable, a contradiction. An easy exercise at this point is to show EMP T M m A T M ; this also shows that EMP T M is CE and hence that EMP T M is co-ce. A slight modification of your solution to this exercise will show that EMP T M m A T M. Here is the solution to EMP T M m A T M. We take the input M given as an instance of the problem M EMP T M. We construct the code of the following Turing machine M : Input x (ignored) Dovetail M on all words If it accepts any word accept x Now clearly M does not accept the empty word if and only L(M) =. What we definitely do not have is EMP T M m A T M. I will now describe a more liberal notion of reduction called Turing reduction. Definition 6. Let P be a language (or decision problem). We say that M is a Turing machine with oracle P, written M P if M is an ordinary Turing machine which can at any time obtain, in one step, a definite answer to the question w P for any word w. An example is a Turing machine which can consult an oracle and find the answer to the halting problem for any instance of HP. Now suppose that I have a TM equipped with an oracle for A T M. With such a TM I can solve the emptiness problem. Here is how: given M, we define a new machine called N which works as follows: Input x (ignored) Dovetail M on all words If M accepts any word accept x We then ask our oracle if N, ε A T M. If the oracle says no accept 4

M else reject. If L(M) = then N does not accept ε. Thus by flipping the oracle s answer we can answer the emptiness problem for the original machine. This shows that EMP T M T M A T M. Definition 7. We say that A Turing reduces to B, written A T B, if a Turing machine with an oracle for B can answer membership queries for A. What we have shown above is EMP T M T A T M. This shows that Turing reduction is more liberal than mapping reduction. Every mapping reduction is a valid Turing reduction but not vice-versa. Turing reduction is not sensitive to complementation. Thus, for example, one can easily 2 show that A T M T A T M which is of course not possible with mapping reduction. Here is the basic result about Turing reduction. Theorem 8. If A T B and if A is undecidable then B is also undecidable. If B is decidable then A is decidable. Thus, if we want to show undecidability Turing reduction is enough. Mapping reductions are harder to construct but they give more information. It is sometimes hard for beginners to see the real difference between mapping reduction and Turing reduction in specific instances. If we look closely at the Turing reductions above we asked the oracle a question and we did some post-processing on the oracle s answer. In mapping reduction we packaged a question to the oracle (this is what f does) but we do not get to do anything with the answer other than return it; we cannot even negate it. More generally, with Turing reduction we can ask the oracle many questions but with mapping reduction we get just one question and no post-processing of the answer. Turing reduction is deep and interesting but we will not explore it in any depth. We will only use it to establish undecidability. 2 Indeed this is trivial, make sure you understand this. 5