Theory of Computation, NTUEE Theory of Computation Lecture 04 Undecidability Part of the materials are from Courtesy of Prof. Peter J. Downey Department.

Slides:



Advertisements
Similar presentations
Turing Machines Memory = an infinitely long tape Persistent storage A read/write tape head that can move around the tape Initially, the tape contains only.
Advertisements

CS 345: Chapter 9 Algorithmic Universality and Its Robustness
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Foundations of (Theoretical) Computer Science Chapter 3 Lecture Notes (Section 3.2: Variants of Turing Machines) David Martin With.
Computability and Complexity 4-1 Existence of Undecidable Problems Computability and Complexity Andrei Bulatov.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
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.
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
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
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
Homework #9 Solutions.
1 Foundations of Software Design Fall 2002 Marti Hearst Lecture 29: Computability, Turing Machines, Can Computers Think?
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.
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 18 Instructor: Paul Beame.
January 28, 2015CS21 Lecture 101 CS21 Decidability and Tractability Lecture 10 January 28, 2015.
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
1 The Halting Problem and Decidability How powerful is a TM? Any program in a high level language can be simulated by a TM. Any algorithmic procedure carried.
December 1, 2009Theory of Computation Lecture 21: Turing Machines II 1 Simulation of L n in T We will now construct a Post-Turing program Q that simulates.
Theory of Computation, NTUEE Theory of Computation Lecture 03 Turing Machines Part of the materials are from Courtesy of Prof. Peter J. Downey Department.
Computability Chapter 5. Overview  Turing Machine (TM) considered to be the most general computational model that can be devised (Church-Turing thesis)
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
Computability Universal Turing Machine. Countability. Halting Problem. Homework: Show that the integers have the same cardinality (size) as the natural.
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
Lecture 17 Undecidability Topics:  TM variations  Undecidability June 25, 2015 CSCE 355 Foundations of Computation.
C SC 573 Theory of Computation Theory of Computation Lecture 05 Reduction.
Recursively Enumerable and Recursive Languages
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
December 3, 2009Theory of Computation Lecture 21: Turing Machines III 1 Simulation of T in L Now the MIDDLE section of Q can be generated by replacing.
1 Introduction to Turing Machines
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
Umans Complexity Theory Lectures Lecture 1b: Turing Machines & Halting Problem.
1 Chapter 9 Undecidability  Turing Machines Coded as Binary Strings  Universal Turing machine  Diagonalizing over Turing Machines  Problems as Languages.
C SC 473 Automata, Grammars & Languages Automata, Grammars and Languages Discourse 05 Turing Machines.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 5 Reducibility Some slides are in courtesy.
Turing Machines Sections 17.6 – The Universal Turing Machine Problem: All our machines so far are hardwired. ENIAC
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong Decidable.
The Church-Turing Thesis Chapter Are We Done? FSM  PDA  Turing machine Is this the end of the line? There are still problems we cannot solve:
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY * Read chapter 4 of the book for next time * Lecture9x.ppt.
Universal Turing Machine
1 Recursively Enumerable and Recursive Languages.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Chapters 11 and 12 Decision Problems and Undecidability.
Recursively Enumerable and Recursive Languages
Busch Complexity Lectures: Turing Machines
This statement is false.
Turing Machines 2nd 2017 Lecture 9.
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Decidable Languages Costas Busch - LSU.
Decidability Turing Machines Coded as Binary Strings
Decidability and Undecidability
Decidability Turing Machines Coded as Binary Strings
Decidable and undecidable languages
CS21 Decidability and Tractability
Formal Languages, Automata and Models of Computation
Recall last lecture and Nondeterministic TMs
Subject Name: FORMAL LANGUAGES AND AUTOMATA THEORY
Theory of Computation Lecture 23: Turing Machines III
Presentation transcript:

Theory of Computation, NTUEE Theory of Computation Lecture 04 Undecidability Part of the materials are from Courtesy of Prof. Peter J. Downey Department of Computer Science, University of Arizona

Theory of Computation, NTUEE 2 The Universal TM Any (hardware) TM M can be encoded as a formatted string (software) Encoding details below The UTM U reads and simulates the action of M on x The UTM U is one, fixed, finite machine, capable of simulating any TM (an interpreter) For example, U reads and gives the same result as for input We shall see that, whenever universality exists for a class of machines (like the TMs), unsolvability is an inevitable consequence

Theory of Computation, NTUEE 3 k-adic representation  base k n bin(n) 2-adic construction 0 0,00,000,… (defn; unique string) 1 1,01,001, …1 2 10,010,0010,… ,011,0011, … ,0100,… ,0101, … ,0110,… ,0111, … ,01000,… ,01001, … ,01010,… 122

Theory of Computation, NTUEE 4 k-adic Representation If k -adic notation provides a bijection 1-to-1 and onto  unique in both directions Let A string x over  ``is’’ a natural number A natural number n ``is’’ a  -string Quotient-Remainder Algorithm

Theory of Computation, NTUEE 5 Canonical Encoding of TM M Let Encode over 9 symbol alphabet object in M encoding in

Theory of Computation, NTUEE 6 Canonical Encoding of TM M (cont.) String is a word over Identify these 9 symbols with So string is the 9-adic repn of number Final encoding is a 2-adic string over machine encoding in 2-adic over Notational convention: an encoding of a TM M ``is” (2-adic representation of) a natural number is called the Gödel number of M Conversely if e is a natural number, is the TM with that Gödel number If e is a syntactically invalid code, is a TM that halts and prints 0 on every input

Theory of Computation, NTUEE 7 Example Scan R erasing 0 until first blank. If encounter 1 loop forever. Valid encodings form a regular set over {1,2,…9}, so FSA can check syntax 1/1 */* 0/B B/- B

Theory of Computation, NTUEE 8 UTM Construction Use 4 tapes: input program with left endmarker B, state tape with left endmarker & worktape of M being simulated 1.Parse input, copying to program tape. If e is invalid, put [] on worktape and halt. Else copy x to worktape & put [] on state tape simulating state 2.While the state tape  [1] do { 1) If the state tape contains count over to tuples for that state in program e. Use the character a under scan on the worktape ( [],[1],… ) to scan to the correct 5-tuple 2) Overwrite the scanned character c(a) on the worktape by c(b) and move the head direction D on the worktape. 3) Copy the new state string from the program tape to the state tape (after erasing the previous state string) }

Theory of Computation, NTUEE 9 UTM Construction 4 tapes: eBx input to U, tape to hold e, tape to hold state of worktape of... BeBx B read-only input read-only program [[]1]B... worktape of M []2BBB... state of M Thus UTM is also a TM.

Theory of Computation, NTUEE 10 Turing Machine Index (Gödel Number) For each TM M, is the word encoding M Since every word in 2-adic is a number (and conversely), we may consider to be a natural number e e is called the Gödel number of M is the TM with Gödel number e A procedure that enumerates all TMs. for w:= 0, 1, 2, ……, do { if (w matches the syntax of TM), output w. } /* syntax checking is algorithmic. */

Theory of Computation, NTUEE 11 UTM halting problem is undecidable! Proof by contradiction. Assume that UTM halting problem is decidable (with an algorithm). Then we can construct the following table.  M0M0 M1M1 M2M2 M3M3 M4M4 M5M5 …… …  (Mi,j) = 1 iff Mi accepts j 0 iff Mi does not accept j

Theory of Computation, NTUEE 12 Digression: Pairing Functions k-tuples of can be encoded as single integers in by a computable bijection. Case k=2: (1,1) (0,2) (0,1) (0,0) (1,0) (2,0) “antidiagonal” construction

Theory of Computation, NTUEE 13 PROGRAM TERMINATION (cont.) However, there is one language recognizer M that is not in the table. M accepts i iff Mi does not accept I.  M0M0 M1M1 M2M2 M3M3 M4M4 M5M5 …… 00 /acc /rej …10000/acc10 Thus M cannot be a TM!

Theory of Computation, NTUEE 14 But M is a TM! According to our assumption that UTM halting problem is decidable, …… UTM(Mi,i) i i M halting non-halting halting Thus M is a TM!  A contradiction! Thus UTM halting problem is undecidable!

Theory of Computation, NTUEE 15 Arithmetic Hierarchy DEC=CE  co-CE For every class C, a class co-C C } Ladder of complexity CE co-CE DEC=Decidable Sets

Theory of Computation, NTUEE 16 Some undecidabilities … Two-stack machine halting problem is undecidable!

Theory of Computation, NTUEE 17 Counter machines

Theory of Computation, NTUEE 18 Some undecidabilities … 4-counter machine halting problem is undecidable! Assume the alphabet of a two-stack machine M is {0,1,.., k-1}. For stack configuration: One counter recording j=i m +ki m-1 +k 2 i m-2 +…+k m-1 i 1 imim i m-1 i m-2 … i1i1

Theory of Computation, NTUEE 19 Some decidabilities … 2-counter machine halting problem is undecidable! It suffices to show that two counters can simulate four counters. One counter holds 2 i 3 j 5 h 7 k The other one as workpad.