The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.

Slides:



Advertisements
Similar presentations
CS 461 – Nov. 9 Chomsky hierarchy of language classes –Review –Let’s find a language outside the TM world! –Hints: languages and TM are countable, but.
Advertisements

Turing -Recognizable vs. -Decidable
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
Computability and Complexity 4-1 Existence of Undecidable Problems Computability and Complexity Andrei Bulatov.
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
Reducibility Sipser 5.1 (pages ).
The Halting Problem Sipser 4.2 (pages ). CS 311 Mount Holyoke College 2 Taking stock All languages Turing-recognizable Turing-decidable Context-free.
The Halting Problem Sipser 4.2 (pages ).
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata are like Turing Machines with a restriction: The working space of the tape is the space of the.
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
Decidability. Why study un-solvability? When a problem is algorithmically unsolvable, we realize that the problem must be simplified or altered before.
Recursively Enumerable and Recursive Languages
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
CHAPTER 4 Decidability Contents Decidable Languages
Tutorial CSC3130 : Formal Languages and Automata Theory Tu Shikui ( ) SHB 905, Office hour: Thursday 2:30pm-3:30pm
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 6 Decidability Jan Maluszynski, IDA, 2007
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
CS 310 – Fall 2006 Pacific University CS310 The Halting Problem Section 4.2 November 15, 2006.
Lecture 27UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 27.
CS21 Decidability and Tractability
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
A Universal Turing Machine
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
D E C I D A B I L I T Y 1. 2 Objectives To investigate the power of algorithms to solve problems. To explore the limits of algorithmic solvability. To.
CS 461 – Nov. 7 Decidability concepts –Countable = can number the elements  –Uncountable = numbering scheme impossible  –A TM undecidable –Language classes.
Turing -Recognizable vs. -Decidable
Recursively Enumerable and Recursive Languages
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
Turing Machines Sections 17.6 – The Universal Turing Machine Problem: All our machines so far are hardwired. ENIAC
1 Recursively Enumerable and Recursive Languages.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
Decidability.
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
The Acceptance Problem for TMs
A Universal Turing Machine
CS 461 – Nov. 2 Sets Prepare for ATM finite vs. infinite Infinite sets
Recursively Enumerable and Recursive Languages
This statement is false.
Undecidable Problems Costas Busch - LSU.
Lecture12 The Halting Problem
CSCI 2670 Introduction to Theory of Computing
Reductions Costas Busch - LSU.
Theory of Computability
Reducibility The Chinese University of Hong Kong Fall 2010
Decidability and Enumerability
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
CSE 105 theory of computation
Decidable Languages Costas Busch - LSU.
Formal Languages, Automata and Models of Computation
Intro to Theory of Computation
More undecidable languages
Theory of Computability
CS21 Decidability and Tractability
CSE 105 theory of computation
More undecidable languages
CSCI 2670 Introduction to Theory of Computing
Instructor: Aaron Roth
Intro to Theory of Computation
CSE 105 theory of computation
Presentation transcript:

The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007

The Acceptance Problem for Turing Machines The Acceptance Problem for Turing Machines: Given a Turing machine M and a string w, does M accept w? The language is A TM = {  M, w  | M accepts w)}.

A TM is Turing- Recognizable Theorem: A TM is Turing- recognizable. Proof: Build a Turing machine U that will read a representation of M and simulate it on the input w.

A TM is Turing- Recognizable If U halts in the accept state, then accept  M, w . If U halts in the reject state, then reject  M, w . The problem is that U may run forever. That is why U is only a recognizer, not a decider.

Universal Turing Machines A universal Turing machine is a Turing machine that can read a description of any Turing machine and simulate it. Do universal Turing machines really exist?

Universal Turing Machines Yes. (We call them programmable computers.) They read a description of a Turing machine. (We call the description a program.) Then they simulate the Turing machine. (We say they execute the program.)

Turing-Unrecognizable Languages Theorem: There exist Turing- unrecognizable languages. Lemma: The set of all Turing machines is a countably infinite set. Proof of the Lemma: Each Turing machine has a finite description: (Q, , , , q 0, q acc, q rej ).

Turing-Unrecognizable Languages Express each description in binary, perhaps by using ASCII. Thus, the set of all Turing machines is represented by a set of finite binary strings. We already know that every set of finite binary strings is countable. (They can be arranged in lexicographical order.)

Turing-Unrecognizable Languages Lemma: The set of infinite binary strings is uncountable. Proof of the Lemma: We need to use a diagonalization argument, which is based on proof by contradiction.

Turing-Unrecognizable Languages Suppose the set is countable. Then the set of all infinite binary strings can be listed w 1, w 2, w 3, and so on. Create a binary array that is infinite to the right and down by letting row i be the bits in w i, for i = 1, 2, 3, …

Turing-Unrecognizable Languages Define an infinite binary string w as follows. If the i th bit in row i is 0, set the i th bit of w to 1. If the i th bit in row i is 1, set the i th bit of w to 0.

Turing-Unrecognizable Languages Certainly, w is an infinite binary string. But w cannot be in the list of all infinite binary strings because it disagrees with every w i in the list. This is a contradiction. Therefore, the set must be uncountable.

Turing-Unrecognizable Languages Proof of the Theorem: Suppose that every language is recognizable. Then for every language L, there is a Turing machine M that recognizes it. That is, L(M) = L.

Turing-Unrecognizable Languages For any language L, create an infinite binary string s as follows. Make a list of all binary strings and order it lexicographically. For the i th word w i in the list, if w i is in L, then the i th bit of s is 1. If w i is not in L, then the i th bit of s is 0.

Turing-Unrecognizable Languages This is a one-to-one correspondence between the set of all languages and the set of all infinite binary strings. Thus, the set of all languages is uncountable.

Turing-Unrecognizable Languages But for every language, there is (supposedly) a Turing machine that accepts it. That would require uncountably many Turing machines. This is a contradiction. Thus, there exist languages that are not Turing-recognizable.