Decidable Languages - relationship with other classes.

Similar documents
CSE 105 THEORY OF COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

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

Decidability and Undecidability

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

Turing Machines. Lecture 8

ACS2: Decidability Decidability

Decidability: Church-Turing Thesis

17.1 The Halting Problem

CSCI3390-Lecture 6: An Undecidable Problem

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

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

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

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

Decidability (intro.)

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

Computability and Complexity

Computability Theory. CS215, Lecture 6,

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

CSE 105 THEORY OF COMPUTATION

1 Showing Recognizability

CSE 105 THEORY OF COMPUTATION

TURING MAHINES

Intro to Theory of Computation

A non-turing-recognizable language

Non-emptiness Testing for TMs

Introduction to Turing Machines

CSE 105 Theory of Computation

CSE 105 Theory of Computation

Lecture 12: Mapping Reductions

The Unsolvability of the Halting Problem. Chapter 19

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

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

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

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

Decidable and undecidable languages

CSE 105 THEORY OF COMPUTATION

jflap demo Regular expressions Pumping lemma Turing Machines Sections 12.4 and 12.5 in the text

Computational Models Lecture 8 1

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

Reducability. Sipser, pages

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

V Honors Theory of Computation

4.2 The Halting Problem

CS 361 Meeting 26 11/10/17

Computational Models Lecture 8 1

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

CST Part IB. Computation Theory. Andrew Pitts

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

Introduction to Languages and Computation

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

CSE 105 THEORY OF COMPUTATION

Computation. Some history...

Decidability (What, stuff is unsolvable?)

Turing Machines Part III

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

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

Intro to Theory of Computation

Computational Models Lecture 8 1

CS20a: Turing Machines (Oct 29, 2002)

1 Reals are Uncountable

Lecture Notes: The Halting Problem; Reductions

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

CS481F01 Solutions 8

Fundamentals of Computer Science

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

Turing Machines and the Church-Turing Thesis

CS154, Lecture 10: Rice s Theorem, Oracle Machines

Computational Models Lecture 9, Spring 2009

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

Warm-Up Problem. Please fill out your Teaching Evaluation Survey! Please comment on the warm-up problems if you haven t filled in your survey yet.

ECS 120 Lesson 18 Decidable Problems, the Halting Problem

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

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

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

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

highlights proof by contradiction what about the real numbers?

Chapter 3: The Church-Turing Thesis

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,

CS20a: Turing Machines (Oct 29, 2002)

Theory of Computation (IX) Yijia Chen Fudan University

Computation Histories

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

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 14 : Turing Machines

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

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 16 : Turing Machines

Exam Computability and Complexity

Turing Machines Part Two

A Note on Turing Machine Design

Turing Machines Decidability

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

Pumping Lemma for CFLs

CS21 Decidability and Tractability

CPSC 421: Tutorial #1

Computational Models Lecture 7, Spring 2009

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

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

CSCI3390-Assignment 2 Solutions

MTAT Introduction to Theoretical Computer Science

Transcription:

CSE2001, Fall 2006 1 Last time we saw some examples of decidable languages (or, solvable problems). Today we will start by looking at the relationship between the decidable languages, and the regular and context-free languages. And then, we will see that there are languages that are not decidable. Reminder, once again: Definition: A language L is called Turing-decidable (or just decidable), if there exists a Turing Machine M such that on input x, M accepts if x L, and M rejects otherwise. L is called undecidable if it is not decidable. Decidable Languages - relationship with other classes. Theorem: every context-free language is decidable. Proof: Let L be a CFL, we need to show that there exists a Turing Machine M that decides L. Since L is a CFL, there is a CFG G that generates L. So, for every string w, our machine will feed < G, w > into the Turing Machine that decides A CFG (from last lecture). So M = on input w 1. run the Turing Machine for A CFG on G, w. 2. Accept if it accepts, reject otherwise. We also know that there are decidable languages that are not context-free, for example L = {0 n 1 n 2 n n 0}. So the picture of the world thus far is this:. Now we will see that there are languages that are undecidable by Church-Turing Thesis, these correspond to the algorithmically unsolvable problems. In other words, these lie beyond the capabilities of computing devices.

CSE2001, Fall 2006 2 The Halting Problem and Undecidable Languages Historically, the first undecidable problem was presented by Alan Turing in his 1936 paper On Computable Numbers with an Application to the Entscheidungsproblem, Proceedings of the London Mathematical Society, ser. 2, vol. 42. His goal was to show that the decision problem for first-order logic (the Entscheidungsproblem ) is algorithmically unsolvable. One of the steps towards that goal was to show that the following problem is also unsolvable: given a Turing Machine M, does M halt when started with the blank tape. The more general version of this problem is now known as The Halting Problem: Given a Turing Machine M, and an input w, does M halt on w. Or, expressed as a language H TM = { M, w M is a TM that halts on input w}. The language H TM is undecidable. We could prove this fact directly, but we will follow the textbook, and will prove directly that the acceptance problem for Turing Machines is undecidable, and then use that to prove the undecidability of H TM. Theorem: The language is undecidable. A TM = { M, w M is a TM that accepts w} Proof: By contradiction. Assume that A TM is decidable. Let H be the Turing Machine that decides A TM. So, H accepts M, w when M accepts w, and rejects otherwise.

CSE2001, Fall 2006 3 Since w is just a string, nothing stops us from giving the string that encodes the Turing Machine itself as an input. This will look like this: Now, we are going to construct a machine D that does something opposite from H. On input string M, D is going to construct an input string M, M and feed it to H. Once H is finished, D will do exactly the opposite from what H did: it will reject if H accepted, and accept otherwise. D will look like this: So, D accepts M if M does not accept M, and rejects M if M accepts M. Note that D always halts, because H always halts. And now, the contradiction: what will D do on input D? Since D always halts, it must either accept D or reject D. But, if D accepts D, then D does not accept D. On the other hand, if D rejects D, then D accepts D. We conclude that A TM is undecidable. How does one come up with such clever constructions? The technique used to construct the machine D is called diagonalization, and goes back to the work of the German mathematician Georg Cantor (1870 s). The textbook explains the technique in more detail please read.

CSE2001, Fall 2006 4 On the other hand, A TM is Turing-recognizable. Here is the Turing Machine that recognizes A TM : U = on input M, w Simulate M on input w. Accept if M accepts, reject of M rejects. Note that U may not finish step 1 (simulation) if M happen to go into an infinite loop, then U will do so too. Hence, U recognizes A TM. So, now, the picture of the world looks like this: The machine U is called a Universal Turing Machine it is capable of simulating every other Turing Machine. We now believe that such machine U can be built, because we can describe an algorithm for it (and so, by Church-Turing thesis there is a Turing Machine that implements that algorithm). In 1936 paper, Alan Turing gave an actual description (i.e. state transition table) of this machine U. The Universal Turing Machine is a theoretical model of an an all-purpose computer the input encoding of M acts as a text of a program in some programming language. And, in fact, the first all-purpose digital computer, EDVAC, architected in 1945 by Jon von Neumann, was in essence an implementation of Turing s Universal Machine (with some important additions, such as a separate arithmetic-logic unit). This architecture of EDVAC is now known as Von-Neumann architecture, and its the architecture of the vast majority of computers in existence today.

CSE2001, Fall 2006 5 Now, lets go back to the Halting Problem. Theorem: The language is undecidable. H TM = { M, w M is a TM that halts on input w} Proof: Assume that H TM is decidable. We will reduce A TM to H TM in other we will show how to construct a Turing Machine M A that decides A TM using the Turing Machine M H that decides H TM. This gives us a contradiction, because we know that A TM is undecidable, and so M A cannot exist. The word reduce simply means solving a given problem by converting it into another problem which we already know to solve. So, the Turing Machine for A TM can be constructed as follows: M A = on input M, w 1. Run M H (the Turing Machine for H TM ) on M, w. 2. If M H rejects (which means that M does not halt on w), then reject. 3. If M H accepts, then simulate M on w (guaranteed to stop). 4. Accept if M accepts w, reject is M rejects w. Since M H always halts (by our assumption) the M A also always halts. M A accepts M, w if M accepts w, and M A rejects M, w if M either rejects w, or goes into infinite loop. Thus, M A decides A TM. Contradiction.