David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 16: Universality and Undecidability.

Slides:



Advertisements
Similar presentations
Formal Models of Computation Part III Computability & Complexity
Advertisements

David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
Introduction to Computability Theory
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 13: Turing Machines.
Variants of Turing machines
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.
Turing -Recognizable vs. -Decidable
Class 39: Universality cs1120 Fall 2009 David Evans University of Virginia.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
More Turing Machines Sipser 3.2 (pages ). CS 311 Fall Multitape Turing Machines Formally, we need only change the transition function to.
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 ).
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.
Reducibility A reduction is a way of converting one problem into another problem in such a way that a solution to the second problem can be used to solve.
Decidability. Why study un-solvability? When a problem is algorithmically unsolvable, we realize that the problem must be simplified or altered before.
CHAPTER 4 Decidability Contents Decidable Languages
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 6 Decidability Jan Maluszynski, IDA, 2007
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
CS5371 Theory of Computation Lecture 10: Computability Theory I (Turing Machine)
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.
Class 19: Undecidability in Theory and Practice David Evans cs302: Theory of Computation University of Virginia Computer.
Prof. Busch - LSU1 Reductions. Prof. Busch - LSU2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning.
David Evans CS200: Computer Science University of Virginia Computer Science Class 31: Universal Turing Machines.
Lecture 14: Church-Turing Thesis Alonzo Church ( ) Alan Turing ( )
Cs3102: Theory of Computation Class 17: Undecidable Languages Spring 2010 University of Virginia David Evans.
Cs3102: Theory of Computation Class 18: Proving Undecidability Spring 2010 University of Virginia David Evans.
Announcements Homework – HW8 due Tues 5/29 11am – HW5 grades are out Monday is Memorial Day; no office hours, etc. – Go see a parade, or some fireworks,
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
Turing Machines – Decidability Lecture 25 Section 3.1 Fri, Oct 19, 2007.
Computability Construct TMs. Decidability. Preview: next class: diagonalization and Halting theorem.
Cs3102: Theory of Computation Class 14: Turing Machines Spring 2010 University of Virginia David Evans.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
Computability Universal Turing Machine. Countability. Halting Problem. Homework: Show that the integers have the same cardinality (size) as the natural.
CS 461 – Nov. 7 Decidability concepts –Countable = can number the elements  –Uncountable = numbering scheme impossible  –A TM undecidable –Language classes.
Computability Review homework. Video. Variations. Definitions. Enumerators. Hilbert's Problem. Algorithms. Summary Homework: Give formal definition of.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong Decidable.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
Recursively Enumerable Languages
Class 27: Universal Turing Machines CS150: Computer Science
CSCI 2670 Introduction to Theory of Computing
Class 30: Models of Computation CS200: Computer Science
Busch Complexity Lectures: Reductions
Reductions.
Reductions Costas Busch - LSU.
Lecture 37: A Universal Computer
CSE 105 theory of computation
CSE 105 theory of computation
Intro to Theory of Computation
CS154, Lecture 8: Undecidability, Mapping Reductions
CS154, Lecture 8: Undecidability, Mapping Reductions
Decidable Languages Costas Busch - LSU.
Class 31: Universal Turing Machines CS200: Computer Science
Class 34: Models of Computation CS200: Computer Science
CSE 105 theory of computation
More undecidable languages
CSE 105 theory of computation
Presentation transcript:

David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 16: Universality and Undecidability PS4 is due now Some people have still not picked up Exam 1! After next week Wednesday, I will start charging “storage fees” for them.

2 Lecture 16: Undecidability and Universality Menu Simulating Turing Machines Universal Turing Machines Undecidability

3 Lecture 16: Undecidability and Universality Proof-by-Simulation = Proof-by-Construction To show an A (some class of machines) is as powerful as a B (some class of machines) we need to show that for any B, there is some equivalent A. Proof-by-construction: Given any b  B, construct an a  A that recognizes the same language as b. Proof-by-simulation: Show that there is some A that can simulate any B. Either of these shows: languages that can be recognized by a B  languages that can be recognized by an A

4 Lecture 16: Undecidability and Universality TM Simulations Regular TM 2-tape, 2-head TM “Can be simulated by” 3-tape, 3-head TM “Can be simulated by” If there is a path from M to Regular TM and a path from Regular TM to M then M is equivalent to a Regular TM

5 Lecture 16: Undecidability and Universality TM Simulations Regular TM 2-tape, 2-head TM “Can be simulated by” 3-tape, 3-head TM 2-dimensional TM Nondeterministic TM 2-DPDA+ PS4:3

6 Lecture 16: Undecidability and Universality Can a TM simulate a TM? Can one TM simulate every TM? Yes, obviously.

7 Lecture 16: Undecidability and Universality An Any TM Simulator Input: Output: result of running M on w Universal Turing Machine M w Output Tape for running TM- M starting on tape w

8 Lecture 16: Undecidability and Universality Manchester Illuminated Universal Turing Machine, #9 from

9 Lecture 16: Undecidability and Universality Universal Turing Machines People have designed Universal Turing Machines with –4 symbols, 7 states (Marvin Minsky) –4 symbols, 5 states –2 symbols, 22 states –18 symbols, 2 states –2 states, 5 symbols (Stephen Wolfram) November 2007: 2 state, 3 symbols

10 Lecture 16: Undecidability and Universality 2-state, 3-symbol Universal TM Sequence of configurations

11 Lecture 16: Undecidability and Universality Of course, simplicity is in the eye of the beholder. The 2,3 Turing machine described in the dense new 40-page proof “chews up a lot of tape” to perform even a simple job, Smith says. Programming it to calculate 2 + 2, he notes, would take up more memory than any known computer contains. And image processing? “It probably wouldn't finish before the end of the universe,” he says. Alex Smith, University of Birmingham

12 Lecture 16: Undecidability and Universality Rough Sketch of Proof System 0 (the claimed UTM) can simulate System 1 which can simulate System 2 which can simulate System 3 which can simulate System 4 which can simulate System 5 which can simulate any 2-color cyclic tag system which can simulate any TM. See for the 40-page version with all the details… None of these steps involve universal computation themselves

13 Lecture 16: Undecidability and Universality Enumerating Turing Machines Now that we’ve decided how to describe Turing Machines, we can number them TM = balancing parens TM = even number of 1s TM = Universal TM TM = WindowsXP Not the real numbers – they would be much much much much much bigger!

14 Lecture 16: Undecidability and Universality Acceptance Problem Input: A Turing Machine M and an input w. Output: Yes/no indicating if M eventually enters q Accept on input w. How can we state this as a language problem?

15 Lecture 16: Undecidability and Universality Acceptance Language A TM = { | M is a TM description and M accepts input w } If we can decide if a string is in A TM, then we can solve the Acceptance Problem (as defined on the previous slide). Is A TM Turing-recognizable?

16 Lecture 16: Undecidability and Universality Turing-Recognizable A language L is “Turing-recognizable” if there exists a TM M such that for all strings w : –If w  L eventually M enters q accept –If w  L either M enters q reject or M never terminates … if there exists a TM M such that for all strings w : –If w  L eventually M enters q accept or M never terminates –If w  L either M enters q reject or M never terminates In a previous lecture, I incorrectly defined it as: Why can’t this be the right definition?

17 Lecture 16: Undecidability and Universality Recognizing A TM Run a UTM on to simulate running M on w. If the UTM accepts, is in A TM. Universal Turing Machine M w Output Tape for running TM- M starting on tape w

18 Lecture 16: Undecidability and Universality Recognizability of A TM Decidable Recognizable A TM Is it inside the Decidable circle?

19 Lecture 16: Undecidability and Universality Undecidability of A TM Proof-by-contradiction. We will show how to construct a TM for which it is impossible to decide A TM. Define D ( ) = Construct a TM that: Outputs the opposite of the result of simulating H on input > Assume there exists some TM H that decides A TM. If M accepts its own description, D( ) rejects. If M rejects its own description, D( ) accepts.

20 Lecture 16: Undecidability and Universality Reaching a Contradiction What happens if we run D on its own description, ? Define D ( ) = Construct a TM that: Outputs the opposite of the result of simulating H on input > Assume there exists some TM H that decides A TM. If M accepts its own description, D( ) rejects. If M rejects its own description, D( ) accepts. If D accepts its own description, D( ) rejects. If D rejects its own description, D( ) accepts. substituting D for M…

21 Lecture 16: Undecidability and Universality Reaching a Contradiction Define D ( ) = Construct a TM that: Outputs the opposite of the result of simulating H on input > Assume there exists some TM H that decides A TM. If D accepts : H(D, ) accepts and D( ) rejects If D rejects, H(D, ) rejects and D( ) accepts Whatever D does, it must do the opposite, so there is a contraction!

22 Lecture 16: Undecidability and Universality Proving Undecidability Define D ( ) = Construct a TM that: Outputs the opposite of the result of simulating H on input > Assume there exists some TM H that decides A TM. Whatever D does, it must do the opposite, so there is a contraction! So, D cannot exist. But, if H exists, we know how to make D. So, H cannot exist. Thus, there is no TM that decides A TM.

23 Lecture 16: Undecidability and Universality Recognizability of A TM Decidable Recognizable A TM Are there any languages outside Turing-Recognizable?

24 Lecture 16: Undecidability and Universality Recall: Turing-Recognizable A language L is “Turing-recognizable” if there exists a TM M such that for all strings w : –If w  L eventually M enters q accept –If w  L either M enters q reject or M never terminates If M is Turing-recognizable and the complement of M is Turing- recognizable, what is M ?

25 Lecture 16: Undecidability and Universality An Unrecognizable Language Decidable Recognizable A TM

26 Lecture 16: Undecidability and Universality Charge Next week: –How to you prove a problem is undecidable –How long can a TM that eventually halts run? PS5 will be posted by Saturday, and due April 1 (this is a change from the original syllabus when it was due March 27) Exam 2 will be April 8 as originally scheduled