Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer.

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.
Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 13: Turing Machines.
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
Variants of Turing machines
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Variants.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Computability and Complexity 4-1 Existence of Undecidable Problems Computability and Complexity Andrei Bulatov.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
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.
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.
Lecture 8 Recursively enumerable (r.e.) languages
Decidability. Why study un-solvability? When a problem is algorithmically unsolvable, we realize that the problem must be simplified or altered before.
CS 310 – Fall 2006 Pacific University CS310 Turing Machines Section 3.1 November 6, 2006.
CHAPTER 4 Decidability Contents Decidable Languages
CS 490: Automata and Language Theory Daniel Firpo Spring 2003.
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.
CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG)
Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.
CS21 Decidability and Tractability
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.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Lecture 14: Church-Turing Thesis Alonzo Church ( ) Alan Turing ( )
Cs3102: Theory of Computation Class 17: Undecidable Languages Spring 2010 University of Virginia David Evans.
Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer.
TM Design Universal TM MA/CSSE 474 Theory of Computation.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
1 Undecidability Reading: Chapter 8 & 9. 2 Decidability vs. Undecidability There are two types of TMs (based on halting): (Recursive) TMs that always.
Theory of Computing Lecture 21 MAS 714 Hartmut Klauck.
Cs3102: Theory of Computation Class 14: Turing Machines Spring 2010 University of Virginia David Evans.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 16: Universality and Undecidability.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
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.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
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.
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.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 5 Reducibility Some slides are in courtesy.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
Busch Complexity Lectures: Reductions
Reductions.
Reductions Costas Busch - LSU.
Pumping Lemma Revisited
CSE 105 theory of computation
CSCI 2670 Introduction to Theory of Computing
CSE 105 theory of computation
CSE 105 theory of computation
CSE 105 theory of computation
Presentation transcript:

Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer Science University of Virginia www.cs.virginia.edu/~njb2b/theory

Midterm Grading Don’t panic! We’re generous with extra credit The class is absolutely curved… usually heavily Curve assessed before extra credit I am open to requests for changing the grading scheme provided: The new scheme is proposed by a student and accompanied by a reasonable fairness argument (Have fun with this! The exercise could be useful in asking for a raise in the future.) The originally posted scheme remains a lower bound on each student’s grade The scheme is approved by class vote.

Closure Properties of Decidable Languages Exercise: Is this language decidable? 𝐿= 1 if Kentucky wins the tournament 0 otherwise

Closure Properties of Decidable Languages Theorem: The decidable langs are closed under concatenation. Using a 3-tape machine: Tape 1: save input remember factor attempts Tape 2: tape for Machine 1 Tape 3: tape for Machine 2 a b b a $ 1 input index a a b b b b a a

Closure Properties of Decidable Languages Theorem: The decidable langs are closed under concatenation. Using non-determinism: Tape 1: input Tape 2: tape for Machine 1 Tape 3: tape for Machine 2 Copy some characters from the first tape to tape 2 Nondeterminstically decide when to copy the rest onto tape 3 a b b a a b b a

Closure Properties of Decidable Languages Theorem: The decidable langs are closed under Kleene star. Similar to concatenation, but now we also try all possible numbers of concatenations. Tape 1: a b b a $ $ input index Number of concatenations

Closure Properties of Decidable Languages Theorem: The decidable langs are closed under Kleene star. Similar to concatenation, but now we also try all possible numbers of concatenations. Alternative method using non-determinism: Non-deterministically insert $’s into the input. The machine must accept each of these substrings. a $ b b $ a

Bogus Sentences “In a very real sense, these problems are beyond the theoretical limits of computation.” [referring to problems unsolvable by Turing Machines] Why it’s not bogus: Turing machines have become the definition of computation. “Students commonly ask this question, especially when preparing solutions to exercises and problems…” [the question being about proper level of detail] My email inbox last week disagrees

My Bogus Sentence “A turing machine can do everything a real computer can do.” Correctly guessed by Tory Steining. Why it’s bogus: Things “real” computers can do: Stop a door Lodge fish Snuggle Generate Heat

We have shown now: “Can be simulated by” Regular TM 2-dimensional TM 2-tape, 2-head TM Nondeterministic TM 3-tape, 3-head TM 2-PDA

Can one TM simulate every TM? Can a TM simulate a TM? Yes, obviously. Can one TM simulate every TM?

An every Turing Machine Input: < Description of some TM M, w > Output: result of running M on w M Universal Turing Machine Output Tape for running TM-M starting on tape w w How do we know these exist?

Examples of Universal Turing Machines

Lego Turing Machines See: http://www.youtube.com/watch?v=cYw2ewoO6c4

Tinker Toy Computers Plays tic-tac-toe!

Hydraulic Computers Theorem: fluid-based “circuits” Wire Diode Resistor Capacitor Simple circuit Theorem: fluid-based “circuits” are Turing-complete / universal! Transistor

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

2-state, 3-symbol Universal TM Sequence of configurations

Alex Smith, University of Birmingham 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.

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

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

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 qaccept If w  L either M enters qreject or M never terminates

Universal Turing Machine Recognizing ATM w Run a UTM on <M, w> to simulate running M on w. If the UTM accepts, <M, w> is in ATM. M Universal Turing Machine Output Tape for running TM-M starting on tape w w

Recognizability of ATM Recognizable Languages Decidable Languages Regular Languages CFLs finite Languages Deterministic CFLs ATM Is it inside the Decidable circle?

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

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

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

Proving Undecidability Assume there exists some TM H that decides ATM. Define D (<M>) = Construct a TM that: Outputs the opposite of the result of simulating H on input <M, <M>> 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 ATM.