Lecture Theory of Automata: Lesson 45. The main topics covered in this chapter include: turing machine and examples, DELETE subprogram and example, INSERT subprogram, the subprogram INSERT and example, every regular language accepted by some TM, the TAPE situation, . | Recap lecture 44 Decidability whether a CFG generates certain string emptiness examples whether a nonterminal is used in the derivation of some word uselessness examples whether a CFL is finite finiteness example whether the given string is generated by the given CFG membership example parsing techniques top down parsing example 1 Turing machine The mathematical models FAs TGs PDAs that have been discussed so far can decide whether a string is accepted or not by them . these models are language identifiers. However there are still some languages which can t be accepted by them . there does not exist any FA or TG or PDA accepting any non CFLs. Alan Mathison Turing developed the machines called Turing machines which accept some non CFLs as well in addition to CFLs. 2 Turing machine Definition A Turing machine TM consists of the following 1. An alphabet of input letters. 2. An input TAPE partitioned into cells having infinite many locations in one direction. The input string is placed on the TAPE starting its first letter on the cell i the rest of the TAPE is initially filled with blanks s . 3 Turing machine continued Input TAPE i ii iii iv a b a . . . TAPE Head 3. A tape Head can read the contents of cell on the TAPE in one step. It can replace the character at any cell and can reposition itself to the next cell to the right or to the left of that it has just read. 4 Turing machine continued Initially the TAPE Head is at the cell i. The TAPE Head can t move to the left of cell i. the location of the TAPE Head is denoted by . 4. An alphabet of characters that can be printed on the TAPE by the TAPE Head. may include the letters of . Even the TAPE Head can print blank which means to erase some character from the TAPE. 5 Turing machine continued 5. Finite set of states containing exactly one START state and some may be none HALT states that cause execution to terminate when the HALT states are entered. 6. A program which is the set of rules which show that which .