1 / 185

CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 13

CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 13 Mälardalen University 2012. 1.

Download Presentation

CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 13

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 13 Mälardalen University 2012 1

  2. ContentAlan Turing and Hilbert Program UniversalTuring Machine Chomsky Hierarchy DecidabilityReducibilityUncomputable FunctionsRice’s TheoremChurch-Turing ThesisComputation beyond Turing ModelInteractive Computing, Persistent TM’s (Dina Goldin/Peter Wegner)

  3. TURING MACHINES Based on C Busch, RPI, Models of Computation

  4. 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)

  5. Standard Turing Machine Tape ...... ...... Read-Write head Control Unit

  6. The Tape No boundaries -- infinite length ...... ...... Read-Write head The head moves Left or Right

  7. ...... ...... Read-Write head The head at each time step: 1. Reads a symbol 2. Writes a symbol 3. Moves Left or Right

  8. Example Time 0 ...... ...... Time 1 ...... ...... 1. Reads 2. Writes 3. Moves Left

  9. The Input String Input string Blank symbol ...... ...... head Head starts at the leftmost position of the input string

  10. States & Transitions Write Read Move Left Move Right

  11. Time 1 ...... ...... Time 2 ...... ......

  12. Determinism Turing Machines are deterministic Not Allowed Allowed No lambda transitions allowed in standard TM!

  13. Formal Definitions for Turing Machines

  14. Transition Function

  15. Turing Machine Input alphabet Tape alphabet States Final states Transition function Initial state blank

  16. Universal Turing Machine

  17. Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Better are reprogrammable machines.

  18. Solution: Universal Turing Machine Characteristics: • Reprogrammable machine • Simulates any other Turing Machine

  19. Universal Turing Machine simulates any other Turing Machine Input of Universal Turing Machine • Description of transitions of • Initial tape contents of

  20. Tape 1 Three tapes Description of Tape 2 Universal Turing Machine Tape Contents of Tape 3 States of

  21. Tape 1 Description of We encode/describe Turing Machine as a string of symbols.

  22. Alphabet Encoding Symbols: Encoding: Tape Contents Encoding

  23. States: Encoding: Move: Encoding: State Encoding Head Move Encoding

  24. Transition Encoding Transition: Encoding: separator

  25. Machine Encoding Transitions: Encoding: separator

  26. Tape 1 contents of Universal Turing Machine: encoding of the simulated machine as a binary string of 0’s and 1’s

  27. 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.

  28. Language of Turing Machines (Turing Machine 1) L = {010100101, 00100100101111, 111010011110010101, ……} (Turing Machine 2) (Turing Machine 3) ……

  29. The Chomsky Hierarchy

  30. The Chomsky Language Hierarchy Recursively-enumerable Recursive Context-sensitive Context-free Regular Non-recursively enumerable

  31. Unrestricted Grammars Productions String of variables and terminals String of variables and terminals Recursively Enumerable Languages

  32. Example of unrestricted grammar

  33. Theorem A language is recursively enumerable if and only if it is generated by an unrestricted grammar.

  34. Context-Sensitive Grammars Productions String of variables and terminals String of variables and terminals and

  35. The language is context-sensitive:

  36. Theorem A language is context sensitive if and only if it is accepted by a Linear-Bounded automaton.

  37. 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.

  38. Linear Bounded Automaton (LBA) Input string Working space in tape Left-end marker Right-end marker All computation is done between end markers.

  39. Observation There is a language which is context-sensitive but not recursive.

  40. Decidability

  41. Does Machine have three states ? • Is string a binary number? • Does DFA accept any input? Consider problems with answer YES or NO. Examples

  42. Does Machine have three states ? • Is string a binary number? • Does DFA accept any input? A problem is decidable if some Turing machine solves (decides) the problem. Decidable problems:

  43. The Turing machine that solves a problem answers YES or NO for each instance. YES Input problem instance Turing Machine NO

  44. 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.

  45. Turing Machine that decides a problem YES NO YES and NO states are halting states

  46. Difference between Recursive Languages (“Acceptera”) and Decidable problems (“Avgöra”) For decidable problems: The YES states may not be final states.

  47. Some problems are undecidable: There is no Turing Machine that solves all instances of the problem.

  48. A famous undecidable problem: The halting problem

  49. String Input: • Turing Machine Question: Does halt on ? The Halting Problem

  50. Theorem The halting problem is undecidable. Proof Assume to the contrary that the halting problem is decidable.

More Related