1.68k likes | 1.81k Views
CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 13 Mälardalen University 2007. Content Introduction Universal Turing Machine Chomsky Hierarchy Decidability Reducibility Uncomputable Functions Rice’s Theorem Interactive Computing & Persistent TM’s (Dina Goldin).
E N D
CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 13 Mälardalen University 2007
ContentIntroduction UniversalTuring Machine Chomsky Hierarchy DecidabilityReducibilityUncomputable FunctionsRice’s TheoremInteractive Computing & Persistent TM’s (Dina Goldin)
http://www.turing.org.uk/turing/ Who was Alan Turing? Founder of computer science, mathematician, philosopher, codebreaker, visionary man before his time. http://www.cs.usfca.edu/www.AlanTuring.net/turing_archive/index.html-Jack Copeland and Diane Proudfoot http://www.turing.org.uk/turing/ The Alan Turing Home PageAndrew Hodges
1912 (23 June): Birth, London1926-31: Sherborne School1930: Death of friend Christopher Morcom1931-34: Undergraduate at King's College, Cambridge University1932-35: Quantum mechanics, probability, logic1935: Elected fellow of King's College, Cambridge1936: The Turing machine, computability, universal machine1936-38: Princeton University. Ph.D. Logic, algebra, number theory1938-39: Return to Cambridge. Introduced to German Enigma cipher machine1939-40: The Bombe, machine for Enigma decryption1939-42: Breaking of U-boat Enigma, saving battle of the Atlantic Alan Turing
1943-45: Chief Anglo-American crypto consultant. Electronic work.1945: National Physical Laboratory, London1946: Computer and software design leading the world.1947-48: Programming, neural nets, and artificial intelligence1948: Manchester University1949: First serious mathematical use of a computer1950: The Turing Test for machine intelligence1951: Elected FRS. Non-linear theory of biological growth1952: Arrested as a homosexual, loss of security clearance1953-54: Unfinished work in biology and physics1954 (7 June): Death (suicide) by cyanide poisoning, Wilmslow, Cheshire. Alan Turing
Hilbert’s Program, 1900 Hilbert’s hope was that mathematics would be reducible to finding proofs (manipulating the strings of symbols) from a fixed system of axioms, axioms that everyone could agree were true. Can all of mathematics be made algorithmic, or will there always be new problems that outstrip any given algorithm, and so require creative acts of mind to solve?
Turing’s "Machines". These machines are humans who calculate. (Wittgenstein) A man provided with paper, pencil, and rubber, and subject to strict discipline, is in effect a universal machine. (Turing)
Standard Turing Machine Tape ...... ...... Read-Write head Control Unit
The Tape No boundaries -- infinite length ...... ...... Read-Write head The head moves Left or Right
...... ...... Read-Write head The head at each time step: 1. Reads a symbol 2. Writes a symbol 3. Moves Left or Right
Example Time 0 ...... ...... Time 1 ...... ...... 1. Reads 2. Writes 3. Moves Left
The Input String Input string Blank symbol ...... ...... head Head starts at the leftmost position of the input string
States & Transitions Write Read Move Left Move Right
Time 1 ...... ...... Time 2 ...... ......
Determinism Turing Machines are deterministic Not Allowed Allowed No lambda transitions allowed in standard TM!
Turing Machine Input alphabet Tape alphabet States Final states Transition function Initial state blank
Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Better are reprogrammable machines.
Solution: Universal Turing Machine Characteristics: • Reprogrammable machine • Simulates any other Turing Machine
Universal Turing Machine simulates any other Turing Machine Input of Universal Turing Machine • Description of transitions of • Initial tape contents of
Tape 1 Three tapes Description of Tape 2 Universal Turing Machine Tape Contents of Tape 3 State of
Tape 1 Description of We describe Turing machine as a string of symbols: We encode as a string of symbols
Alphabet Encoding Symbols: Encoding:
States: Encoding: Move: Encoding: State Encoding Head Move Encoding
Transition Encoding Transition: Encoding: separator
Machine Encoding Transitions: Encoding: separator
Tape 1 contents of Universal Turing Machine: encoding of the simulated machine M as a binary string of 0’s and 1’s
A Turing Machine is described with a binary string of 0’s and 1’s. Therefore: The set of Turing machines forms a language: Each string of the language is the binary encoding of a Turing Machine.
Language of Turing Machines (Turing Machine 1) L = {010100101, 00100100101111, 111010011110010101, ……} (Turing Machine 2) ……
The Chomsky Language Hierarchy Recursively-enumerable Recursive Context-sensitive Context-free Regular Non-recursively enumerable
Unrestricted Grammars Productions String of variables and terminals String of variables and terminals
Theorem A language L is recursively enumerable if and only if it is generated by an unrestricted grammar.
Context-Sensitive Grammars Productions String of variables and terminals String of variables and terminals and
The language is context-sensitive:
Theorem A language L is context sensitive if and only if it is accepted by a Linear-Bounded automaton.
Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the only tape space allowed to use.
Linear Bounded Automaton (LBA) Input string Working space in tape Left-end marker Right-end marker All computation is done between end markers.
Observation There is a language which is recursive but not context-sensitive.
Does Machine M have three states ? • Is string w a binary number? • Does DFA Maccept any input? Consider problems with answer YES or NO. Examples
Does Machine M have three states ? • Is string w a binary number? • Does DFA Maccept any input? A problem is decidable if some Turing machine solves (decides) the problem. Decidable problems:
The Turing machine that solves a problem answers YES or NO for each instance. YES Input problem instance Turing Machine NO
The machine that decides a problem: • If the answer is YES • then halts in a yes state • If the answer is NO • then halts in a no state These states may not be the final states.
YES NO Turing Machine that decides a problem YES and NO states are halting states
Difference between Recursive Languages accept (“Acceptera”) and Decidable problems decide (“Avgöra”) For decidable problems: The YES states may not be final states.