Automata Theory: question bank, Modules 1 to 6
XLSX readable page or the Excel file · 57 KB
130 questions, converted from the Excel file so it reads on a phone. Colours and notes are the ones Harsh kept in the sheet.
Colour key, Harsh's usual pattern
- Blue: Asked in a previous-year paper (PYQ)
- Green: The repeated copy of a red question
Module 1- 22 Questions
2 marks
- 1
What are the components of an Finite State Machine?
- 2
How FSM is different than Deterministic Finite Automata(DFA)?
- 3
Haw many states are required to design a DFA to accept even number of 0’s.
- 4
Write any of the 3 strings which will be accepted by the given DFA
- 5
Illustrate if L be a set accepted by an NFA then there exists a DFA that accepts L.
- 6
Construct NFA for (11+0)*(00+1)*
- 7
Give the DFA accepting the language over the alphabet 0,1 that have the set of all strings that either begins or end(or both) with 01.
5 marks
- 8
Compare and Contrast between Non Deterministic Finite Automata(NFA) and Deterministic Finite Automata(DFA)
- 9
Explain the differences between Moore and Mealy machines. Include examples to illustrate the differences
- 10
Convert Moore to Mealy Machine
- 11
Design a FSM to check the whether binary number is divisible by 3 or not.
- 12
Construct a DFA to check the language that does not contain ‘aba' as a substring over ∑={a,b}.
- 13
Design FSM that accepts all strings over {0, 1} ends with "101".
- 14
Design a Moore Machine For input from (0+1)*. if the input ends in 101, output A; if the Input ends in 110. output B otherwise output C.
- 15
Construct a DFA accepting strings, having substrings either ‘aba' or ‘bab’ over ∑={a,b}.
10 marks
- 16
Construct NFA with € moves and convert into minimized DFA for the following regular expression
a) (0 + 1)*011(0 + 1)*
b) 10 + (0 + 11)0*1 - 17
Design minimized DFA for the following regular expression (0(0+1)*1)+(1(0+1)*0
- 18
Convert NFA ({P,Q,R,S},ɗ, P,{S}) to its equivalent Minimized DFA where ɗ is given by following figure.

- 19
Construct a Mealy Machine that accepts strings ending in either "010" or "101". Convert the same into Moore Machine.
- 20
Design DFA that accepets the following language
i) L = Set of all strings with odd number of 0's followed by even number of 1's ,E={0,1}
ii) L = Set of all strings which begin and end with different letters.E={x,y,z} - 21
Given regular expression,NFA and minimized DFA for the language over(0,1) having all strings such that third symbol from right end is zero
- 22
i) Construct a Moore Machine to convert each occurence of substring 100 by 101
ii)Design Mealy Machine to find 2's complement of a binary number.
Module 2- 22 Questions
2 marks
- 23
State and Explain Properties of Regular Language
- 24
Define a regular expression and explain its significance in language theory.
- 25
Write any three applications of regular expressions in any programming language
- 26
Prove that the language accepted by a DFA is a regular language
- 27
Demonstrate how Arden’s Theorem can be applied to derive a regular expression from a finite automaton, including an example.
- 28
Identify and explain the decision properties of Regular Lanuages with example.
- 29
Write down steps to convert regular expression into DFA
5 marks
- 30
Consider the regular grammar G=({S,A,B},{a,b},P,S) where P consists of the following production rules: S→aA, A→bB, and B→ϵ. Describe the language generated by this grammar and provide examples of strings in the language.
- 31
Construct DFA for the following regular expression (0+1)*(011+110)
- 32
Design a DFA for the following regular expression (ab+ba)(a+b)*
- 33
Design a a €-NFA for the following regular expression (0+1)*0(0+1)(0+1)
- 34
Construct a non-deterministic finite automaton (NFA-€) for regular expression (RegEx) (b + ab)* + (b +ab)*a
- 35
Write a regular expression (RegEx) for given language
a) Binary strings containing the sequence 011.
b) Binary strings has an even number of 0’s and an even number of 1’s
c) Strings over {a, b} with at most three a s.
d) Strings over {a, b, c} in which the fourth symbol from the beginning is a 'c'.
e) Binary strings does not contain substring 0110 - 36
Describe Arden's Theorem and discuss its importance in the theory of formal languages and Find the regular expression
for above state transition diagram using Arden's theorem.
10 marks
- 37
Design minimized DFA for the following regular expressions
a) (01+10)(0+1)*01 b)(0+1)(00 + 11)(0+1) - 38
Explain Chomsky Hierarchy classification of grammars with example
- 39
State equivalence of FAs and Check whether above FA's are equvalent or not
- 40
Convert the following right linear grammar to its equivalent left linear grammar
i) S->bB
B->bC/aB
C->a
B->b
ii) S->0A/1B
A->0C/1A/0
B->1B/1A/1
C->0/0A - 41
Design DFA from the the following left linear grammar S->Ca/Bb
B->Ba/b
C->Bb - 42
Write right and left inear grammar for the language
- 43
Convert the following left linear grammar to its equivalent right linear grammar
i)S→B1/A0/C0
A→C0/A1/B1/0
B→B1/1
C→A0
ii) S→S10|S11|B|e
B→B0|0 - 44
Write a regular expression (RegEx) for given language
a) Binary strings containing the sequence 011.
b) Binary strings contains substrings 010 and 101
c) Binary strings containing at least one 00 and at least one 11
d) The set of strings where third last symbol is 1
e) The set of strings containing ab as a substring.
f) Binary numbers that begin and end with the same digit.
g) The set of all strings that ends with bba
h) Language of Strings with at Least Three Consecutive 0's
i) Language of Binary Strings with Length Multiple of 3
j) Language of Strings over {a, b} with an even number of a’s
Module 3- 19 Questions
2 marks
- 45
Discuss the closure property of regular languages under intersection and provide an example.
- 46
"What is the Pumping Lemma for regular languages, and why is it important in the study of formal languages?"
- 47
Explain the concept of closure under Kleene star operation for regular languages. Provide an example to illustrate.
- 48
How do the properties of regular languages differ from those of context-free languages, and in what ways are they similar?
- 49
Define the concept of an inverse homomorphism and discuss its implications for regular languages.
- 50
Provide an example of a regular expression representing a language over the alphabet {0, 1} that ends with '01'.
- 51
Explain the Pumping Lemma for regular languages and its significance in the theory of computation.
5 marks
- 52
Apply the Pumping Lemma to prove that the language L={ww^R∣w∈{0,1}∗} is not regular.
- 53
State the Pumping Lemma and prove that the language L={a^nb^nc^n ∣ n≥0} is not regular.
- 54
Explain the closure properties of regular languages and provide examples to illustrate them.
- 55
Apply the Pumping Lemma to prove that the language L ={0^n 1^n | n >0}is not regular
- 56
Explain how the Pumping Lemma can be used to show that the language L={ww∣w∈{0,1}∗} is not regular.
- 57
Formulate a problem using the Pumping Lemma to determine whether the language L={a^mb^n∣m not=n} is regular.
10 marks
- 58
Explain MyHill Nerode Theorem and minimize following DFA using it.
- 59
Apply the Pumping Lemma to prove following languages are regular or not
i)L ={a^kb^k | k>=0}
ii) L ={a^nb^n+1 | n>0} - 60
Apply the Pumping Lemma to prove following languages are regular or not
i)L ={a^n b^n | n is sqaure}
ii) L =w €{a, b}* | w has an equal number of a’s and b’s - 61
Apply the Pumping Lemma to prove following language is regular or not L ={a^2kb^n | w € {a, b}*, |w| = k}
- 62
Apply the Pumping Lemma to prove following languages are regular or not
i)L ={a^n b^i a^k | k=n+i}
ii) L ={a^kb^n | w € {a, b}*, |w| = k} - 63
Apply the Pumping Lemma to prove following languages are regular or not
i)L ={a^n b^i | n<=i}
ii) L ={a^n b^i| n!=i }
Module 4- 20 Questions
2 marks
- 64
What is a Context-Free Grammar (CFG), and how does it differ from a regular grammar?
- 65
Which of the following languages is generated by the given grammar? S -->aS | bS | €
- 66
Find context free grammar generating all string containing a's and b's with atleast one a.
- 67
Illustrate following properties of Context Free languages.
i. Intersection
ii. Concatenation - 68
Define the term nullable variable in a CFG and give example.
- 69
What is a derivation tree, and how does it work? Illustrate with an example by drawing one. Find CFG for strings over inputs {a,b} with atleast one occurance of "aa".
- 70
Find a leftmost derivation and a rightmost derivation with corresponding parse trees for string “001101” using the following CFG,
S --> 0B | 1A
A -->0 | 0S | 1AA
B -->1 | 1S | 0BB
5 marks
- 71
Demonstrate that the following grammar is ambiguous and resolve the ambiguity:S → S * S | S + S | a
- 72
Simplify the following context free grammar
S--> aAbB | ba
A --> aA | €
B --> bB | € - 73
Find a leftmost derivation and a rightmost derivation with corresponding parse trees for strings “001222” using the following CFG,
S -->aS | bA | cB | €
A --> bA | cB | €
B --> cB | € - 74
Find Context Free Grammar for the following languages
i) The string starts and ends with different letters over∑={a,b}
ii) L={a^ n b^ n+1 |n>=0} - 75
Covert the following Context Free Grammar into Greibach Normal Form(GNF)
S --> AB
A --> BS | b
B --> SA | a - 76
Write left linear grammar and right linear grammar for the language R= (0+1)*00(0+1)*
10 marks
- 77
i) Find a leftmost derivation and a rightmost derivation with corresponding parse trees for strings “00101” using the following CFG,
S → A1B
A → 0A / ∈
B → 0B / 1B / ∈
ii) Find a leftmost derivation and a rightmost derivation with corresponding parse trees for strings “aaabbabbba” using the following CFG,
S → aB / bA
S → aS / bAA / a
B → bS / aBB / b - 78
i)i) Find both a leftmost and a rightmost derivation with their corresponding parse trees for the string "aaabbcc" using the following CFG:
S → A B C
A → aA | ∈
B → bB | ∈
C → cC | ∈
ii) Find both a leftmost and a rightmost derivation with their corresponding parse trees for the string "aabcc" using the following CFG:
S → aSb | AB
A → aA | ∈
B → bB | ∈
C → cC | ∈ - 79
Write Context free Grammar for the following languages over input ={a,b}
i) r=(a+b)*ba
ii) A string that contains 3 consecutive b's.
iii) L={a^n b^2n |n>=1}
iv) L={a^n b^m c^m d^n |n,m>=1}
v) L={a^nb^n+1|n>=1} - 80
Covert the following Context Free Grammar into Greibach Normal Form(GNF)
(i) S --> ABC
A --> a | b
B --> Bb | aa
C --> aC| cC|ba
(ii)S --> AB
A --> BSB | BB | b
B --> aAb | a - 81
Convert the following CFG into Chomsky Normal Form (CNF)
i)S → aAB | b
A → aA | b
B → cB | A | ∈
ii)S → AB | CD
A → aA | b
B → cB | d
C → eC | f
D → gD | h - 82
Convert the following Context Free Grammar into Chomsky Normal Form(CNF)
i) S --> aAbB /ba
A --> aA
B --> bB
ii) S--> 11S | 00
S --> 00S | 11
S--> ∈ - 83
Show that the following grammars are ambiguous or not ? if ambiguous then remove it and rewrite the grammar.
i) S -> aSb| AB
A-> cA|∈
B-> dB|∈
ii) S -> AB
A-> aA|Aa|∈
B-> bB|∈
Module 5- 21 Questions
2 marks
- 84
Define a pushdown automaton (PDA) and explain its components.
- 85
What is a Pushdown Automaton (PDA) and how does it differ from a Finite Automaton (FA)?
- 86
Compare and contrast between deterministic and non-deterministic PDAs.
- 87
Explain the role of the stack in a pushdown automaton (PDA) and how it differs from the tape in a Turing machine.
- 88
Describe the transition function of a pushdown automaton (PDA) and its significance in language recognition.
- 89
Using an example, explain how a PDA can be converted to an equivalent context-free grammar (CFG).
- 90
Compare and contrast between deterministic and non-deterministic PDAs
5 marks
- 91
Construct a PDA equivalent to the language L={w∈{a,b}∗∣w the number of a′ s is twice the number of b′s}.
- 92
Design PDA to recognize L= { a^n b ^2n |n>=1}
- 93
Design the PDA equivalent to the following
S -> AB
A->aA |∈
B->b - 94
Construct a PDA to recognize L = {(ab)^n c^n | n>=1}
- 95
Design the PDA that accepts lanuage generated by the grammar with production S --> aSbb |a
- 96
Construct a PDA equivalent to the Context Free Grammar
S --> AB
A --> aA | b
B --> bB | b - 97
Design a PDA for wellformedness of parenthesis
10 marks
- 98
Construct a PDA equivalent to the Context Free Grammar
i) S --> aA|bB
A -->aS|bAA|∈
B --> bS |aBB| ∈
ii) S--> ASB|∈
A-->aA|a
B-->bB|b - 99
Design PDA to recognize Language, L={WcW ^R }|W€{a,b}* c is any terminal}
- 100
Design PDA to recognize L= { a^n (bdb)^2n |n>=1}
- 101
Create a PDA for the language L={w∈{a,b}∗ ∣w is a palindrome}.
- 102
Design a Pushdown Automaton (PDA) for the language
L={w∈{a,b}∗ ∣w contains an even number of a's and an odd number of b's} - 103
Design a Pushdown Automaton (PDA) for the language L={w∈{0,1}∗ ∣the number of 0’s is twice the number of 1’s}
- 104
Design a Pushdown automata, NPDA for accepting the language L = {a^mb^nc^(m+n) | m,n ≥ 1}
Module 6 - 20 Questions
2 marks
- 105
Explain the basic components and functionality of a Turing Machine.
- 106
What is meant by the "halting problem" in the context of Turing Machines?
- 107
How does a Turing Machine differ from a finite automaton?
- 108
What is the role of the transition function in a Turing machine?
- 109
List down variants of Turing Machine
- 110
What does it mean for a language to be recursively enumerable?
- 111
Explain what a universal Turing Machine is
5 marks
- 112
Illustrate difference between a deterministic and a nondeterministic Turing machine.
- 113
Design a turing machine to to increment a binary number by 1. If the input is '1011', show the sequence of tape configurations after each step of the computation. How many steps does the machine take to complete this operation?
- 114
Design the turing machine to that replaces all occurrences of 111 by 101 over ∑={0,1}*
- 115
Compare and contrast recursive and recursively enumerable languages.
- 116
Design turing machine to replace each occurances of "aba" by "aab" over {a,b}*
- 117
Construct a turing machine to recognize L = {a^n b^n c^n | n>=1}
- 118
Construct a turing machine to recognize L = {0^2n 1^n | n>=1}
10 marks
- 119
Construct Turing Machine for the following
a) To increment a binary number by one
b) To accept the language L={a ^n b^2n }| n>=1 } - 120
Design a turing machine that recognizes palindromes in the language L={w∈{a,b}∗|w=wR}.For the input 'abba', determine the total number of moves made by the tape head to accept the string
- 121
Develop a turing machine that performs addtion of two numbers .consider number is given in unary format
- 122
Develop a turing machine to convert a binary input to its hexadecimal representation
- 123
Construct Turing Machine for the following
a) To accept language that ends with either aba or bab over w∈{a,b}∗
b) To accept the language that starts with ab and ends with ba over w∈{a,b}∗ - 124
Construct Turing Machine for the following languages represented by regular expression
a) r = 0*1*0*
b) r = (ba+ab)(a+b)*
Out of Syllabus
2 marks
Define Formal Definition of NFA with tuple and give its example
List the Applications of Finite Automate(FA)
MCQ Question
Define right linear grammar with an example
Define useless variable and give example
Mention one real-world application of Turing Machine concept