13-08-24 CoursePack - Theory - of - Computation R1UC501T
13-08-24 CoursePack - Theory - of - Computation R1UC501T
1. THE SCHEME
Course Title Theory of Computation Course Type Theory
Tutorial 0 0
Self-study
Instruction
Practical
Tutorial
Practical 0 0
Theory
delivery
SEE
CIE
Self-study 0 6
2. COURSE OVERVIEW
This course on the Theory of Automata and Formal Languages introduces students to the foundational concepts and
techniques used to model and analyze computational systems. Students will explore different types of formal
1
languages and automata, including finite automata, pushdown automata, and Turing machines, as well as the
grammars that generate these languages. Key topics include the classification of languages into regular, context-
free, and recursively enumerable categories, the theory of computation, and the limits of what can be computed.
Through this subject, students will develop a deeper understanding of how formal languages are used to describe
and manipulate computational processes, which is essential for fields such as compiler construction, software
development, and algorithm design.
3. COURSE OBJECTIVES
The objective of this course is to provide students with a comprehensive understanding of the theory of automata and
formal languages. Students will learn to analyze and design various computational models, such as finite automata,
regular expressions, context-free grammars, and Turing machines. The course will cover key concepts including
regular languages, context-free languages, decidability, and advanced topics. By the end of the course, students will
be equipped to apply these theoretical foundations to solve problems in computer science and to classify machines
by their power to recognize languages and comprehend the hierarchy of problems.
4. PREREQUISITE COURSE
PO1 Engineering Knowledge: Apply the knowledge of mathematics, science, engineering fundamentals, and an
engineering specialization to the solution of complex Computer Science and engineering problems.
PO2 Problem Analysis: Identify, formulate, review research literature, and analyze complex Computer Science and
engineering problems reaching substantiated conclusions using first principles of mathematics, natural sciences,
and engineering sciences.
PO3 Design/Development of Solutions: Design solutions for complex Computer Science and engineering problems
and design system components or processes that meet the specified needs with appropriate consideration for
the public health and safety, and the cultural, societal, and environmental considerations.
PO4 Conduct Investigations of Complex Problems: Use research-based knowledge and research methods including
design of experiments, analysis and interpretation of data, and synthesis of the information to provide valid
conclusions.
PO5 Modern Tool Usage: Create, select, and apply appropriate techniques, resources, and modern engineering and
IT tools including prediction and modelling to complex computer science and engineering activities with an
understanding of the limitations.
The Engineer and Society: Apply reasoning informed by the contextual knowledge to assess societal, health,
PO6
safety, legal and cultural issues and the consequent responsibilities relevant to the professional engineering
practice.
2
Environment and Sustainability: Understand the impact of the professional engineering solutions in societal
PO7
and environmental contexts, and demonstrate the knowledge of, and need for sustainable development.
Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms of the
PO8
engineering practice.
Individual and Team Work: Function effectively as an individual, and as a member or leader in diverse teams,
PO9
and in multidisciplinary settings.
Communication: Communicate effectively on complex Computer Science and engineering activities with the
PO10
engineering community and with society at large, such as, being able to comprehend and write effective
reports and design documentation, make effective presentations, and give and receive clear instructions.
Project Management and Finance: Demonstrate knowledge and understanding of the engineering and
PO11
management principles and apply these to one’s own work, as a member and leader in a team, to manage
projects and in multidisciplinary environments.
Life-Long Learning: Recognize the need for, and have the preparation and ability to engage in independent
PO12
and life-long learning in the broadest context of technological changes in the field of Computer Science.
THEORY:
FINITE AUTOMATA (FA): Introduction, Proof Techniques, Deterministic Finite Automata (DFA) -
Formal definition, simpler notations (state transition diagram, transition table), language of a DFA.
Nondeterministic Finite Automata (NFA)- Definition of NFA, language of an NFA, Equivalence of
Deterministic and Nondeterministic Finite Automata, Applications of Finite Automata, Finite Automata with
Epsilon Transitions, Eliminating Epsilon transitions, Minimization of Deterministic Finite Automata, Finite
automata with output (Moore and Mealy machines)
REGULAR EXPRESSIONS (RE): Introduction, Identities of Regular Expressions, Finite Automata and
Regular Expressions- Converting from DFA’s to Regular Expressions, Converting Regular Expressions to
Automata, applications of Regular Expressions.
REGULAR GRAMMARS: Definition, regular grammars and FA, FA for regular grammar, Regular grammar
for FA. Proving languages to be non-regular -Pumping lemma, applications, and Closure properties of regular
languages.
3
CONTEXT FREE GRAMMER (CFG): Derivation Trees, Sentential Forms, Rightmost and Leftmost
derivations of Strings. Ambiguity in CFG’s, Minimization of CFG’s, CNF, GNF, Pumping Lemma for CFL’s,
Enumeration of Properties of CFL ( Proof’s omitted ).
PUSHDOWN AUTOMATA: Definition, Model, Acceptance of CFL, Acceptance by Final State and
Acceptance by Empty stack and its Equivalence, Equivalence of CFG and PDA.
TURING MACHINES (TM): Formal definition and behaviour, Languages of a TM, TM as accepters, and
TM as a computer of integer functions, Types of TMs.
R1UC501T.2 Construct regular expressions for different languages and create Deterministic Finite Automata (DFA) and
Non-Deterministic Finite Automata Machine (NFA).
R1UC501T.3 Model Push Down Automata (PDA) for Context Free Languages (CFLs).
R1UC501T.4 Design Turing Machine for various recursive enumerable languages. Understanding the basics of
Undecidability and Halting problem.
R1UC501C.1 √
R1UC501C.2 √ √
R1UC501C.3 √ √
R1UC501C.4 √ √
4
10. COURSE ARTICULATION MATRIX
PO10
PO11
PO12
PSO1
PSO2
PO1
PO2
PO3
PO4
PO5
PO6
PO7
PO8
PO9
COs#/ POs
R1UC501C.1 2 1 1
R1UC501C.2 2 2 1
R1UC501C.3 2 2 2
R1UC501C.4 2 2 2 1 1
Note: 1-Low, 2-Medium, 3-High \ *first semester first course and first Course Outcome
5
LESSON PLAN FOR THEORY COURSES (THEORY AND TUTORIAL CLASSES) FOR THEORY
15 weeks * 3 Hours = 45 Classes (1credit = 1 Lecture Hour)
6
29. Elimination of epsilon moves, Removal of
useless production, removal of unit production
and removal of left recursion from grammar
30. Numerical on Elimination of epsilon moves,
Removal of useless production and removal of
unit production
31. Conversion of the grammar into Chomsky Theory CO3
Normal Form (CNF) Conversion to normal
32. Conversion of the grammar into Greibach form
Normal Form (GNF)
33. Introduction to Pushdown automata (PDA) and
its type (Deterministic PDA (DPDA) and Non-
deterministic PDA(NPDA))
34. Numerical on NPDA and DPDA
35. Numerical on NPDA and DPDA and Theory
introduction to 2-PDA Definition and
36. PDA to CFG designing PDA
37. CFG to PDA
38. Properties of Context Free Languages (CFL)
39. Pumping lemma for CFL Theory Deciding which
languages are CFL or
not
40. Chomsky hierarchy of languages (Focusing on Discussion on
Regular Languages, Context Sensitive Theory different classes of
Languages) languages
41. Turing Machine and its variants (Like Linear
Bounded Automata and Universal Turing To formally describe
Machine) computation by a
42. Numerical on Turing Machine Turing Machine;
43. Halting problem and introduction to Theory To recognize
Undecidability undecidable CO4
44. Recursive (REC) Languagesand Recursive languages;
Enumerable (RE) Languages Analysis of
45. Post Correspondence Problem (PCP) complexity of
languages
12. BIBLIOGRAPHY
Text Book
Introduction to Automata Theory, Languages and Computation 3rd Edition by John E Hopcroft, Rajeev Motwani
and Jeffrey D. Ullman [Availaible Online]
Reference Books
Introduction to the Theory of Computation Second Edition by Michael Sipser [Availaible Online]
Introduction to Formal Languages, Automata Theory and Computation by Kamala Krithivasan and Rama R
7
https://www.math.ias.edu/avi/book
https://cs-people.bu.edu/mbun/courses/332_F21/
SWAYAM/NPTEL/MOOCs Certification
(One from Each Platform, Max 3 Platforms) https://onlinecourses.nptel.ac.in/noc21_cs83/preview
8
1. Theory Course (T) A student shall secure a minimum of 30% of the maximum marks in the
semester-end examination (SEE/ETE) and 40% of aggregate marks in the
course including Continuous internal examination (CIE) and SEE/ETE marks.
i.e., the minimum Passing Grade is “P”.
Note: Students unable to meet the overall passing criteria as mentioned shall be eligible for the
following options to clear the course:
▪ Appear in the Back Paper Examinations and have to meet the criteria to score 40% in marks overall
▪ Appear in summer examinations (Internal +External) to meet the criteria as mentioned.
S.No. Problem
Prove that the sum of first n natural numbers is equal to n*(n+1)/2
1
L1={aa, ab, aab, aba} L2={bb, aa, ba, ab, bab} find L1 - L2, L2 – L1.
2
9
S –> aSS / aSaS/ aSab | b find left factoring for the given grammar.
18
Apply Pumping Lemma for CFL to show a certain language is not CFL
19
What is ambiguous grammar? Explain through examples
20
Check whether string W є L(G) or not using membership algorithm.
W = baab
21 S –> AB
A –> BB | a
B –> AB | b
Convert Context Free Grammar to GNF (Greibach normal form) .
S –> CB / AB
22 A –> a / AA
B –> b
C –> d
Write Context Free Grammar for the following languages :
23 L={anbn | n>=1} and L={ambn | m=2n, n>=0}
What are recursive enumerable and recursive language?
24
Prove equivalence between PDA with two stacks and TMs
25
Explain Church Turing Thesis.
26
What are decidable and undecidable languages? Give Examples
27
Design a PDA, a to accept L = { a2nbn | n ≥ 1 }
28
Write Context Free Grammar for the language L={ambn | m=2n, n>=0}.
29
Construct the DPDA Machine for language L={ambncm | m, n>=0}.
30
Prove that the following language is ambiguous and convert into
31
unambiguous S → S + S | S * S | a | b Where W = a + a * b.
32
Design a Turing Machine to convert the Binary value to 2’s Complement.
33
Recursive Enumerable Languages are Decidable in case of Emptiness, Finiteness and
34
Equivalence. TRUE / FALSE. Justify your answer.
35
Construct the Turing Machine to implement adder for unary value.
36
What is PCP problem? Is it decidable or undecidable?
37
Prove that PCP is undecidable?
38
Differentiate between Decidable and Undecidable problem.
39
10
Identify the language L= {ax : where x is a prime number}.
40
Design the Turing machine for Addition, proper subtraction and multiplication of two
41 numbers
42 Design the NPDA and DPDA for L={anbn|n>0}
11