0% found this document useful (0 votes)
403 views123 pages

Toc - Notes

The document contains lecture notes on formal languages and automata theory for a computer science course. It covers topics like finite automata, regular expressions, context-free grammars, pushdown automata, and Turing machines. The notes are divided into 5 units - finite automata and regular languages, regular expressions, context-free grammars and languages, pushdown automata, and Turing machines and undecidability. It includes definitions, concepts, theorems, and examples related to each of these formal language and automata theory topics.

Uploaded by

krishnan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
403 views123 pages

Toc - Notes

The document contains lecture notes on formal languages and automata theory for a computer science course. It covers topics like finite automata, regular expressions, context-free grammars, pushdown automata, and Turing machines. The notes are divided into 5 units - finite automata and regular languages, regular expressions, context-free grammars and languages, pushdown automata, and Turing machines and undecidability. It includes definitions, concepts, theorems, and examples related to each of these formal language and automata theory topics.

Uploaded by

krishnan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 123

LECTURE NOTES

ON

Computer Organization
Formal Languages and Automata Theory

II B.TECH II SEMESTER
(JNTUA-R15)

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

VEMU INSTITUTE OF TECHNOLOGY:: P.KOTHAKOTA


Chittoor-Tirupati National Highway, P.Kothakota, Near Pakala, Chittoor (Dt.), AP - 517112
(Approved by AICTE, New Delhi Affiliated to JNTUA Ananthapuramu. ISO 9001:2015 Certified Institute)
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY ANANTAPUR

B. Tech III - I Sem (IT) T Tu C


3 1 3
(15A05404) FORMAL LANGUAGES AND AUTOMATA THEORY
Course Objectives: Understand formal definitions of machine models
Classify machines by their power to recognize
languages. Understanding of formal grammars, analysis
Understanding of hierarchical organization of problems
depending on their complexity
Understanding of the logical limits to computational
capacity Understanding of undecidable problems.

At the end of the course, students will be able to


Construct finite state diagrams while solving problems of computer
science Find solutions to the problems using Turing machines
Design of new grammar and language
UNIT I
Introduction: Basics of set theory, Relations on sets, Deductive proofs, Reduction to
definitions, Other theorem forms, Proving equivalences about sets, The
Contrapositive, Proof by contradiction, Counter examples, Inductive proofs,
Alphabets, Strings, Languages, Problems, Grammar formalism, Chomsky Hierarchy
Finite Automata: An Informal picture of Finite Automata, Deterministic Finite
Automata (DFA), Non Deterministic Finite Automata (NFA), Applying FA for
Text search, Finite Automata with Epsilon transitions (є-NFA or NFA- є ),
Finite Automata with output, Conversion of one machine to another,
Minimization of Finite Automata, Myhill-Nerode Theorem.
UNIT II
Regular Languages: Regular Expressions (RE), Finite Automata and Regular Expressions,
Applications of Regular Expressions, Algebraic laws for Regular Expressions, The Arden‗s
Theorem, Using Arden‗s theorem to construct RE from FA, Pumping Lemma for RLs,
Applications of Pumping Lemma, Equivalence of Two FAs, Equivalence of Two REs,
Construction of Regular Grammar from RE, Constructing FA from Regular Grammar, Closure
properties of RLs, Decision problems of RLS, Applications of REs and FAs
UNIT III
Context Free Grammars and Languages: Definition of Context Free
Grammars (CFG), Derivations and Parse trees, Ambiguity in CFGs, Removing
ambiguity, Left recursion and Left factoring, Simplification of CFGs, Normal
Forms, Linear grammars, Closure properties for CFLs, Pumping Lemma for
CFLs, Decision problems for CFLs, CFG and Regular Language.
UNIT IV
Push Down Automata (PDA): Informal introduction, The Formal Definition, Graphical
notation, Instantaneous description, The Languages of a PDA, Equivalence of PDAs
and CFGs, Deterministic Push Down Automata, Two Stack PDA.
UNIT V
Turing Machines and Undecidability: Basics of Turing Machine (TM), Transitional
Representation of TMs, Instantaneous description, Non Deterministic TM, Conversion of
Regular Expression to TM, Two stack PDA and TM, Variations of the TM, TM as an integer
function, Universal TM, Linear Bounded Automata, TM Languages, Unrestricted grammar ,

Page 1
Properties of Recursive and Recursively enumerable languages,
Undecidability, Reducibility, Undeciadable problems about TMs, Post
Correspondence Problem(PCP), Modified PCP. Text Books:
1. Introduction to Automata Theory, Formal Languages and Computation,
Shyamalendu kandar, Pearson.
2. Introduction to Automata Theory, Languages, and Computation, Third
Edition, John E.Hopcroft, Rajeev Motwani, Jeffery D. Ullman, Pearson.
Reference Books:
1. Introduction to Languages and the Theory of Computation, John C Martin,
TMH, Third Edition.
2. Theory of Computation, Vivek Kulkarni, OXFORD.
3. Introduction to the Theory of Computation., Michel Sipser, 2nd Edition, Cengage Learning
4. Theory of computer Science Automata, Languages and
Computation, K.L.P. Mishra,Chandrasekaran, PHI, Third Edition.
5. Fundamentals of the Theory of Computation, Principles and Practice,
Raymond Greenlaw, H. James Hoover, Elsevier, Morgan Kaufmann.
6. Finite Automata and Formal Language A Simple Approach, A.M. Padma Reddy, Pearson

Page 2
CONTENTS
1 UNIT-I PG.NO
1.1 Basics of Set Theory 6
1.2 Relations on sets 7
1.3 Deductive proofs 7
1.4 Alphabets, Strings, Languages 8
1.5 Finite automata 10
1.6 DFA 10
1.7 NFA 11
1.8 Equivalence of DFA & NFA 13
1.9 conversion 16
1.10 FA with output 21
1.11 Conversion of machine to other 23
1.12 Minimization of FA 26
1.13 Myhill - Nerode Theorem 28
UNIT-II
2.1 Regular Expression(RE) 29
2.2 FA and RE 30
2.3 Application of RE 31
2.4 Algebraic laws for RE 31
2.5 The Arden’s Theorem 34
2.6 Using Arden’s theorem to construct RE from FA 36
2.7 Pumping Lemma for RLs 37
2.8 Applications of Pumping Lemma 38
2.9 Equivalence of Two REs 39
2.10 Constructing FA from Regular Grammar 40
2.11 Closure properties of RLs 41
2.12 Decision problem’s of RLS 41
2.13 Applications of REs and FAs 41
UNIT-III
3.1 Ambiguity in CFGs 43
3.2 Left recursion and Left factoring 52
3.3 Simplification of CFGs 55
3.4 Normal Forms 58
3.5 Linear grammars 59
3.6 Closure properties for AFLs 61
3.7 Pumping Lemma for CFLs 62
3.8 Decision problems for CFLs 62
UNIT-IV
4.1 Push Down Automata (PDA): 64
4.2 Informal introduction 64
4.3 Graphical notation 65
4.4 Instantaneous description 66
4.5 The Languages of a PDA 67
4.6 Equivalence of PDAs and CFGs 68
4.7 Deterministic Push Down Automata 72
4.8 Two Stack PDA 73

Page 3
UNIT-V
5.1 Turing Machines and Undecidability: 77
5.2 Basics of Turing Machine (TM) 77
5.3 Transitional Representation of TMs 78
5.4 Instantaneous description 79
5.5 Non Deterministic TM 80
5.6 Conversion of Regular Expression to TM 84
5.7 Two stack PDA and TM 85
5.8 Variations of the TM 87
5.9 TM as an integer function 89
5.10 Universal TM 91
5.11 Linear Bounded Automata 94
5.12 TM Languages 96
5.13 Unrestricted grammar 99
5.14 Properties of Recursive and Recursively enumerable 102
languages
5.15 Undecidability, Reducibility 116
5.16 Undeciadable problems about TMs 117
5.17 Post Correspondence Problem(PCP) 119
5.18 Modified PCP 120

Page 4
UNIT-1

Page 5
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 6
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 7
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 8
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 9
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 10
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 11
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 12
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 13
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 14
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 15
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 16
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 17
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 18
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 19
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 20
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 21
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 22
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 23
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 24
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 25
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 26
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 27
Unit-II

FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 28


FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 29
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 30
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 31
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 32
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 33
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 34
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 35
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 36
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 37
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 38
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 39
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 40
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 41
UNIT-3

FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 42


FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 43
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 44
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 45
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 46
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 47
UNIT-3

FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 48


FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 49
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 50
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 51
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 52
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 53
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 54
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 55
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 56
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 57
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 58
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 59
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 60
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 61
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 62
UNIT-4

FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 63


FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 64
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 65
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 66
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 67
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 68
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 69
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 70
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 71
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 72
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 73
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 74
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 75
UNIT-5

FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 76


FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 77
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 78
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 79
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 80
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 81
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 82
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 83
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 84
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 85
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 86
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 87
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 88
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 89
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 90
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 91
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 92
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 93
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 94
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 95
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 96
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 97
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 98
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 99
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 100
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 101
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 102
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 103
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 104
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 105
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 106
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 107
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 108
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 109
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 110
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 111
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 112
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 113
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 114
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 115
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 116
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 117
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 118
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 119
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 120
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 121
FORMAL LANGUAGES AND AUTOMATA THEORY PAGE 122

You might also like