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

Slides:



Advertisements
Similar presentations
ALAK ROY. Assistant Professor Dept. of CSE NIT Agartala
Advertisements

Fall 2006Costas Busch - RPI1 Turing Machines. Fall 2006Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Programming Languages Wrap-up. Your Toolkit Object-oriented Imperative Functional Logic.
Turing Machines (At last!). Designing Universal Computational Devices Was Not The Only Contribution from Alan Turing… Enter the year 1940: The world is.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Fall 2004COMP 3351 Turing Machines. Fall 2004COMP 3352 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Rules have form String of variables and terminals String of variables and terminals.
Courtesy Costas Busch - RPI1 Turing Machines. Courtesy Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Turing Machines.
1 Computing Functions with Turing Machines. 2 A function Domain: Result Region: has:
Linear Bounded Automata LBAs
CS5371 Theory of Computation Lecture 10: Computability Theory I (Turing Machine)
1 Foundations of Software Design Fall 2002 Marti Hearst Lecture 29: Computability, Turing Machines, Can Computers Think?
Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov.
Costas Busch - RPI1 Turing Machines. Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 A Turing Machine Tape Read-Write head Control Unit.
Lecture 14: Church-Turing Thesis Alonzo Church ( ) Alan Turing ( )
Complexity and Computability Theory I Lecture #13 Instructor: Rina Zviel-Girshin Lea Epstein Yael Moses.
Turing, Expert Systems, and Neural Nets
1 Language Recognition (11.4) and Turing Machines (11.5) Longin Jan Latecki Temple University Based on slides by Costas Busch from the courseCostas Busch.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
 Computability Theory Turing Machines Professor MSc. Ivan A. Escobar
1 CO Games Development 2 Week 21 Turing Machines & Computability Gareth Bellaby.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
1 Turing Machines There are languages that are not context-free. What can we say about the most powerful automata and the limits of computation?. Alan.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
Turing Machines (13.5) Based on slides by Costas Busch from the course
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2005.
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.
1 IDT Open Seminar ALAN TURING AND HIS LEGACY 100 Years Turing celebration Gordana Dodig Crnkovic, Computer Science and Network Department Mälardalen University.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
1 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
1 Introduction to Turing Machines
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CS 154 Formal Languages and Computability April 12 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
1 Unit – 5 : STATE MACHINES Syllabus: Languages and Grammars – Finite State Machines State machines and languages – Turing Machines – Computational Complexity.
1 Computing Functions with Turing Machines. 2 A function Domain Result Region has:
Chapter 9 Turing Machines What would happen if we change the stack in Pushdown Automata into some other storage device? Truing Machines, which maintains.
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
The Church-Turing Thesis Chapter Are We Done? FSM  PDA  Turing machine Is this the end of the line? There are still problems we cannot solve:
MA/CSSE 474 Theory of Computation Universal Turing Machine Church-Turing Thesis (Winter 2016, these slides were also used for Day 33)
CS 154 Formal Languages and Computability April 5 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Busch Complexity Lectures: Turing Machines
Computing Functions with Turing Machines
Turing Machines 2nd 2017 Lecture 9.
Modeling Computation:
Chapter 9 TURING MACHINES.
Turing Machines (11.5) Based on slides by Costas Busch from the course
Theory of Computation Turing Machines.
Computing Functions with Turing Machines
Theory of computing, part 4
CS21 Decidability and Tractability
Formal Languages, Automata and Models of Computation
Formal Definitions for Turing Machines
CO Games Development 2 Week 21 Turing Machines & Computability
Presentation transcript:

1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2011

2 Content Chomsky’s Language Hierarchy Turing Machines Determinism Halting TM Examples Standard TM Computing Functions with TM Combining TMs Turing Thesis

3 The Language Hierarchy Regular Languages Context-Free Languages ? ?

4 Regular Languages Context-free languages Recursively enumerable languages

5 Finite Automata Push-down Automata Turing Machines

6 Who was Alan Turing? Founder of Computability Theory, mathematician, philosopher, codebreaker, visionary man before his time. Jack Copeland and Diane Proudfoot The Alan Turing Home Page Andrew Hodges/

7 Alan Turing 1912 (23 June): Birth, London : Sherborne School 1930: Death of friend Christopher Morcom : Undergraduate at King's College, Cambridge University : Quantum mechanics, probability, logic 1935: Elected fellow of King's College, Cambridge 1936: The Turing machine, computability, universal machine : Princeton University. Ph.D. Logic, algebra, number theory : Return to Cambridge. Introduced to German Enigma cipher machine : The Bombe, machine for Enigma decryption : Breaking of U-boat Enigma, saving battle of the Atlantic

8 Alan Turing : Chief Anglo-American crypto consultant. Electronic work. 1945: National Physical Laboratory, London 1946: Computer and software design leading the world : Programming, neural nets, and artificial intelligence 1948: Manchester University 1949: First serious mathematical use of a computer 1950: The Turing Test for machine intelligence 1951: Elected FRS. Non-linear theory of biological growth 1952: Arrested as a homosexual, loss of security clearance : Unfinished work in biology and physics 1954 (7 June): Death (suicide) by cyanide poisoning, Wilmslow, Cheshire.

9 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?

10 Turing Machines and Computability The question Hilbert raised was whether there could be a general method or process by which one could decide whether a mathematical proposition could be proved. But what exactly was meant by a 'method' or 'process'? People had already used the concept of a 'mechanical' process, and Turing had an idea which made this quite precise: computability. Turing wrote in his first sentences: “The "computable" numbers may be described briefly as the real numbers whose expressions as a decimal are calculable by finite means... a number is computable if its decimal can be written down by a machine. “

11 Turing Machines and Computability The Turing machine concept involves specifying a very restricted set of logical operations, but Turing showed how other more complex mathematical procedures could be built out of these atomic components. Turing argued that his formalism was sufficiently general to encompass anything that a human being could do when carrying out a definite method. Turing's famous paper On computable numbers, with an application to the Entscheidungsproblem, which worked out the theory of Turing machines and the definition of computability, is available as a PDF file on-line:

12 Turing Machines

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) 13

Tape Read-Write head Control Unit Turing Machine

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

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

17 Example Time Time Reads 2. Writes 3. Moves Left

18 Time Time Reads 2. Writes 3. Moves Right

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

20 Read Write Move Left Move Right States & Transitions

21 Example Time 1 current state

Time Time 2

Time Time 2 Example

Time Time 2 Example

25 Determinism Allowed Not Allowed No lambda transitions allowed in TM! Turing Machines are deterministic

26 Determinism Note the difference between state indeterminism when not even possible future states are known in advance and choice indeterminism when possible future states are known, but we do not know which state will be taken.

27 Partial Transition Function Example No transition for input symbol Allowed

28 Halting The machine halts if there are no possible transitions to follow

29 Example No possible transition HALT!

30 Final States Allowed Not Allowed Final states have no outgoing transitions In a final state the machine halts

31 Acceptance Accept Input If machine halts in a final state Reject Input If machine halts in a non-final state or If machine enters an infinite loop

32 Turing Machine Example A TM that accepts the language

33 Time 0

34 Time 1

35 Time 2

36 Time 3

37 Time 4 Halt & Accept

38 Rejection Example Time 0

39 Time 1 No possible Transition Halt & Reject

40 Infinite Loop Example Another TM for language

41 Time 0

42 Time 1

43 Time 2

44 Time 2 Time 3 Time 4 Time 5... infinite loop…

45 Because of the infinite loop: The final state cannot be reached The machine never halts The input is not accepted

46 Another Turing Machine Example Turing machine for the language

47 Time 0

48 Time 1

49 Time 2

50 Time 3

51 Time 4

52 Time 5

53 Time 6

54 Time 7

55 Time 8

56 Time 9

57 Time 10

58 Time 11

59 Time 12

60 Halt & Accept Time 13

61 If we modify the machine for the language we can easily construct a machine for the language Observation

62 Formal Definitions for Turing Machines

63 Transition Function

64 Transition Function

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

66 Instantaneous description: Configuration

67 Time 4Time 5 A move:

68 Time 4Time 5 Time 6Time 7

69 Equivalent notation:

70 Initial configuration: Input string

71 For any Turing Machine Initial stateFinal state The Accepted Language

72 Standard Turing Machine Deterministic Infinite tape in both directions Tape is the input/output file The machine we described is the standard:

73 Computing Functions with Turing Machines

74 A function has: Domain (domän): Range (värdemängd):

75 A function may have many parameters: Example: Addition function

76 Integer Domain Binary:101 Decimal:5 We prefer unary representation: easier to manipulate Unary:11111

77 Definition A function is computable if there is a Turing Machine such that: Initial configuration Final configuration Domain final state initial state For all

78 Initial Configuration Final Configuration In other words Domain For all A function is computable if there is a Turing Machine such that

79 Example (Addition) The function is computable Turing Machine: Input string: unary Output string: unary are integers

80 Start Finish final state initial state

81 Turing machine for function

82 Execution Example: Time 0 Final Result (2)

83 Time 0

84 Time 1

85 Time 2

86 Time 3

87 Time 4

88 Time 5

89 Time 6

90 Time 7

91 Time 8

92 Time 9

93 Time 10

94 Time 11

95 HALT & accept Time 12

96 Another Example (Multiplication) The functionis computable Turing Machine Input string: unary Output string:unary is integer

97 Start Finish final state initial state

98 Turing Machine Pseudocode for Replace every 1 with $ Repeat: Find rightmost $, replace it with 1 Go to right end, insert 1 Until no more $ remain

99 Turing Machine for

100 Start Finish

101 Time 0

102 Time 1

103 Time 2

104 Time 3

105 Time 4

106 Time 5

107 Time 6

108 Time 7

109 Time 8

110 Time 9

111 Time 10

112 Time 11

113 Time 12

114 Time 13

115 Time 14

116 Another Example The function is computable if Turing Machine for Output: or Input:

117 Turing Machine Pseudocode Match a 1 from with a 1 from Repeat Until all of or are matched If a 1 from is not matched erase tape, write 1 else erase tape, write 0

118 Combining Turing Machines

119 Block Diagram Turing Machine inputoutput

120 Example if Comparer Adder Eraser

121 Turing’s Thesis

122 Do Turing machines have the same power with a digital computer? Intuitive answer: Yes There is no formal answer! Question:

123 Turing’s thesis Any computation carried out by mechanical means can be performed by a Turing Machine (1930) The Origins of the Turing Thesis Myth Goldin & Wegner

124 And, the other way round: A computation is mechanical if and only if it can be performed by a Turing Machine Strong Turing Thesis: There is no known model of computation more powerful than Turing Machines Wrong! Asynchronous parallel computation is more powerful than TM model, and cannot be reduced to TM.

125 Definition of Algorithm An algorithm for function is a Turing Machine which computes

126 When we say There exists an algorithm Algorithms are Turing Machines It means There exists a Turing Machine

127 LanguageGrammarMachine Chomsky Hierarchy Non-computable?? Recursively enumerable (RE) UnrestrictedTuring machines 0 Recursive Turing machines that always halt 0 Context-sensitive Context-sensitive grammar Linear-bounded automata 1 Context-free Context-free grammar Non-deterministic pushdown automata 2 Regular Regular expressions Finite state automata 3 properly inclusive Languages, Grammars, Machines

128 Regular Languages FINITE AUTOMATA Context-free languages PUSH-DOWN AUTOMATA Unrestricted grammar languages TURING MACHINES

Interesting further reading Computational and evolutionary aspects of language Turing’s thesis The Alan Turing World Symposium on Natural/Unconventional Computing AISB/IACAP World Congress 129