Courtesy Costas Busch - RPI1 A Universal Turing Machine.

Slides:



Advertisements
Similar presentations
Fall 2006Costas Busch - RPI1 A Universal Turing Machine.
Advertisements

Fall 2006Costas Busch - RPI1 Decidable Languages.
Lecture 3 Universal TM. Code of a DTM Consider a one-tape DTM M = (Q, Σ, Γ, δ, s). It can be encoded as follows: First, encode each state, each direction,
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.
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 More Applications of the Pumping Lemma.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
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)
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Recursively Enumerable and Recursive Languages
Costas Busch - RPI1 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Courtesy Costas Busch - RPI1 Turing’s Thesis. Courtesy Costas Busch - RPI2 Turing’s thesis: Any computation carried out by mechanical means can be performed.
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
Courtesy Costas Busch - RPI1 Turing Machines. Courtesy Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
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.
Courtesy Costas Busch - RPI1 Non-regular languages.
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
Costas Busch - RPI1 Turing Machines. Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Courtesy Costas Busch - RPI1 Mathematical Preliminaries.
Fall 2006Costas Busch - RPI1 More Applications of the Pumping Lemma.
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.
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Turing Machines. 2 A Turing Machine Tape Read-Write head Control Unit.
1 CSCI 2400 section 3 Models of Computation Instructor: Costas Busch.
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automaton (DFA) Input Tape “Accept” or “Reject” String Finite Automaton Output.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1.
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)
CS 461 – Nov. 7 Decidability concepts –Countable = can number the elements  –Uncountable = numbering scheme impossible  –A TM undecidable –Language classes.
Recursively Enumerable and Recursive Languages
1 Introduction to Turing Machines
Turing Machines Sections 17.6 – The Universal Turing Machine Problem: All our machines so far are hardwired. ENIAC
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Another famous undecidable problem: The halting problem.
1 Recursively Enumerable and Recursive Languages.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
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.
Fall 2006Costas Busch - RPI1 RE languages and Enumerators.
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
Undecidable Problems Costas Busch - LSU.
Lecture12 The Halting Problem
Reductions Costas Busch - LSU.
Turing’s Thesis Costas Busch - RPI.
Counting Sets.
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Turing acceptable languages and Enumerators
Decidable Languages Costas Busch - LSU.
A Universal Turing Machine
Elementary Questions about Regular Languages
The Off-Line Machine Input File read-only (once) Input string
Turing acceptable languages and Enumerators
Undecidable problems:
Formal Languages, Automata and Models of Computation
More Applications of the Pumping Lemma
Recall last lecture and Nondeterministic TMs
CS21 Decidability and Tractability
Formal Definitions for Turing Machines
Presentation transcript:

Courtesy Costas Busch - RPI1 A Universal Turing Machine

Courtesy Costas Busch - RPI2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable

Courtesy Costas Busch - RPI3 Solution: Universal Turing Machine Reprogrammable machine Simulates any other Turing Machine Attributes:

Courtesy Costas Busch - RPI4 Universal Turing Machine simulates any other Turing Machine Input of Universal Turing Machine: Description of transitions of Initial tape contents of

Courtesy Costas Busch - RPI5 Universal Turing Machine Description of Tape Contents of State of Three tapes Tape 2 Tape 3 Tape 1

Courtesy Costas Busch - RPI6 We describe Turing machine as a string of symbols: We encode as a string of symbols Description of Tape 1

Courtesy Costas Busch - RPI7 Alphabet Encoding Symbols: Encoding:

Courtesy Costas Busch - RPI8 State Encoding States: Encoding: Head Move Encoding Move: Encoding:

Courtesy Costas Busch - RPI9 Transition Encoding Transition: Encoding: separator

Courtesy Costas Busch - RPI10 Machine Encoding Transitions: Encoding: separator

Courtesy Costas Busch - RPI11 Tape 1 contents of Universal Turing Machine: encoding of the simulated machine as a binary string of 0’s and 1’s

Courtesy Costas Busch - RPI12 A Turing Machine is described with a binary string of 0’s and 1’s The set of Turing machines forms a language: each string of the language is the binary encoding of a Turing Machine Therefore:

Courtesy Costas Busch - RPI13 Language of Turing Machines L = { , , , …… } (Turing Machine 1) (Turing Machine 2) ……

Courtesy Costas Busch - RPI14 Countable Sets

Courtesy Costas Busch - RPI15 Infinite sets are either: Countable or Uncountable

Courtesy Costas Busch - RPI16 Countable set: There is a one to one correspondence between elements of the set and Natural numbers Any finite set Any Countably infinite set: or

Courtesy Costas Busch - RPI17 Example: Even integers: The set of even integers is countable Positive integers: Correspondence: corresponds to

Courtesy Costas Busch - RPI18 Example:The set of rational numbers is countable Rational numbers:

Courtesy Costas Busch - RPI19 Naïve Proof Rational numbers: Positive integers: Correspondence: Doesn’t work: we will never count numbers with nominator 2:

Courtesy Costas Busch - RPI20 Better Approach

Courtesy Costas Busch - RPI21

Courtesy Costas Busch - RPI22

Courtesy Costas Busch - RPI23

Courtesy Costas Busch - RPI24

Courtesy Costas Busch - RPI25

Courtesy Costas Busch - RPI26 Rational Numbers: Correspondence: Positive Integers:

Courtesy Costas Busch - RPI27 We proved: the set of rational numbers is countable by describing an enumeration procedure

Courtesy Costas Busch - RPI28 Definition An enumeration procedure for is a Turing Machine that generates all strings of one by one Let be a set of strings and Each string is generated in finite time

Courtesy Costas Busch - RPI29 Enumeration Machine for Finite time: strings output (on tape)

Courtesy Costas Busch - RPI30 Enumeration Machine Configuration Time 0 Time

Courtesy Costas Busch - RPI31 Time

Courtesy Costas Busch - RPI32 If for a set there is an enumeration procedure, then the set is countable Observation:

Courtesy Costas Busch - RPI33 Example: The set of all strings is countable We will describe an enumeration procedure Proof:

Courtesy Costas Busch - RPI34 Naive procedure: Produce the strings in lexicographic order: Doesn’t work: strings starting with will never be produced

Courtesy Costas Busch - RPI35 Better procedure: 1. Produce all strings of length 1 2. Produce all strings of length 2 3. Produce all strings of length 3 4. Produce all strings of length Proper Order

Courtesy Costas Busch - RPI36 Produce strings in Proper Order: length 2 length 3 length 1

Courtesy Costas Busch - RPI37 Theorem: The set of all Turing Machines is countable Proof: Find an enumeration procedure for the set of Turing Machine strings Any Turing Machine can be encoded with a binary string of 0’s and 1’s

Courtesy Costas Busch - RPI38 1. Generate the next binary string of 0’s and 1’s in proper order 2. Check if the string describes a Turing Machine YES: if YES: print string on output tape NO: if NO: ignore string Enumeration Procedure: Repeat

Courtesy Costas Busch - RPI39 Uncountable Sets

Courtesy Costas Busch - RPI40 A set is uncountable if it is not countable Definition:

Courtesy Costas Busch - RPI41 Theorem: Let be an infinite countable set The powerset of is uncountable

Courtesy Costas Busch - RPI42 Proof: Since is countable, we can write Elements of

Courtesy Costas Busch - RPI43 Elements of the powerset have the form: ……

Courtesy Costas Busch - RPI44 We encode each element of the power set with a binary string of 0’s and 1’s Powerset element Encoding

Courtesy Costas Busch - RPI45 Let’s assume (for contradiction) that the powerset is countable. Then: we can enumerate the elements of the powerset

Courtesy Costas Busch - RPI46 Powerset element Encoding

Courtesy Costas Busch - RPI47 Take the powerset element whose bits are the complements in the diagonal

Courtesy Costas Busch - RPI48 New element: (birary complement of diagonal)

Courtesy Costas Busch - RPI49 The new element must be some of the powerset However, that’s impossible: the i-th bit of must be the complement of itself from definition of Contradiction!!!

Courtesy Costas Busch - RPI50 Since we have a contradiction: The powerset of is uncountable

Courtesy Costas Busch - RPI51 An Application: Languages Example Alphabet : The set of all Strings: infinite and countable

Courtesy Costas Busch - RPI52 Example Alphabet : The set of all Strings: infinite and countable A language is a subset of :

Courtesy Costas Busch - RPI53 Example Alphabet : The set of all Strings: infinite and countable The powerset of contains all languages: uncountable

Courtesy Costas Busch - RPI54 Languages: uncountable Turing machines: countable There are more languages than Turing Machines

Courtesy Costas Busch - RPI55 There are some languages not accepted by Turing Machines (These languages cannot be described by algorithms) Conclusion:

Courtesy Costas Busch - RPI56 Languages Accepted by Turing Machines Languages not accepted by Turing Machines