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

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

Computability and Complexity

CS154, Lecture 10: Rice s Theorem, Oracle Machines

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

CSE 105 Theory of Computation

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite

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

CS481F01 Solutions 8

CS20a: Turing Machines (Oct 29, 2002)

Opleiding Informatica

V Honors Theory of Computation

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

Lecture 20: conp and Friends, Oracles in Complexity Theory

Turing Machine Recap

1 Showing Recognizability

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

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

CSE 105 THEORY OF COMPUTATION

Lecture Notes: The Halting Problem; Reductions

Reductions in Computability Theory

There are two main techniques for showing that problems are undecidable: diagonalization and reduction

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

Computational Models Lecture 8 1

CSE 105 THEORY OF COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Computability Crib Sheet

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

CSE 105 THEORY OF COMPUTATION

Homework 8. a b b a b a b. two-way, read/write

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

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

Theory of Computation

CSE 105 Theory of Computation

17.1 The Halting Problem

Computation Histories

Computational Models Lecture 8 1

1 PSPACE-Completeness

Decidability: Church-Turing Thesis

Further discussion of Turing machines

CS20a: Turing Machines (Oct 29, 2002)

Lecture 12: Mapping Reductions

Introduction to Turing Machines. Reading: Chapters 8 & 9

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

Computability Theory. CS215, Lecture 6,

Exam Computability and Complexity

Computational Models Lecture 9, Spring 2009

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

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

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

CpSc 421 Homework 9 Solution

Computability Theory

AN INTRODUCTION TO COMPUTABILITY THEORY

Final exam study sheet for CS3719 Turing machines and decidability.

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

Umans Complexity Theory Lectures

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

CSE 555 Homework Three Sample Solutions

Limits of Computability

Computational Models Lecture 8 1

2 Computable and Computably Enumerable Sets

6.045 Final Exam Solutions

Notes for Lecture Notes 2

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

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

Undecibability. Hilbert's 10th Problem: Give an algorithm that given a polynomial decides if the polynomial has integer roots or not.

Introduction to Turing Machines

Computable Functions

Equivalent Variations of Turing Machines

COL 352 Introduction to Automata and Theory of Computation Major Exam, Sem II , Max 80, Time 2 hr. Name Entry No. Group

Automata Theory CS S-FR2 Final Review

Griffith University 3130CIT Theory of Computation (Based on slides by Harald Søndergaard of The University of Melbourne) Turing Machines 9-0

DRAFT. Diagonalization. Chapter 4

The Power of One-State Turing Machines

Decidability and Undecidability

Advanced topic: Space complexity

1 Computational Problems

1 Circuit Complexity. CS 6743 Lecture 15 1 Fall Definitions

CS 361 Meeting 26 11/10/17

Introduction to Languages and Computation

Decidability: Reduction Proofs

JASS 06 Report Summary. Circuit Complexity. Konstantin S. Ushakov. May 14, 2006

16.1 Countability. CS125 Lecture 16 Fall 2014

Introduction. Foundations of Computing Science. Pallab Dasgupta Professor, Dept. of Computer Sc & Engg INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Undecidability and Rice s Theorem. Lecture 26, December 3 CS 374, Fall 2015

An example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM

Problems, and How Computer Scientists Solve Them Manas Thakur

Name: Student ID: Instructions:

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA)

Reducability. Sipser, pages

Informal Statement Calculus

Undecidable Problems and Reducibility

198:538 Complexity of Computation Lecture 16 Rutgers University, Spring March 2007

ECS 120 Lesson 18 Decidable Problems, the Halting Problem

TURING MAHINES

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

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

Functions on languages:

Primitive recursive functions: decidability problems

EQUIVALENCE RELATIONS (NOTES FOR STUDENTS) 1. RELATIONS

Transcription:

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

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 2 FINITE We have already seen that the language FINITE = {< M, x >: L(M) is finite} is undecidable and it is neither r.e. nor co-r.e. (does not belong to Σ 0 1 or Π 0 1). In the following lectures we shall try to find an appropriate place for FINITE, and will introduce a hierarchy of undecidable problems.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 3 Oracle An oracle for a language L over Σ or a subset A of natural numbers is a device (magical) that decides the membership question for the language or the subset.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 4 Relative Computability Suppose there is an oracle for MP a. Can that be used by a Turing machine to decide all (or some) other undecidable languages e.g. HP, EMPTY, FINITE etc.? a MP = {< M, x >: M is a Turing machine and x L(M)}.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 5 Oracle Turing Machine An oracle Turing machine M L is a Turing machine M equipped with an oracle for the language L. The oracle Turing machine M L can send a membership query about a string (x? L) to the oracle and can get yes/no answer. The computation continues depending on the answer.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 6 What is an Oracle? The first answer is, we don t care. But then we may view an oracle for a language L as an infinite length read-only tape, where the member strings of L (elements of A) are written in some order (lexicographic). The oracle Turing machine can search the tape for a string and can get yes/no answer in finite time.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 7 What is an Oracle? Problem with such a device is the infinite information, which is not permitted in a normal Turing machine.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 8 A T B A Turing machine with an oracle for a language B is denoted by M B. If a language A is decided by an oracle Turing machine M B, then we call A to be decidable relative to B, or A is Turing reducible to B, and we write A T B. A is also called recursive in B or B-recursive.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 9 B-recursively enumerable Similarly, A is r.e. relative to B, if A is accepted by M B i.e. A = L(M B ). The language is also called r.e. in B or B-recursively enumerable.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 10 HP T MP M MP : input < M, x > 1. Modify M by changing the reject states also to accept states. Call it M. 2. Ask the oracle whether < M, x > MP. 3. If the answer is yes, accept; else reject.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 11 HP T MP M accepts x iff M halts on x. M MP decides HP or HP is decided relative to MP.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 12 MP T HP M HP : input < M, x > 1. Modify M by changing the reject state to a non-reject state (modify the out going transitions). There may be a new non-reachable reject state. Call the new machine M. 2. Ask the oracle whether < M, x > HP. 3. If the answer is yes, accept; else reject.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 13 Properties of T Let A be recursive in B (A T B). If B is recursive, then so is A. If B is r.e., then so is A. If A is undecidable, then so is B. In general, A is no more difficult than B.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 14 Properties of T 1. L T L - reflexive. 2. If L 1 T L 2 and L 2 T L 3, then L 1 L 3 - transitive. 3. L T L. Note that MP m MP (otherwise MP will be r.e.).

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 15 Properties of T There are r.e. languages A and B so that A T B and also B T A. The Turing reducibility relation T is not a total order.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 16 Properties of T A T B iff A T B and B T A. As an example MP T HP. It is not difficult to prove that T is an equivalence relation (reflexive, transitive and symmetric) over 2 Σ.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 17 Turing Degree The equivalence classes of T are called Turing degrees (T-degree). The T-degree of a language A is deg(a). The Turing reducibility on the equivalence classes is a partial ordering.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 18 Recursive Languages For all recursive languages A, B, A T B i.e. for all recursive languages A, B, A T B.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 19 Turing Degree The recursive languages ( 0 1 ) is a Turing degree. It is called zero (0) as the members of this class can be decided by an oracle Turing machine with an oracle for the empty set, or the complete Σ. For a recursive language, A, deg(a) = 0.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 20 Turing Degree Let A and B be languages so that A T B but B T A, so deg(a) < deg(b) i.e. the language B is more undecidable than the language A. Note that A or B cannot be recursive.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 21 Machine N <M> N <M> : input n 1. Run M in parallel on the strings of Σ. 2. If M accepts any of the strings, accept.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 22 Running M in parallel 1. The machine N <M> enumerates 1, 2, 3, 4,, n,. 2. The number n is decomposed in two parts n (m, t), where n = 2 m 1 (2t 1). 3. Simulates M on x = s m for t steps, where x is the m th string of Σ.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 23 Running M in parallel If Σ = {s 1, s 2, s 3,, s n, }, then the machine N <M> simulates < M > on s 1 for 1 step, then on s 1 and s 2 for 2 steps each, then on s 1, s 2 and s 3 for 3 steps each etc.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 24 L(N <M> ) = L(N <M> ) Σ if L(M), if L(M) =. Note that N <M> halts only on accept.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 25 EMPTY T HP M HP : input < M > 1. Construct N <M> as described earlier. 2. Ask the oracle whether < N <M>, ε > HP. 3. If the answer is yes, reject; else accept. M HP decides EMPTY relative to HP.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 26 Machine K <M> K <M> : input w 1. Copy w to a tape. 2. Run M in parallel on all strings of Σ whose lengths are greater than w. 3. If M accepts some y Σ, y > w, then 4. If w = 0 n 1 n for some n N, accept, else reject.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 27 Language of K <M> If L(M) is finite, there is a string of maximum length say m. No input w of length m will be accepted by K <M>. So the language of K <M> is finite and so is regular.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 28 Language of K <M> If L(M) is infinite, for every input w, there is a string of length > w in L(M). But then only those w s are accepted that are of the form 0 n 1 n, for some n N. So the language of K <M> is {0 n 1 n : n 0}, that is not regular.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 29 Language of K <M> L(K <M> ) = regular (finite) if L(M) is finite, {0 n 1 n : n 0} if L(M) is infinite.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 30 FINITE T REGULAR M REGULAR fin : input < M > 1. Construct K <M> as described earlier. 2. Ask the oracle whether < K <M> > REGULAR. 3. If the answer is yes, accept; else reject. M REGULAR f in decides FINITE.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 31 Hierarchy of Membership Problems MP 0 = MP = {< M, x >: M accepts x} MP 1 = {< M MP 0, x >: M MP 0 accepts x} MP n = {< M MP n 1, x >: M MP n 1 accepts x}

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 32 Hierarchy of Membership Problems We may view MP = MP 0 = {< M, x >: M accepts x}, where M is an oracle Turing machine, equipped with an oracle for (or Σ ). The answer to every query is always false (or true) and the dynamics of M is same as that of M.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 33 Hierarchy of Membership Problems Let < M, x > MP 0. We can construct < M MP 0, x > MP 1 so that on both yes or no answers to a query the machine continues with the computation of M. In this sense MP 0 can be embedded in MP 1 like a subset.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 34 MP 1 T MP 0 Let H MP 0 be a oracle Turing machine that decides MP 1. We design D MP 0 D MP 0 : input w as follows: 1. If w < M MP 0 >, reject. 2. If H MP 0 accepts < M MP 0, M MP 0 reject; else accept. >, then

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 35 MP 2 T MP 1 D MP 0 accepts < D MP 0 > iff H MP 0 rejects < D MP 0, D MP 0 > iff D MP 0 rejects < D MP 0 > This is a contradiction, so MP 1 T MP 0. In general MP n T MP n 1 - there is an infinite hierarchy of these problems.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 36 Definitions Σ 0 1 : the collection of r.e. languages. An r.e. language is also defined by a 2-ary decidable predicate R(x, y) in the following way. L = {y Σ : xr(x, y)}.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 37 Definitions Let R(x, y) be a 2-ary predicate decided by a Turing machine D R. We have the following machine accepting L. M L : input y 1. For each x Σ, run D R on < x, y >. 2. If D R accept, accept; else go for the next element of Σ.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 38 Definitions We know that MP is defined as {< M, x > Σ : n Accept(< M, x >, n)}, so the language MP is in Σ 0 1.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 39 Definitions Π 0 1 : the collection of languages whose complements are r.e. Let L Σ 0 1 ; so there is a decidable 2-ary predicate R(x, y) so that L = {y Σ : xr(x, y)}. The complement language of L is defined as L = {y Σ : x R(x, y)}. Note: the predicate R(x, y) is also decidable.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 40 Definitions A language L is in Π 0 1 if there is a 2-ary decidable predicate Q(x, y) so that, L = {y Σ : xq(x, y)}

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 41 Definitions We know that the language MP is defined as {< M, x > Σ : n Accept(< M, x >, n)}, so the language MP is in Π 0 1.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 42 Definitions 0 1: the collection of recursive languages. Σ 0 1 Π 0 1 = 0 1. Any Turing decidable language is in this class. In fact any decidable language is in both Π 0 1 and Σ 0 1.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 43 Definitions Σ 0 n+1: the collection of languages r.e. relative to some language B Σ 0 n. It can be proved that a set A is in Σ 0 n+1 if and only if there is a (n + 2)-ary decidable predicate R so that A = {x : x 1 x 2 Qx n+1 R(x, x 1, x 2,, x n+1 )}. Q = if n is odd, otherwise it is.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 44 An Example of Σ 0 2 Language Let R(x, y, z) be a 3-ary recursive predicate over Σ. So the following language is recursive. L R = {< x, y, z >: R(x, y, z) is true}. Let a Turing machine D R decides L R.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 45 An Example of Σ 0 2 Language M 1 : input < x, y > 1. Pick up the first z Σ and simulate D R on < x, y, z >. 2. If D R accepts, start the simulation of (1) with the next z Σ. 3. If D R rejects, accept.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 46 An Example of Σ 0 2 Language The Turing machine D R is total, so the simulation reaches either accept or reject state on every input and L 1 = L(M 1 ) = {< x, y >: z R (< x, y >, z)} Σ 0 1 = {< x, y >: zr (< x, y >, z)} where R(x, y, z) iff R (< x, y >, z).

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 47 An Example of Σ 0 2 Language Let there be an oracle for the language L 1. We design the following oracle Turing machine. M L 1 2 : input x 1. Pick up the first y Σ 2. Query the oracle to determine whether < x, y > L 1. 3. If NO, accept; if YES, take the next y Σ and goto (2).

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 48 An Example of Σ 0 2 Language The language of M L 1 2 is L 2 = L(M L 1 2 ) = {x : y(< x, y > L 1 )} = {x : y( zr(x, y, z))}, = {x : y zr(x, y, z)} The machine M L 1 2 accepts an x if there is a y, so that it is not the case that there is a z, so that < x, y, z > L R.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 49 An Example of Σ 0 2 Language The language of L 2 is r.e. in L 1 Σ 0 1 and is of the form {x : y zr(x, y, z)}.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 50 FINITE We have already defined the language FINITE = {< M >: n x t( x > n (M accepts x in t steps))}. We can combine the two universal quantifiers using the following bijective function f : N N N, f(m, t) = 2 m 1 (2t 1) = k(say), where m = π 1 (f 1 (k)) and t = π 2 (f 1 (k)). The string x = s m in Σ.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 51 FINITE FINITE = {< M >: n k( s m > n (M accepts s m in t steps))}, where m = π 1 (f 1 (k)) and t = π 2 (f 1 (k)). The string s m s the m th string in Σ.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 52 Σ 0 n+1 Language Let R(x, y, x) be a (n + 2)-ary decidable predicate over Σ. So the following language is recursive. L R = {< x, y, x >: R(x, y, x) is true}. Let a Turing machine D R decides L R.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 53 Σ 0 n+1 Language M 1 : input < x, y > 1. Pick up the first x (Σ ) n and simulate D R on < x, y, x >. 2. If D R accepts, start the simulation of (1) with the next x (Σ ) n. 3. If D R rejects, accept.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 54 Σ 0 n+1 Language The Turing machine D R is total, so the simulation reaches either accept or reject state on every input and L 1 = L(M 1 ) = {< x, y >: x R (< x, y >, x)} = Σ 0 n = {< x, y >: xr (< x, y >, x)} where R(x, y, x) iff R (< x, y >, x).

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 55 Σ 0 n+1 Language Let there be an oracle for the language L 1. We design the following oracle Turing machine. M L 1 2 : input x 1. Pick up the first y Σ 2. Query the oracle to determine whether < x, y > L 1. 3. If NO, accept; if YES, take the next y Σ and goto (2).

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 56 Σ 0 n+1 Language The language of M L 1 2 is L 2 = L(M L 1 2 ) = {x : y(< x, y > L 1 )} = {x : y( xr(x, y, x))} = {x : y xr(x, y, x)} The machine M L 1 2 accepts an x if there is a y, so that it is not the case that there is a x, so that < x, y, x > L R.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 57 Definitions Π 0 n+1 : the collection of A where A Σ0 n+1. It can be proved that a set A is in Π 0 n+1 if and only if there is a (n + 2)-ary decidable predicate R so that A = {x : x 1 x 2 Qx n+1 R(x, x 1, x 2,, x n+1 )}. Q = if n is odd, otherwise it is.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 58 Π 0 2 Language The following language is in Σ 0 2. L = {x Σ : y zr(x, y, z)}. So the following language is in Π 0 2. L = {x Σ : y zr(x, y, z)} = {x Σ : y zr(x, y, z)} where R is R(x, y, z).

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 59 INFINITE INFINITE = {< M >: n x t( x n (M accepts x in t steps))} We can combine the two existential quantifiers and get INFINITE = {< M >: n m( x n (M accepts x in t steps))} where x = s k (k th string of Σ ) and m = 2 k 1 (2t 1).

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 60 Definitions 0 n = Σ0 n Π0 n.

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 61 Arithmetic Hierarchy 0 Σ 0 3 Π3 COFIN 0 3 0 2 FIN Σ 0 2 TOTAL Π 0 2 0 r.e. 1 MP HP Σ 0 1 Π 0 1 EMPTY co r.e. Recursive Languages

uring Reducibility Dept. of Computer Sc. & Engg., IIT Kharagpur 62 Reference Automata and Computability by Dexter C Kozen Pub. Springer, ISBN 3-540-78105-6