0% found this document useful (0 votes)
817 views32 pages

CS402 Midterm Solved MCQS by Junaid Malik

This document contains a series of multiple-choice questions (MCQs) related to the Theory of Automata, covering topics such as regular expressions, finite automata, and language properties. Each question presents a scenario or concept, followed by several answer options. It serves as a study guide for students preparing for midterm examinations in a computer science course.

Uploaded by

aleebaanwar88
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)
817 views32 pages

CS402 Midterm Solved MCQS by Junaid Malik

This document contains a series of multiple-choice questions (MCQs) related to the Theory of Automata, covering topics such as regular expressions, finite automata, and language properties. Each question presents a scenario or concept, followed by several answer options. It serves as a study guide for students preparing for midterm examinations in a computer science course.

Uploaded by

aleebaanwar88
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

CS402- THEORY OF

AUTOMATA
(SOLVED MCQs)
FROM MIDTERM PAPERS
LECTURE (1-22)
ajtechinstitute24@gmail. For More Visit: vujunaid.com JUNAID MALIK (0304-
com 1659294)
ÂL-JÛÑÂÎD TÊCH
JOIN OUR GROUP FOR MORE UPDATE
Click Button
CS619 & CS519 ÂL-JÛÑÂÎD TÊCH

1. If an alphabet has "2" number of letters, then total number of strings of length "3" will be
________.
5
9
8
6
2. GTG for the expression (a+b)*bb may have minimum number of states:
3
4
2
1
3. Consider the Regular Expression (RE) a (a + b)b*. Which one of the following is NOT
accepted by the provided RE?
aa
aab
aba
abb
4. Which of the following is NOT true about the term alphabet?
It is usually denoted by Greek letter sigma
It can be an empty set
Strings are generated by concatenating its elements
It is a finite set of symbols
5. Which of the following is free of non-determinism?
FA
TG
NFA
NFA-^
6. The language of all strings defined over alphabet set = {a, b} containing ‘bbb’ will have the
minimum string with length of:
1
2
3
4
7. The aa(a+b)*bb is the RE of the language defined over Σ={a,b}.The language must
____________.
have at least two ab
have at least one aa and one bb
ÂL-JÛÑÂÎD TÊCH
have at least one abbb
have at least one ba
8. Reverse of string "YxwzYz" defined over Σ ={w,x,Y,z} is __________.
zYzwxY
zYzxwY
zYwzxY
zYzwYx
9. If "r1" and "r2" are regular expressions, then which of the following is not a regular
expression?
r1 + r2
r1*
r1 r2
r1 – r2
10. Which of the following string belongs to the language of the regular expression (aa*b)*?
baabab
aabaab
aaaaaa
abbbaa
11. FA of EVEN-EVEN language shows that it accepts the null string by declaring the
_________ as a __________as well.
Initial state, final state
Initial sate, null state
Final state, initial state
Final state, null state
12. Auto Meta mean
Automatic work
Manual work
Both
None of these
13. NFA to FA will
Equal Page 43
Not equal
Not valid
None of given
14. The length of output string in case of is one more than the length of corresponding input
string.
Finite Automaton
TG
GTG
NFA
15. The machine helps in building a machine that can perform the addition of binary numbers.
Incrementing Page 60
Complementing
Decrementing
ÂL-JÛÑÂÎD TÊCH
None of the given
16. In proving Kleene Theorem II, if a state has two incoming transition edges labelled by RE
from the same state, then replace all the edges with a single transition edge labelled by -
------ of corresponding RE.
Sum
Edge
FA
RE
17. Kleene Theorem III states that if the language can be expressed by RE then there exist ---
----- accepting the language.
FA
DFA
NFA
None
18. If L1 and L2′ are regular languages, L1 ∩ (L2′ U L1′)’ will be
Regular Page 10
Ir-regular
Can’t be decided
Another Language which is not listed here
19. A regular language can be:
irregular
infinite
non-deterministic
None of the given options
20. There ______ a language for which only FA can be built but not the RE.
is cannot be
is
may be
may not be
21. For every three regular expressions R, S, and T, the languages denoted by R(S U T) and
(RS) U (RT) are the ______ .
Same
Different
R (S U T) is Greater
None of the given options
22. In _______ there must be transition for all the lettersof a string.
NFA
GTG
TG
FA
23. We cannot construct an NFA for the language of ______ defined over alphabet set {a,b}.
Even
odd
Palindromes
ÂL-JÛÑÂÎD TÊCH
Integers
24. Decomposing a string into its valid units is referred as:
Decomposing
Splitting
Tokenizing
Dividing
25. Choose the correct word produced by RE (a + b)* (aa+bb).
Abab
Babab
aaaa
Ab
26. Considering FA1 and FA2 having 2 states each. Now FA1+FA2 can have maximum
______________ number of states.
2
3
more than 3
more than 2
27. There is no compulsion that each state must have an on outgoing edge for every input
variable in:
Transition Graph
Transition Table
Both Finite Automata and Transition Graph
Finite Automata
28. In TG, there can be more than one _____________.
start state only
null state only
start state and final state
final state only
29. Substrings as input letters can be specified on edges in:
NFA
PDA
FA
TG
30. If we have the regular expression (a + b)*, then we can draw FA for the provided RE with
minimum _________ number of state(s).
2
0
1
3
31. Σ={a,Aa,Abb}, then string aAaAbbAa has length.
One
Two
Three
Four Page 4
ÂL-JÛÑÂÎD TÊCH
32. Languages generated by Kleene star are always .
Finite
Infinite Page 7
Sometimes finite & sometimes infinite
None of these
33. Let S = {aa, bb}, then S* will have the _______ string.
Λ Page 7
abba
aabbbaa
bbaab
34. If r1 = (aa + bb) and r2 = (a + b) then the language (aa + bb)* will be generated by
(r1) (r2)
(r1 + r2)
(r2) *
(r1) *
35. If a language can be expressed through FA, then it can also be expressed through TG.
True Page 25
False
36. If an alphabet has n number of letter, then number of strings of length m will be
n+m
(n)(m)
m^n
n^m
37. In GTG, if a state has more than one incoming transitions from a state. Then all those
incoming transitions can be reduced to one transition using sign
-
+
*
() Page 27
38. Above given FA accepts strings defined over Σ={a , b}
All Page 15
Some
All but not null
None of these
39. One FA has 3 states and 2 letters in the alphabet. Then FA will have number of transitions
in the diagram.
4
5
7
6 Page 14
40. Every FA should be____________.
Deterministic Page 25
Non- Deterministic
Deterministic & Non- Deterministic
ÂL-JÛÑÂÎD TÊCH
None of these
41. If R is a regular language and L is some language, and L U R is a _______, then L must be
a ________.
Regular language
Finite Auto
Infinite Auto
Irregular language
42. The minimum length of the strings(except null string) of a language that starts and ends
in different letters will be:
1
2
3
4
43. We have languages L7 and L6. Which of the following represents their concatenation?
L7+L6
L7/L6
L6L7
L7L6
44. Let FA1 has x number of states and FA2 has y number of states. Now FA1+FA2 can have
maximum _______________ number of states.
x+y
x-y
x/y
None
45. The language {a, ab, aba, bab} is __________ .
Irregular
Regular
Recursive
infinite
46. If we have a finite language and the number of states in the FA is n then the maximum
number of letters in the each word of the language that will be accepted by the given FA
will be:
N
n-1
n+1
1
47. Moore machine can have -------- final states.
2
4
6
8
48. There _______ be dead states in NF
may not
must
ÂL-JÛÑÂÎD TÊCH
should not
will
49. Let L be the language of all strings, defined over ∑ = {0,1}, ending in 10. Which of the
following strings are distinguishable with respect to L with z being 0?
010, 101
111, 101
001, 101
111, 111
50. There ________ be a unique path for each valid string (called a word) in NF
May not
Must
Should not
Will
51. If we have only one state, having no transition for input letters, then it is an example of:
RE
FA
TG
NFA
52. Strings x,y,z belongs to Σ * such that xz ∈ L but yz ∉ L where L ⊆ Σ* are:
Undetermined
Distinguishable
Indistinguishable
Both distinguishable and indistinguishable
53. A _______ with "n" states must accept at least one string of length greater than "n".
DFA
RE
Irregular language
Irrelevant language
54. In Moore machine, output is produced over the change of:
Transitions
Transitions and states
None of the mentioned
States
55. Keeping in view the discussion by Martin, how many states are required to recognize the
language of all strings of length 3 or more defined over ∑= {a,b}, with ‘a’ being the third
letter from right?
10
12
14
16
56. Every _____________ is a _____________ as well, but the converse may not be true.
TG, FA
GTG
PDA
ÂL-JÛÑÂÎD TÊCH
FA, TG
57. In the context of make NFA for the concatenation of FA1 and FA2 (FA1 accepting null
string), which of the following option is correct?
Final states in both FAs
Initial states in both FAs
FA2 having initial state only
FA2 having final state only
58. In order to make NFA for the union of FA1 and FA2, the new initial state should be linked
to:
Initial states of both FAs
Initial and final states of FA1 and FA2 respectively
Initial state of FA1 only
Final and initial states of FA1 and FA2 respectively
59. Keeping in view the discussion by Martin, how many states are required to recognize the
language of all strings of length 2 or more defined over ∑= {a,b}, with ‘b’ being the second
letter from right?
9
6
7
8
60. If we have an NFA having 3 states, and we convert that NFA to an F The resultant FA will
contains _______ states.
1
2
3
4
61. If S = {aa, bb} then S* will not contain ___________.
abbbab
bbba
bbbbab
ababbb
62. Which of the following machine has only one initial state and no final state?
Moore machine
Finite state machine
A and B both
Deterministic finite state machine
63. Which of the following diagram is very rigid in order to express any language?
TG
NFA
GTG
FA
64. If S = {a}, then S+ will be ___________.
{a, aaa, aaaa, aaaaa,…}
{a, aa, aaa, aaaa,…}
ÂL-JÛÑÂÎD TÊCH
{a, aaa, aaaaa, aaaaaaa,…}
{aa, aaaa, aaaaaa, aaaaaaaa,…}
65. Let L be the language of all strings. defined over ∑ = {0,1}. ending in 111. Melay machine
can have final states.
Zero
One
More than one but finite
More than one but infinite
66. Let’s we have two regular expressions R1=(xx+yy) and R2=(x+ y). Which one of the
following is the correct regular expression for the Union of R1 and R2?
(xx+yy)(x+y)
(xx+yy)+(x+y)*
(xx+yy)+(x+y)
((xx+yy)+(x+y))*
67. The state where there is no way to leave after entry, is called _____________.
Davey John locker
initial state
final state
non-final state
68. Which one of the following word is not accepted by the given regular expression?
aaabab
aaaababb
abbaab
aabbabb
69. According to theory of automata there are _________ types of languages.
One
Two
Three
Four
70. Regular languages are closed under the following operations.
Union only
Concatenation, Closure only
Union, Concatenation and Closure
Regular languages are not closed under any operation
71. There can be more than _______ FA for a certain language but for _______ FA there is
only one language associated with it.
one, one
one, two
two, three
two, one
72. There is one compulsion that each state must have an on outgoing edge for every input
variable in:
Finite Automata
Transition Graph
ÂL-JÛÑÂÎD TÊCH
Both Finite Automata and Transition Graph
Transition Table
73. FA is also called
TG
GTG
NFA
DFA
74. If r1 and r2 are regular expressions then (r1 * r2) is ___________ .
FA
TG
GTG
RE
75. Keep in view the language of all strings ending with ‘a’ defined over Σ = {a, b, c, d}. For
which input letter, we will take a loop on the final state of its transition diagram?
a
b
c
d
76. Which of the following statements is true about NFA with Null String?
Infinite states
Infinite set of letters
Infinite set of transitions
Transition of null string is allowed at any stage
77. Introducing new start state in case of multiple start states is the step no. ____________
of proving Kleene’s theorem part II.
1
2
3
4
78. Which of the following diagrams expresses languages more simply?
FA
NFA
TG
GTG
79. The language of all strings defined over alphabet set = {a, b} that does not end with ‘a’
actually ends with:
b
b and ^
^
^ and a
80. In NFA having no transition at certain state, FA can be built by introducing:
Empty state
Combination of states
Initial state
ÂL-JÛÑÂÎD TÊCHFinal state
81. Formal is also known as
Syntactic language
Semantic language
Informal language
None of these
82. There may be more than one transition for a certain letter on a state in:
Finite automata
Non-Deterministic Finite Automata
Transition Table
Moore Machine
83. FA of EVEN language shows null string when
Initial state is final as well
EVEN does not accept null
One state is declared null
None of these
84. Which of the following statement is true about GTG?
Transitions are based on input letters
Transitions are based on specified substrings
Transitions are based on regular expressions
Transitions are based on alphabet set
85. In GTG, there can be more than one:
Start state
Final state
Start state and final state
Null state
86. GTG for the expression (aa+aba)* may have minimum number of states:
1
2
3
4
87. In regular expressions, the operator ‘*’ stands for
Concatenation
Iteration
Selection
Add
88. If r1 is a regular expression then (r1)* is ____________.
A generalized transition graph
A non-deterministic finite automaton
A finite automaton
Also, a regular expression
89. Which of the following is the bypass and state elimination step in the context of Kleene’s
theorem part II proof?
1
ÂL-JÛÑÂÎD TÊCH
2
3
4
90. Kleene’s theorem states that
All representations of a regular language are equivalent.
Finite Automata are less powerful than Pushdown Automat
All representations of a context free language are equivalent.
All representations of a recursive language are equivalent
91. Melay machine to increase the output string in magnitude by 1 is called:
Complementing machine
Incrementing machine
Decrementing machine
Converting machine
92. Kleene’s Theorem Part I expresses the relationship between________.
FA and TG
TG and RE
RE and FA
FA and RE
93. Suppose we have FA3 (which is equal to FA1 + FA2), then the final state of FA3 will be
declared final if:
It corresponds to final states of both FA1 and FA2
It corresponds to final states of FA1 only
It corresponds to final states of FA2 only
It corresponds to any of the final states in FA1 or FA2
94. Null strings can be specified on edges in:
Finite Automata
Non-Deterministic Finite Automata
Transition Graph
Melay Machine
95. What is false about the PALINDROME LANGUAGE?
Every word is reverse of itself.
It is an infinite language.
FA can be build for it.
None of the given option
96. While finding RE corresponding to TG, If TG has more than one start state then
Introduce the new start state
Eliminate the old start state
Replace the old start stat with final state
Replace the old final state with new start state
97. All possible combinations of strings of a language including null string is referred as:
Concatenation of a language with itself
Kleene star closure of a language
Multiplication of language with itself
Addition of a language with itself
ÂL-JÛÑÂÎD TÊCH
98. n! will be equal to:
n*n
n*(-n)!
n*(n-1)
n*(n-1)!
99. While finding RE corresponding to a TG, we connect the new start state with the old start
state by __________ transition.
a
b
Null
RE
100. In proving Kleene Theorem II, if three states are connected then middle state is
removed by connecting first and third state and writing corresponding RE in:
Sum
Concatenation
Difference
Asterisk
101. In there must be transition for all the letters of a string.
NFA
GTG
TG
FA
102. There is no accepting any language in:
FA
TG
GTG
Moore machine
103. The FA can be drawn for the regular expression (a+b)* with minimum state(s).
1
2
3
4
104. Which of the following does not contribute while finding out the length of strings?
^
a
b
a+b
105. The language of all strings defined over alphabet set = {x, y} that ends with same
letters will have the maximum length of:
1
2
3
Infinite
ÂL-JÛÑÂÎD TÊCH
106. Considering FA1 and FA2 states each. Now FA1+FA2 can have maximum number
of states.
2
3
More than 3
None of the given option
107. Which one of the following is the RE for the language defined over Σ= {a, b} having
all the words starting with a?
(a + b)*
aa(a + b)+
a(a + b)*
a*(a + b)
108. An ___________ can be considered to be an intermediate structure between
Finite automaton and Transition Graph.
RE
GTG
NFA
None of the given options
109. Suppose a language L1 has 2 states and L2 has 2 states. If we have a machine M
that accepts L1 ∩ L2. Then, the total number of states in M is equal to _______.
2
4
6
8
110. FA corresponding to an NFA can be built by introducing a state corresponding to
the combination of states, for a letter having
No transition at certain state
One transition at certain state
Two transitions at certain state
More than two transitions at certain state
111. Automata is the plural of __________.
Automate
Automaton
Automation
Automatic
112. In NFA having no transition at certain. FA can be built by introducing:
Empty state
Combination of states
Initial state
Final state
113. If S = { x }, then S* will be ___________.
{^,x,xxx,xxxx,xxxxx,…}
{^,x,xx,xxx,xxxx,…}
{^,x,xxx,xxxxx,xxxxxxx,…}
ÂL-JÛÑÂÎD TÊCH
{^,xx,xxxx,xxxxxx,xxxxxxxx,…}
114. In TG, the string is supposed to be _____________ if there is no path for a string
from initial to final state.
Accept null string
Accept all strings
Accept all non-empty strings
Does not accept any string
115. In Moore machine, if the length of input string is 9, then the length of output string
will be:
7
8
9
10
116. When ODD language is expressed by an FA, then it will have minimum _______
states.
One
Two
Three
Four
117. [(a + b)(a + b)]*, given RE cannot generate the string ________.
abbaabab
abbbaa
bbbbbb
abbbaaaaa
118. The recursive method for defining a language has ______________ steps.
One
Two
Three
Four
119. Consider the following RE: a(a + b)b* All of the following words are accepted
except .
aab
abb
aa
aba
120. For every three regular expressions R, S, T, the languages denoted by R(S ꓴ T) and
(RS) ꓴ (RT) are the .
Same
Different
R(S ꓴ T) is greater
None of the given options
121. Alphabet S = {a, bc, cc} has number of letters.
One
Two
ÂL-JÛÑÂÎD TÊCH
Three
Four
122. Two FAs are said to be equivalent, if they ______________.
Accept null string
Accept same language
Accept different language
None of the given options
123. ------------ can also help in proving Kleene Theorem III.
NFA
PDA
Moore machine
Melay machine
124. Kleene’s Theorem Part II expresses the relationship between ___________.
FA and TG
TG and RE
RE and FA
FA and RE
125. If two RE’s generate same language then these RE’s are called ___________.
Same RE
Equal RE
Similar RE
Equivalent RE
126. Every FA should be .
Deterministic
Non-deterministic
Deterministic and non-deterministic
Not depends on language
127. What statement is true?
A letter is always a combination of symbols
A letter may consist of one symbol
There is no difference between symbol and letter
Letters and symbols are the same thing
128. If ∑= {ab, bb}, then ∑* will not contain
abbbab
bbba
bbbbab
ababbb
129. Choose the correct word produced by RE (a + b)*a
abb
abab
bbbb
aaaa
130. According to 1st part of the Kleene’s theorem, If a language can be accepted by
an FA then it can be accepted by a as well
ÂL-JÛÑÂÎD TÊCH
FA
CFG
GTG
TG
131. “One language can be expressed by GTG”.
Only one
Only two
More than one
None of these
132. If a TG has more than one start states, then we can make a single start state by
introducing a new state and connecting it with all the previously existing start states by
using .
Any infinite string
Single letter string
Null string
Any finite string
133. If in a NFA, ^ is allowed to be a label of an edge then that NFA is called .
TG
RE
NFA with null string
RE
134. If we want to make a Moore machine equivalent to mealy machine then
We should ignore the extra character printed by the Moore machine.
We should ignore the extra character printed by the Mealy machine.
We will make the initial state as a no carry state.
We should not ignore the extra character printed by the Moore machine.
135. Let FA3 be an FA corresponding to FA1FA2, then initial state of FA3 must
correspond to the initial state of
FA1 only
FA2 only
FA1 and FA2
FA1 or FA2
136. In which of the following machine, the length of output string is the same to that
of input string?
Mealy machine
Moore machine
Finite automaton with output
Non-deterministic finite automaton
137. Moore Machine is an application of:
None of the mentioned
Finite automata with output
Finite automata without input
Non- Finite automata with output
138. In NFA having multiple transitions at certain state, FA can be built by introducing:
ÂL-JÛÑÂÎD TÊCH
Empty state
Combination of states
Initial state
Final state
139. In Mealy machine the output depends on __________________ .
Present state and Present input
Only present state
Nothing
Type of input
140. If L is a regular language, then (L’)’ U L will be:
L
C
P
F
141. A string will be accepted by an NFA if there exists _______ one successful path.
At least
At most
Maximum
None of the given options
142. If A and B are regular languages, !(A’ U B’) is:
Non regular
May be regular
None of the mentioned
Regular
143. There is no of accepting any language in:
Moore machine
FA
TG
GTG
144. In _______ there must be transitions for all the alphabets over which a language
is define
FA
TG
NFA
GTG
145. Let FA3 be an FA corresponding to FA1FA2, then final state of FA3 must
correspond to the final state of
FA2 only
FA1 only
FA1 or FA2
FA1 and FA2
146. How many new states are introduced while developing NFA for the closure of an
FA?
2
ÂL-JÛÑÂÎD TÊCH
4
6
8
147. Subtraction of binary numbers is possible through:
Both complementing and incrementing machine
Complementing machine
Incrementing machine
Converting machine
148. Moore Machine, the input string is '101010', thus the output string would be of
length:
Length of input string + 1
Length of input string – 1
Length of input string + 2
Length of input string -2
149. Which one of the following machine is represented as a pictorial representation
with states and directed edges labeled by an input letter along with an output character?
Mealy machine
Moore machine
Finite state machine
Deterministic finite state machine
150. If FA1 corresponds to (a+b)* then FA1 must accept ___________ string/strings.
No
Odd length
Even length
Every
151. Closure of an FA is the same as ___________ of an FA with itself except that the
initial state of the required FA is a final state as well.
Sum
Union
Intersection
Concatenation
152. Given the language L = {ab, aa, baa}, which of the following strings are in L*?
abaabaaabaa
aaaabaaaa
baaaaabaaaab
baaaaabaa
1, 2 and 3
2, 3 and 4
1, 2 and 4
1, 3 and 4
153. FA and _______ are same except that _______ has unique symbol for each
transition.
FA, TG
NFA, TG
ÂL-JÛÑÂÎD TÊCH
NFA, FA
GTG, NFA
154. How many states of a finite automaton will be final for accepting the only string
‘abb’, if Σ= {a, b}?
1
2
3
4
155. Two machines are said to be equivalent if they print the output when the input
string is run on them.
Same, Same
Same, different
Different, same
Unique, different
156. Every NFA can be considered to be a -------- as well, but the converse may not be
true.
TG
FA
GTG
PDA
157. In which of the following machine, the length of output string is 1 more than that
of input string?
Mealy machine
Non-deterministic finite automaton
Finite automaton with output
Moore machine
158. The length of output in case of is one more than the length of corresponding input
string
Moore machine
Mealy machine
Incremental machine
Adding machine
159. A is not a valid transition in
TG
GTG
NFA
RE
160. Dead states are also called
John Davey Lockers
Davey John Lockers
Mutex Lockers
Semaphores
161. Language of all strings whose length is odd and number of y’s is even defined over
alphabet set Σ = {x, y}. ___________ will be accepted by the given language.
ÂL-JÛÑÂÎD TÊCH
xxyxyxyyyx
xxyxyxyyyxy
xxyxyxyyyxx
xxyxyxyyy
162. If an effectively solvable problem has answer in Yes or NO. then the solution is
called
Infinite problem
Decision procedure
Finite solution
Optimal procedure
163. If the intersection of two regular languages is regular then the complement of the
intersection of these two languages is
Regular
Irregular
Irregular but finite
Irregular but infinite
164. If R is regular language and Q is any language (regular/non-regular). Then Pref( in
) is regular.
Q, Q
Q, R
R, Q
R, R
165. The strings or words which do not belong to a language are called of that language
Intersection
Union
Complement
Quotient
166. Prime is a language.
Finite
Both context free and regular
Regular
Non-regular
167. Finite Automaton (FA) must have number of states while a language has words.
Infinite, finite
Finite, finite
Finite, infinite
Infinite, infinite
168. The language “PRIME” is an example of language.
Regular but finite
Regular
Non regular but finite
Non regular Page 75
169. If L1 and L2 are regular languages then which statement is NOT true?
L1 + L2 is always regular
ÂL-JÛÑÂÎD TÊCH
L1 L2 is always regular
L1/L2 is always regular
L1* is always regular
170. If a language is regular it must generate number of distinct classes.
Finite
Infinite
Two
three
171. The operators like (* . +) in the parse tree are considered as
Terminals
Non-terminals
Productions
Intermediates
172. Set of all palindromes over {a,b} is:
Regular
Regular and finite
Regular and infinite
Non-regular
173. Which one of the following languages is a non-regular language?
Even-even
Containing double a
Start and end with same letter
Palindrome
174. The languages of all strings partition ∑* into class(es).
One
Two
Three
Four
175. The language of all strings not beginning with ‘b’ partitions ∑* into distinct classes.
Two
Three
Four
Five
176. The values of input (say a & b) do not remain same in one cycle due to
NAND gate
Clock pulse
OR gate
NOT gate
177. In a CFG, the non-terminals are denoted by
Small letters
Numbers
Capital letters
Small letters and numbers
178. a* + b* = (a + b)* this expression is
ÂL-JÛÑÂÎD TÊCH
True
False
179. Length of EVEN-EVEN language is always_________.
Even
Odd
Sometimes even & sometimes odd
Such language doesn’t exist
180. While finding RE corresponding to TG, we connect the new start state to the old
start state by the transition labeled by
a
b
null
none of the given options
181. Given S, Kleene star closure is denoted by ________.
S*
S+
S-
None of these
182. Which of the following steps replaces multiple incoming transition edges with a
single one in proving Kleene’s theorem part ||?
1
2
3
4
183. If r1 = (aa + bb) and r2 = (a + b) then the language (aa + bb)(a + b) will be generated
by ____________.
(r1) (r2)
(r1 + r2)
(r2) (r1)
(r1) *
184. The language having even number of a’s and even number of b’s defined over S =
{a, b} is called _______________.
EVEN-EVEN
ODD-ODD
PALINDROME
FACTORIAL
185. If L1’ and L2’ are regular languages. Then L1,L2 will be
Regular
Non regular
May be regular
None of the mentioned
186. f FA1 corresponding to (a+b)* then FA1 must accept string/strings
No
Odd length
ÂL-JÛÑÂÎD TÊCHEven length
Every
187. In FA, initial state can be represented by:
Drawing an arrow head before that state
Drawing a circle in that state
leave the state empty
Drawing ‘+’ sign in that state
188. An FA is a collection of:
Finite states, finite transition and finite input letters
Infinite states, infinite transition and infinite input letters
Only finite states and finite transitions
Only infinite states and infinite transitions
189. NFA with null string has ---------- initial state(s).
One
Two
Four
Three
190. The difference between number of states with regular expression (a + b) and (a +
b)* is:
0
1
2
3
191. A transition graph is converted into a(n) ____________ in order to obtain regular
expression.
FA
GTG
NFA
NFA
192. Consider the languages L1 = and L2 = {a}. Which one of the following represents
L1 L2* ꓴ L1*
^
a*
All of the mentioned
None of the mentioned
193. If S = {a, b} then which of the following RE will generate all possible strings?
a* + b*
(ab)*
(a + b) *
(ab + ba) *
194. In drawing FA3 (which is equal to FA1 + FA2), a state will be declared final if
It corresponds to final states of both FA1 and FA2
It corresponds to final states of FA1
It corresponds to final states of FA2
ÂL-JÛÑÂÎD TÊCH
It corresponds to any of the final states in FA1 or FA2
195. Let S = {a, bb, bab, baabb} be a set of strings, which one of the following will not
be included in S*?
baba
baabbabb
bbaaabb
bbbaabaabb
196. The length of string “AbBAbcd” defined over Σ ={Ab,B,c,d} is ___________.
One
Two
Five
Four
197. In case of finite automaton there ________ be a transition on each _______ for
every letter of the alphabet set.
Must, state
May be, state
Often, edge
Must, edge
198. Which one of the following word is not accepted by the given regular expression?
(a+b)*(aaa+bbb)(a+b)*
Ababaaaab
Bababbbba
Baabaabba
Abbaaabba
199. 1 Let FA1 accepts many strings and FA2 accepts none then FA1+FA2 will be equal
to:
FA1
FA2
FA2-FA1
(FA2)
200. Edges are expressed with a regular expression in:
GTG Page 23
FA
NFA
TG
201. NFA corresponding to union of FAs is built by introducing a new start state and
connect it to the states originally connected to the old start state with the ---------
transitions as the old start state:
Same
Union of
Different
Concatenated
202. If we subtract a binary number 1010 from the binary number 1101(ignore the
overflow), then the result will be:
ÂL-JÛÑÂÎD TÊCH
1100
0011
1010
0101
203. In concatenation, we include the initial state of FA2 automatically after the final
state of FA1 because of:
We need just two initial states
We need just one initial state
Some part of the string may be accepted by FA2
The strings of FA2 are accepted first before the strings of FA1
204. a(a+b)*b + b(a+b)*a is the regular expression of language defined over Σ={a,b} that
is ________.
starting with b and ending in a
starting with a and ending in a
starting with a and ending in b
starting with a and ending in b or starting with b and ending in a
205. GTG for the expression (a+b)*bb may have minimum number of states:
Aaabcbbcbacc
Bbbacaacabcc
Cccbabbcabcc
Acbdcbababab
206. Which of the following state is introduced while developing NFA for the closure
of an FA?
Final state
Simply an initial state
An initial state with loop for all letters
An initial state which should be final as well
207. In NFA,if null word (lambda) is allowed to be a label of an edge, then that NFA is
called _________.
NFA with one string
NFA with two strings
NFA with null string
NFA without null string
208. Which one of the following is a correct word produced by the RE (a*b*)ab?
Null
Abab
aaaa
bbbb
209. While developing NFA for the union of FA1 and FA2, if there is a loop of ‘a’ at the
initial state of FA1 then the new initial state will have a transition for ‘a’ that goes straight
to:
the final state of FA1
The initial state of FA1
the initial state of FA2
ÂL-JÛÑÂÎD TÊCH
the initial state of FA1*FA1
210. Let L be the language of all strings, defined over Σ = {0,1}, ending in 111. Which of
the following strings are distinguishable with respect to L with z being 11?
111, 101
112, 102
113, 103
114, 104
211. Which one of the following word is not accepted by the given regular expression?
Abbbbaa
Baaaabb
Cbbbbcc
Caaaacc
212. Let FA3 be an FA corresponding to FA1FA2, then the final state of FA3 must
correspond to the final state of
FA2 only
FA1 only
FA1 or FA2
FA1 and FA2
213. Let FA3 be an FA corresponding to FA1FA2, then the initial state of FA3 must
correspond to the initial state of
FA1 only
FA2 only
FA1 or FA2
FA1 and FA2
214. In the context of make NFA for the concatenation of FA1 and FA2 (FA2 accepting
null string), which of the following option is correct?
Final states in both FAs
Initial states in both FAs
FA2 having final state only
FA2 having initial state only
215. In the context of make NFA for the concatenation of FA1 and FA2 (none accepting
null string), which of the following option is correct?
No final state in FA2 only
No initial state in FA1 only
No final and initial states in FA1 and FA2 respectively
No initial and final states in FA1 and FA2 respectively
216. Let FA1 accepts many strings and FA2 accepts no string, then FA1+FA2 will be
equal to:
FA1
FA2
(FA2) *
FA2-FA1
217. The minimum length of the strings(except null string) of a language that starts and
ends in the same letters will be:
ÂL-JÛÑÂÎD TÊCH
1
2
3
4
218. While developing NFA for the union of FA1 and FA2, there will be _____________
transition/transitions for both ‘a’ and ‘b’ on the new initial state.
Single
Multiple
Only one
Only three
219. Which of the following form correctly expressed the regular expression RR*?
R+
R-
R*
R+R-
220. Which of the following is not a step in elimination of states procedure?
Unifying all the final states into one using e-transitions
Get the resulting regular expression by direct calculation
Remove states until there is only starting and accepting states
Unify single transitions to multi transitions that contains union of input
221. In the context of make NFA for the concatenation of FA1 and FA2 (Both FAs
accepting null string), which of the following option is correct?
Initial states in both FAs
Final states in both FAs
FA2 having initial state only
FA2 having final state only
222. In FA, final state is represented by a ________ sign.
-
=
*
+
223. If we have the regular expression (a+b)* (aaa + bbb) (a+b)*, then we can draw a
TG for the provided RE with minimum _________ number of state(s).
two
zero
one
three
224. Suppose we have the regular expression: aa(a+b+c)*bb(a+b+c)*cc Which of the
following string will not be generated by the given RE?
aabbcc
aaaabbccbc
aaabcbbcbacc
aaabbbbccc
225. If an FA has 3 states and 2 letters in the alphabet set, then it will have total
___________ number of transitions.
ÂL-JÛÑÂÎD TÊCH
7
4
6
5
226. Which one of the following string is a part of EQUAL language defined over
Σ={a,b}?
aabbaa
aabbbaa
ababab
babab
227. Which one of the following word is not accepted by the given regular
expression?aa(a+b)*b
Aabbabb
Abbaab
Aaabab
aaaababb
228. Which of the following statement is NOT true about TG?
There may exist NULL path
There may be no final state
There exists exactly one path for certain string
There may exist more than one paths for certain string
229. Kleene’s Theorem Part III expresses the relationship between ___________.
RE and FA
FA and GTG
TG and RE
FA and TG
230. When even length language is expressed by an FA, then it will have
minimum_______ states.
One
Two
Three
Four
231. Which one of the following word is not accepted by the given regular
expression?(a+b)*bba(a+b)*
Aaababab
Babbba
Abbbbaa
bbabbbbaba

232. FA stands for ___________.


Fixed Automaton
Finite Automaton
False Automaton
Functional Automaton
ÂL-JÛÑÂÎD TÊCH
233. FA corresponding to an NFA can be built by introducing an empty state for a letter
having
no transition at certain state
one transition at certain state
two transitions at certain state
more than two transitions at certain state
234. In order to make NFA for the union of FA1 and FA2, the final state/ states of:
both FAs should be linked
both FAs should be left intact
FA1 have a transition to the final state of FA2
FA2 have a transition to the final state of FA1
235. Suppose we have FA3 which is equal to the union of FA1 and FA2. Now the initial
state of the FA3 will be equal to:
Only initial state of FA1
Final state of FA2
Only initial state of FA2
Initial state of FA1 or FA2
236. Introducing new final state in case of multiple final states is the step no.
____________ of proving Kleene’s theorem part II.
4
1
2
3
237. In proving Kleene Theorem II, circuits are reduced into:
asterisk
difference
both difference and asterisk
sum
238. Finite Automaton (FA) has:
Zero or more final states
Exactly one final state
Not more than two final states
Exactly two final states
239. The formal language is also known as _________.
Semantic language
Informal language
Syntactic language
Normal language
240. The language of all strings defined over alphabet set = {x, y} having triple x’s or
triple y’s will have the minimum strings with length of:
1
3
4
2
ÂL-JÛÑÂÎD TÊCH
241. The language of all strings defined over alphabet set = {x, y} that ends with
different letters will have the maximum length of:
1
2
infinite
3
242. In an FA, when there is no path from the initial state to final state, then that
FA_____________.
accept all non-empty strings
does not accept any string
accept all strings
accept null strings
243. If Σ= {a, b, c, d}. How many transitions will be there on each state of a finite
automaton for any language defined over Σ?
2
4
1
3
244. Which of the following is the minimal number of states for a finite automaton
accepting the language of all strings defined over any alphabet set?
3
4
2
1
245. How many states of a finite automaton will be final for accepting L = {^, b, bb,
bbb}?
3
1
4
2

You might also like