1 Unit – 5 : STATE MACHINES Syllabus: Languages and Grammars – Finite State Machines State machines and languages – Turing Machines – Computational Complexity.

Slides:



Advertisements
Similar presentations
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
Advertisements

1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture7: PushDown Automata (Part 1) Prof. Amos Israeli.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
CS 302: Discrete Math II A Review. An alphabet Σ is a finite set (e.g., Σ = {0,1}) A string over Σ is a finite-length sequence of elements of Σ For x.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?

Transparency No. P3C1-1 Turing Machines PART III Turing Machines and Effective Computability.
CS 490: Automata and Language Theory Daniel Firpo Spring 2003.
Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
Fall 2006Costas Busch - RPI1 The Chomsky Hierarchy.
Costas Busch - LSU1 Non-Deterministic Finite Automata.
Fall 2003Costas Busch - RPI1 Turing Machines (TMs) Linear Bounded Automata (LBAs)
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Grammars, Languages and Finite-state automata Languages are described by grammars We need an algorithm that takes as input grammar sentence And gives a.
1 Non-Deterministic Finite Automata. 2 Alphabet = Nondeterministic Finite Automaton (NFA)
Finite State Machines Data Structures and Algorithms for Information Processing 1.
Lecture 14: Church-Turing Thesis Alonzo Church ( ) Alan Turing ( )
Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { ‘{‘, ‘}’ } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite language,
Context-Free Languages Regular Languages Violates Pumping Lemma For RLs Violates Pumping Lemma For CFLs Described by CFG, PDA 0n1n0n1n 0n1n2n0n1n2n Described.
CS490 Presentation: Automata & Language Theory Thong Lam Ran Shi.
CSE202: Introduction to Formal Languages and Automata Theory Chapter 9 The Turing Machine These class notes are based on material from our textbook, An.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
 Computability Theory Turing Machines Professor MSc. Ivan A. Escobar
Transparency No. P3C1-1 Turing Machines PART III Turing Machines and Effective Computability.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
Turing Machine Finite state automaton –Limitation: finite amount of memory –Prevents recognizing languages that are not regular {0 n 1 n |n = 0,1,2,…}
September1999 CMSC 203 / 0201 Fall 2002 Week #15 – 2/4/6 December 2002 Prof. Marie desJardins.
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
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 Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.
Lecture 16b Turing Machines Topics: Closure Properties of Context Free Languages Cocke-Younger-Kasimi Parsing Algorithm June 23, 2015 CSCE 355 Foundations.
Transparency No. P3C2-1 Formal Language and Automata Theory PART III Chapter 2 Other Equivalent models of Standard Turing machine.
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.
Transparency No. P3C1-1 Turing Machines PART III Turing Machines and Effective Computability.
Theory of Languages and Automata By: Mojtaba Khezrian.
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CS 154 Formal Languages and Computability April 5 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
CS6800 Advance Theory of Computation Spring 2016 Nasser Alsaedi
8. Introduction to Turing Machines
Turing Machines Alan Turing ( ) mathematician and logician.
Turing Machines Finite State Machines.
Non Deterministic Automata
Busch Complexity Lectures: Turing Machines
Linear Bounded Automata LBAs
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Turing Machines.
CS21 Decidability and Tractability
Context Sensitive Languages and Linear Bounded Automata
CSE322 The Chomsky Hierarchy
Jaya Krishna, M.Tech, Assistant Professor
Turing Machines (TM) Deterministic Turing Machine (DTM)
8. Introduction to Turing Machines
Non Deterministic Automata
CS21 Decidability and Tractability
Decidability and Tractability
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
The Church-Turing Thesis and Turing-completeness
The Chomsky Hierarchy Costas Busch - LSU.
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Presentation transcript:

1 Unit – 5 : STATE MACHINES Syllabus: Languages and Grammars – Finite State Machines State machines and languages – Turing Machines – Computational Complexity – computability Decidability – Church's Thesis

2 Language A language L over an alphabet ∑ is a subset of ∑*,L ⊆ ∑*. A language may be empty. Here you should note a point L = { ∊ },a language containing an empty string is not an empty language. Languages and Grammars

3 Grammar A grammar is a 4-tuple (V, , P, S), where:  is an alphabet (characters  are called terminals) V is a set (elements in V are called variables) P is a set of Production rules S, the start variable, is one of the variables in V

4

5

6

7 type 3 (regular langs) CFLs (type 2 langs) CSLs (type 1 Langs) Recursive Languages Recursively Enumerable(type 0) languages All Languages

8 Finite State Machines Input String Output String Finite Automaton Finite Automaton

9 State machines and languages : set of states : input alphabet : transition function : initial state Deterministic Finite Accepter (DFA) : set of final states

10 : set of states : input alphabet : transition function : initial state : set of final states Non-Deterministic Finite Accepter (NFA) For any string x, there may exist none or more than one path from initial state and associated with x.

11

12

13

14

15

16

17

18

19 Turing Machines 1. Finite automata (DFAs, NFAs, etc.): 1.limited input tape: one-way, read-only 2.no working-memory 3.finite-control store (program) 2. PDAs: 1.limited input tape: one-way, read-only 2.one additional stack as working memory 3.finite-control store (program) 3. Turing machines (TMs): 1.a semi-infinite tape storing input and supplying additional working storage. 2.finite control store (program) 3.can read/write and two-way(move left and right) depending on the program state and input symbol scanned.

20 left-end x 1 x 2 x 3 x 4 x 5.. x n input: x …. additional working memory.... accept final state reject final state current state initial state control store (program) r/w & movable tape head memory is a one-dimensional tape permitted actions: 1. write 2. move left/right depending on scanned symbol and current state no right-end for TM The model of a Turing machine

21 An instruction of a TM is a tuple: (q, a, p, d)  Q x G x Q x (G U {L,R}) where 1.q is the current state 2.a is the symbol scanned by the tape head 3.(q,a) define a precondition that the machine may encounter 4.(p,d) specify the actions to be done by the TM once the machine is in a condition matching the precondition (i.e., the symbol scanned by the tape head is ‘a’ and the machine is at state q ) 5.p is the next state that the TM will enter 6.d is the action to be performed: 1.d = b  G means “write the symbol b to the tape cell currently scanned by the tape head”. 2.d = R (or L) means “move the tape head one tape cell in the right (or left, respectively) direction. A Deterministic TM program d is simply a set of TM instructions (or more formally a function: d: Q x G --> Qx (G U{L,R}))

22 A deterministic 1-tape Turing machine (STM) is a 9-tuple M = (Q,S,G, [, , d, s, t,r ) where 1.Q : is a finite set of (program) states with a role like labels in traditional programs 2.G : tape alphabet 3.S  G : input alphabet 4.[  G - S : The left end-of-tape mark 5.  G - S is the blank tape symbol 6.s  Q : initial state 7.t  Q : the accept state 8.r  t  Q: the reject state and 9.d: Q - {t,r} --> Qx(G U {L,R}) is a total transition function with the restriction: if d(p, [ ) =(q, d) then d = R. i.e., the STM cannot write any symbol at left-end and never move off the tape to the left. Formal Definition of a standard TM (STM)

23 1. M is said to halt on input x if either M accepts x or rejects x. 2. M is said to loop on x if it does not halt on x. 3. A TM is said to be total if it halts on all inputs. 4. The language accepted by a TM M, L(M) = def {x in S* | x is accepted by M, i.e., (s, [x  w,0) |--* M (t, -,- ) } 5. If L = L(M) for some STM M ==> L is said to be recursively enumerable (r.e.) 6. If L = L(M) for some total STM M ==> L is said to be recursive 7. If ~ L= def S* - L = L(M) for some STM M (or total STM M) ==> L is said to be Co-r.e. (or Co-recursive, respectively) Languages accepted by a STM

24 Languagerecognition modelgeneration model Regular languages (type 3) languages Finite automata (DFA, NFA) regular expressions linear grammars CFL ( type 2, Context Free ) languages Pushdown automataCFG ; type 2 ( context free) grammars CSL (type 1, Context sensitive) Languages LBA (Linear Bound Automata) CSG (Context sensitive, type 1 Grammars) Recursive LanguagesTotal Turing machines- R.E. (Recursively enumerative, type 0) Languages Turing machinesGPSG(type 0, general phrase-structure, unrestricted) grammar Relationship of Languages, Grammars and machines

25 Computational Complexity

26

27

28 Decidability

29

30

31

32

33 Church's Thesis Any mechanical computation can be performed by a Turing Machine There is a TM-n corresponding to every computable problem We can model any mechanical computer with a TM The set of languages that can be decided by a TM is identical to the set of languages that can be decided by any mechanical computing machine If there is no TM that decides problem P, there is no algorithm that solves problem P.

34 [Last class and PS4] Equivalence of TM and 2- stack deterministic PDA + ε-transitions [PS4] Making the tape infinite in both directions adds no power [Soon] Adding a second tape adds no power [Church] Lambda Calculus is equivalent to TM [Chomsky] Unrestricted replacement grammars are equivalent to TM [Takahara and Yokomori] DNA is at least as powerful as a TM [Hotly Debated] Is the human brain equivalent to a TM? Examples

35 “Since a precise mathematical definition of the term effectively calculable (effectively decidable) has been wanting, we can take this thesis... as a definition of it...” As stated by Kleene: Every effectively calculable function (effectively decidable predicate) is general recursive.

36 Published On Computable Numbers, with an Application to the Entscheidungsproblem (1936) –Introduced the Halting Problem –Formal model of computation (now known as “Turing Machine”) Codebreaker at Bletchley Park –Involved in breaking Enigma Cipher After the war: convicted of homosexuality (then a crime in Britain), committed suicide eating cyanide apple Alan Turing ( )