DIGITAL NOTES ON FORMAL LANGUAGES AND AUTOMATA THEORY B.TECH II YEAR - II SEM (2017-18) DEPARTMENT OF INFORMATION TECHNOLOGY MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY (Autonomous Institution UGC, Govt. of India) (Affiliated to JNTUH, Hyderabad, Approved by AICTE - Accredited by NBA & NAAC A Grade - ISO 9001:2015 Certified) Maisammaguda, Dhulapally (Post Via. Hakimpet), Secunderabad 500100, Telangana State, INDIA. Page 1
MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY II Year B.Tech IT II Sem L T /P/D C 4 -/-/3 (R15A0506) Objectives: To teach the student to identify different formal language classes and their relationships To teach the student the theoretical foundation for designing compilers. To teach the student to use the ability of applying logical skills. Teach the student to prove or disprove theorems in automata theory using its properties To teach the student the techniques for information processing. Understand the theory behind engineering applications. UNIT I: Fundamentals: Strings, Alphabet, Language, Operations, Finite state machine, definitions, finite automaton model, acceptance of strings, and languages, FA, transition diagrams and Language recognizers. Finite Automata: Deterministic finite automaton, Non deterministic finite automaton and NFA with Є transitions - Significance, acceptance of languages. Conversions and Equivalence : Equivalence between NFA with and without Є transitions, NFA to DFA conversion, minimization of FSM, equivalence between two FSMs, Finite Automata with output- Moore and Melay machines. UNIT II: Regular Languages: Regular sets, regular expressions, identity rules, Conversion finite Automata for a given regular expressions, Conversion of Finite Automata to Regular expressions. Pumping lemma of regular sets, closure properties of regular sets (proofs not required). UNIT III: Grammar Formalism: Regular grammars-right linear and left linear grammars, equivalence between regular linear grammar and FA, inter conversion, Context free grammar, derivation trees, sentential forms. Right most and leftmost derivation of strings. Context Free Grammars: Ambiguity in context free grammars. Minimisation of Context Free Grammars. Chomsky normal form, Greibach normal form, Pumping Lemma for Context Free Languages. Enumeration of properties of CFL (proofs omitted). UNIT IV: Page 2
Push Down Automata: Push down automata, definition, model, acceptance of CFL, Acceptance by final state and acceptance by empty state and its equivalence. Equivalence of CFL and PDA, interconversion. (Proofs not required). Introduction to DCFL and DPDA. LINEAR BOUNDED AUTOMATA(LBA):LBA,context sensitive grammars,cs languages UNIT V: Turing Machine: Turing Machine, definition, model, design of TM, Computable functions, recursively enumerable languages. Church s hypothesis, counter machine, types of Turing machines (proofs not required). Computability Theory: Chomsky hierarchy of languages, linear bounded automata and context sensitive language, LR(0) grammar, decidability of, problems, Universal Turing Machine, undecidability of posts. Correspondence problem, Turing reducibility, Definition of P and NP problems, NP complete and NP hard problems. TEXT BOOKS: 1. Introduction to Automata Theory Languages and Computation. Hopcroft H.E. and Ullman J. D. Pearson Education. 2. Introduction to Theory of Computation - Sipser 2nd edition Thomson REFERENCE BOOKS: 1. Introduction to Computer Theory, Daniel I.A. Cohen, John Wiley. 2. Introduction to languages and the Theory of Computation,John C Martin, TMH 3. Elements of Theory of Computation, Lewis H.P. & Papadimition C.H. Pearson /PHI. 4. Theory of Computer Science and Automata languages and computation -Mishra and Chandrashekaran, 2nd edition, PHI. 5. Theory of Computation, By K.V.N. Sunitha and N.Kalyani Course Outcomes: Student will have the ability to Apply knowledge in designing or enhancing compilers. Design grammars and automata (recognizers) for different language classes. Apply knowledge in developing tools for language processing or text processing. Page 3
MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY INDEX S. No Topic Unit Page no 6-9 1 Strings, Alphabet, Language, Operations 2 Finite state machine, 10-15 Finite Automata: DFA,NFA,With Є transitions 16-21 4 Conversions and Equivalence : 22-27 5 NFA to DFA conversion, minimization of FSM, equivalence between two FSMs 28-32 6 Finite Automata with output 46-52 Regular Languages: Conversion, Pumping lemma of regular sets 53-58 8 Pumping lemma of regular sets 59-64 9 FA:RLG,LLG, Sentential forms 65-72 10 Context Free Grammars:CNF,GNF 73-93 Pumping Lemma for Context Free Languages. Enumeration of properties of CFL 94-107 3 7 I II III 11 12 IV 13 V 14 Equivalence of CFL and PDA, inter conversion Push 108-112 Down Automata, LBA,CSL Turing Machine: Church s hypothesis, counter machine, types of Turing machines 113-115 LR(0) grammar, decidability of, problems,utm,p and NP Problems 116-122 Page 4
MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY UNIT-1 Page 5
Page 6
Page 7
Page 8
Page 9
Page 10
Page 11
Page 12
Page 13
Page 14
Page 15
Page 16
Page 17
Page 18
Page 19
Page 20
Page 21
Page 22
Page 23
Page 24
Page 25
Page 26
Page 27
Unit-II Page 28
Page 29
Page 30
Page 31
Page 32
Page 33
Page 34
Page 35
Page 36
Page 37
Page 38
Page 39
Page 40
Page 41
UNIT-3 Page 42
Page 43
Page 44
Page 45
Page 46
Page 47
UNIT-3 Page 48
Page 49
Page 50
Page 51
Page 52
Page 53
Page 54
Page 55
Page 56
Page 57
Page 58
Page 59
Page 60
Page 61
Page 62
UNIT-4 Page 63
Page 64
Page 65
Page 66
Page 67
Page 68
Page 69
Page 70
Page 71
Page 72
Page 73
Page 74
Page 75
UNIT-5 Page 76
Page 77
Page 78
Page 79
Page 80
Page 81
Page 82
Page 83
Page 84
Page 85
Page 86
Page 87
Page 88
Page 89
Page 90
Page 91
Page 92
Page 93
Page 94
Page 95
Page 96
Page 97
Page 98
Page 99
Page 100
Page 101
Page 102
Page 103
Page 104
Page 105
Page 106
Page 107
Page 108
Page 109
Page 110
Page 111
Page 112
Page 113
Page 114
Page 115
Page 116
Page 117
Page 118
Page 119
Page 120
Page 121
Page 122