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

Similar documents
Computability and Complexity

Reducability. Sipser, pages

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

CSE 105 THEORY OF COMPUTATION

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

Undecidable Problems and Reducibility

Computation Histories

Non-emptiness Testing for TMs

V Honors Theory of Computation

Introduction to Languages and Computation

CSE 105 THEORY OF COMPUTATION

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

CSE 105 THEORY OF COMPUTATION

ACS2: Decidability Decidability

Homework Assignment 6 Answers

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

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

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

Theory of Computation

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

1 Showing Recognizability

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

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

Theory of Computation (IX) Yijia Chen Fudan University

Lecture 12: Mapping Reductions

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

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

CS20a: Turing Machines (Oct 29, 2002)

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

Theory of Computation p.1/?? Theory of Computation p.2/?? We develop examples of languages that are decidable

Decidability and Undecidability

Intro to Theory of Computation

Turing Machines Part III

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

CpSc 421 Homework 9 Solution

CS154, Lecture 10: Rice s Theorem, Oracle Machines

Further discussion of Turing machines

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama

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

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

CSE 105 Theory of Computation

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

4.2 The Halting Problem

CS21 Decidability and Tractability

Decidability (What, stuff is unsolvable?)

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

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

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

The Unsolvability of the Halting Problem. Chapter 19

CSE 105 THEORY OF COMPUTATION

acs-07: Decidability Decidability Andreas Karwath und Malte Helmert Informatik Theorie II (A) WS2009/10

Computational Models Lecture 8 1

Decidability. Human-aware Robotics. 2017/10/31 Chapter 4.1 in Sipser Ø Announcement:

Computability and Complexity

Equivalence of TMs and Multitape TMs. Theorem 3.13 and Corollary 3.15 By: Joseph Lauman

Computational Models Lecture 8 1

Exam Computability and Complexity

CSE 105 Theory of Computation

CSE 105 THEORY OF COMPUTATION

CS 361 Meeting 28 11/14/18

Introduction to Turing Machines

SCHEME FOR INTERNAL ASSESSMENT TEST 3

Decidability (intro.)

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

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

Turing Machines. Chapter 17

UNIT-VIII COMPUTABILITY THEORY

Part I: Definitions and Properties

Computational Models Lecture 9, Spring 2009

CPSC 421: Tutorial #1

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

Decidable Languages - relationship with other classes.

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

Advanced Undecidability Proofs

Computational Models Lecture 8 1

More Turing Machines. CS154 Chris Pollett Mar 15, 2006.

Decidability. Overview. Preliminaries to Halting Problem. Decidable Problems of Regular Languages. Decidable Problems of Context-Free Languages

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

Lecture Notes: The Halting Problem; Reductions

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2016, face-to-face day section Prof. Marvin K. Nakayama

CS481F01 Solutions 8

DM17. Beregnelighed. Jacob Aae Mikkelsen

CS20a: Turing Machines (Oct 29, 2002)

Theory of Computation

CSCC63 Worksheet Turing Machines

Foundations of

CSE 105 THEORY OF COMPUTATION

Chapter 3: The Church-Turing Thesis

Computability Theory

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

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

Decidable and undecidable languages

TURING MAHINES

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

CSCE 551 Final Exam, Spring 2004 Answer Key

CpSc 421 Final Exam December 15, 2006

Introduction to Turing Machines. Reading: Chapters 8 & 9

Turing Machines. Reading Assignment: Sipser Chapter 3.1, 4.2

Transcription:

CSCE 551: Theory of Computation Chin-Tser Huang huangct@cse.sc.edu University of South Carolina

Computation History A computation history of a TM M is a sequence of its configurations C 1, C 2,, C l such hthat tc i+1 legally ll follows from C i according to the rules of M. A computation history is accepting/rejecting if C l is accepting or rejecting configuration respectively. In general, for a TM there may exist an infinite number of configurations i (because of an infinite i tape). However, for TMs that use only limited amount of the tape, the number of configurations is finite. A linear bounded automaton (LBA) is a TM that is permitted to use only the portion of the tape containing the input (i.e., cannot move the head beyond the input). 03/22/2010 2

A LBA is Decidable Lemma Let M be an LBA with q states and g symbols in the tape alphabet. Then there are exactly qng n distinct configurations of M for the tape of length n. Lemma Let M be an LBA with q states and g symbols in the tape alphabet. If M on input of length n does not produce an output within first qng n steps, it loops. Theorem A LBA = { M, w M is an LBA and M accepts w} is decidable. 03/22/2010 3

E LBA is Undecidable E LBA = { M M is an LBA and L(M) = } We will prove that E LBA is undecidable by reduction from A TM. Namely, we show that if E LBA were decidable, A TM would also be. A TM = { M, w M is a TM and M accepts w} Note that Given a TM M and a string w, w simulating M on input w cannot be done on an LBA (since M may use arbitrarily large portion of its tape, while LBA is limited in tape usage). However, given a sequence of configurations of a fixed TM M, M it can be verified on an LBA whether this sequence represents a valid computation history of M on a fixed input w (since the tape content of M, even if arbitrarily large, is embedded in the given configurations and does not require any additional storage from the LBA verifier). 03/22/2010 4

E LBA is Undecidable For a TM M and a string w, M accepts w if and only if the following language is non-empty: L M,w = {#C 1 #C 2 #...#C l # C 1, C 2,, C l is accepting computation history of M on w} Q: How does this help us? 03/22/2010 5

ALL CFG is Undecidable ALL CFG = { G G is a CFG and L(G) = Σ * } Again, we will prove that ALL CFG is undecidable by reduction from A TM. We show that, if ALL CFG were decidable, A TM would also be. Idea is for given TM M and string w, construct a PDA (which we know how to convert to a CFG) that generates the following language: Z M,w = {#C 1 #C 2R #C 3 #C 4R #...#C l # C 1, C 2,, C l is NOT accepting computation history of M on w} Note that M accepts w if and only if Z M,w Σ *. Q: How does this help us? 03/22/2010 6

ALL CFG is Undecidable For given TM M and string w, we need construct a PDA that generates the following language: Z M,w = {#C 1 #C 2R #C 3 #C 4R #...#C l # C 1, C 2,, C l is NOT accepting computation history of M on w} This PDA verifies a number of conditions (each in its own nondeterministic branch): input string starts and ends with #; each C i is a valid configuration of M ; C 1 is a starting configuration for M on w ; C l is an accepting configuration for M ; C i+1 properly follows from C i. If any of these conditions fails, the PDA accepts. Q: Why do we need to reverse every other configuration in the computation history? 03/22/2010 7

Computable Functions A function f : Σ * Σ * is called a computable function if some Turing machine on every input w halts with just f (w) on its tape. Arithmetic functions are computable: m, n m + n; m, n m n; m, n m n; m, n m/n, n 0; m, n m mod n, n 0. 03/22/2010 8

Computable Transformations Computable functions may be transformations of TM descriptions: a computable function f may take as an input M and return M where M and M are TMs. Example: M is a TM that recognizes the same language M but never attempts to move its head off the left-hand end of its tape. If input to f is not a legal encoding of a TM, it reutrns ε. 03/22/2010 9

Mapping Reducibility Definition Language A is mapping reducible to language B, written A m B, if there is a computable function f : Σ * Σ * such that for every w w A f (w) B The function f is called the reduction of A to B. 03/22/2010 10

Mapping Reducibility Mapping reduction provides a way to convert questions about membership testing in A to membership testing in B. Instead of testing whether w A, one can compute f (w) and test whether f (w) B. If one problem is mapping reducible to another, previously solved problem, one can thereby obtain a solution to the original problem. 03/22/2010 11

Theorems Theorem A m B if and only if A m B. Theorem If A m B and B is decidable, then A is decidable. Theorem If A m B and B is Turing-recognizable, then A is Turingrecognizable. Q: How to prove these theorems? 03/22/2010 12

Corollaries Corollary If A m B and A is undecidable, then B is undecidable. Corollary If A m B and A is not Turing-recognizable, i then B is not Turing-recognizable. 03/22/2010 13

A TM m HALT TM Corollary If A m B and A is undecidable, then B is undecidable. Let's apply this Corollary to prove that HALT TM is undecidable by showing that A TM m HALT TM. Since A TM is undecidable, so would be HALT TM. We design a TM F that computes a reduction from A TM to HALT TM : F = On input M, w does the following: 1. Construct a TM M that for a given input x : 1.1 Run M on x; 1.2 If M accepts, then accept; otherwise enter a loop. 2. Output M, w. It is easy to see that M, w A TM iff M, w HALT TM. Therefore, F indeed computes a reduction from A TM to HALT TM. 03/22/2010 14

E TM m EQ TM E TM = { M M is a TM and L(M) = } EQ TM = { M 1, M 2 M 1, M 2 are TMs and L(M 1 ) = L(M 2 )} Q: How to prove that E TM m EQ TM? Let for a given TM M return a pair M, M where M rejects any input. If input is not encoding of a TM, f returns ε. Then M E TM M, M EQ TM So, f is a reduction of E TM to EQ TM. 03/22/2010 15

E TM is Undecidable Previously we proved that E TM is undecidable by reducing A TM to it. Let s review: A TM = { M, w M is a TM and M accepts w} E TM ={ M M is a TM and L(M) = } We assume that we have a decider D E for E TM, and we need to construct a decider D A for A TM. Note that D A gets as an input a pair M, w that needs to be somehow transformed into an input M 1 for D E such that the output of D E on M 1 would help us produce the required output D A on M, w. 03/22/2010 16

E TM is Undecidable Basically, we want to have L(M 1 ) if and only if M accepts w. w Then the output of D A on M, w can simply output the opposite of the output of D E on M 1. Let M 1 rejects everything but w on which it runs M and accepts iff M accepts w. Then L(M 1 ) = if M does not accept w; and L(M 1 ) = {w} if M accepts w. D A can be defined as follows: D A = On input M, w, where M is a TM and w is a string: 1. Construct the following M 1. M 1 = On input x: 1. If x w, reject. 2. If x = w, run M on input w and accept if M does. 2. Run D E on input M 1. 3. If D E accepts, reject; if D E rejects, accept. 03/22/2010 17

A TM m E TM A TM = { M, w M is a TM and M accepts w} E TM = { M M is a TM and L(M) = } Let a TM M rejects everything but w on which it runs M and accepts iff M accepts w. w Then L(M )= if M does not accept w; and L(M ) = {w} if M accepts w. In other words, M, w A TM M E TM. So, computing a TM M for a given pair M, w simply means a reduction of A TM to E TM. Since A TM is undecidable, so is E TM and thus E TM (since decidability is not affected by complementation). 03/22/2010 18

Not Turing-recognizable recognizable Languages Corollary If A m B and A is not Turing-recognizable, then B is not Turing-recognizable. Q: How to make use of this corollary? In a typical application of this corollary, we let A = A TM which is not Turing-recognizable. To prove that B is not Turing-recognizable we will show that A TM m B Alternatively, ti l we can show that t A TM m B 03/22/2010 19

EQ TM EQ TM = { M 1, M 2 M 1, M 2 are TMs and L(M 1 ) = L(M 2 )} Theorem EQ TM is neither Turing-recognizable nor co-turing- recognizable. Q: What would be a high-level outline of the proof? To prove that EQ TM is not Turing-recognizable, recognizable, we will show that A TM m EQ TM (alternative of A TM m EQ TM ). To prove that EQ TM is not Turing-recognizable, we will show that t A TM m EQ TM (alternative ti of A TM m EQ TM ). 03/22/2010 20

A TM m EQ TM To show that A TM m EQ TM we need to construct a computable mapping of M, M w to MM 1, M 2 such hthatt Define a TM F as follows: M, w A TM M 1, M 2 EQ TM. F = On input M, w does the following: 1. Construct the following TMs M 1 and M 2 : M 1 rejects any input. M 2 ignores its input and run M on w. If it accepts, accept. 2. Output M 1, M 2. 03/22/2010 21

A TM m EQ TM To show that A TM m EQ TM we need to construct a computable mapping of M, M w to MM 1, M 2 such hthatt Define a TM F as follows: M, w A TM M 1, M 2 EQ TM. F = On input M, w does the following: 1. Construct the following TMs M 1 and M 2 : M 1 accepts any input. M 2 ignores its input and run M on w. If it accepts, accept. 2. Output M 1, M 2. 03/22/2010 22

Announcement Homework 3 is due TODAY in class Do the following problems for your practice: 5.1, 5.9, 5.22, 5.34 We will not cover Chapter 6 Reading assignment: Ch. 7.1 03/22/2010 23