You are on page 1of 38

THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402)


Theory of Automata and Formal
Languages (KCS402)
Course Outcome ( CO)
At the end of course , the student will be
able to understand
Analyse and design finite automata, pushdown automata, Turing machines, formal languages, and
CO 1
grammars
CO 2 Analyse and design, Turing machines, formal languages, and grammars

Demonstrate the understanding of key notions, such as algorithm, computability, decidability, and
CO 3
complexity through problem solving
CO 4 Prove the basic results of the Theory of Computation.

CO 5 State and explain the relevance of the Church-Turing thesis.

DETAILED SYLLABUS

Unit Topic

Basic Concepts and Automata Theory: Introduction to Theory of Computation- Automata,


Computability and Complexity, Alphabet, Symbol, String, Formal Languages, Deterministic Finite
I Automaton (DFA)- Definition, Representation, Acceptability of a String and Language, Non
Deterministic Finite Automaton (NFA), Equivalence of DFA and NFA, NFA with ε-Transition,
Equivalence of NFA’s with and without ε-Transition, Finite Automata with output- Moore Machine,
Mealy Machine, Equivalence of Moore and Mealy Machine, Minimization of Finite
Automata, Myhill-Nerode Theorem, Simulation of DFA and NFA
Regular Expressions and Languages: Regular Expressions, Transition Graph, Kleen’s Theorem, Finite
II Automata and Regular Expression- Arden’s theorem, Algebraic Method Using Arden’s Theorem,
Regular and Non-Regular Languages- Closure properties of Regular Languages, Pigeonhole Principle,
Pumping Lemma, Application of Pumping Lemma, Decidability- Decision properties, Finite Automata
and Regular Languages, Regular Languages and Computers,
Simulation of Transition Graph and Regular language.

Regular and Non-Regular Grammars: Context Free Grammar(CFG)-Definition, Derivations,


Languages, Derivation Trees and Ambiguity, Regular Grammars-Right Linear and Left Linear
III grammars, Conversion of FA into CFG and Regular grammar into FA, Simplification of CFG, Normal
Forms- Chomsky Normal Form(CNF), Greibach Normal Form (GNF), Chomsky
Hierarchy, Programming problems based on the properties of CFGs.

Push Down Automata and Properties of Context Free Languages: Nondeterministic Pushdown
Automata (NPDA)- Definition, Moves, A Language Accepted by NPDA, Deterministic Pushdown
IV Automata(DPDA) and Deterministic Context free Languages(DCFL), Pushdown Automata for Context
Free Languages, Context Free grammars for Pushdown Automata, Two stack Pushdown Automata,
Pumping Lemma for CFL, Closure properties of CFL, Decision Problems of CFL,
Programming problems based on the properties of CFLs.

Turing Machines and Recursive Function Theory : Basic Turing Machine Model, Representation
V of Turing Machines, Language Acceptability of Turing Machines, Techniques for Turing Machine
Construction, Modifications of Turing Machine, Turing Machine as Computer of Integer Functions,
Universal Turing machine, Linear Bounded Automata, Church’s Thesis, Recursive and Recursively
Enumerable language, Halting Problem, Post’s Correspondance
Problem, Introduction to Recursive Function Theory.

0 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402)


Solved MCQ
1. Unit-1 …………………………………………………………………………...…….2

2. Unit-2 …………………………………………………………………………...…….8

3. Unit-3…………………………………………………………………………...…... 17

4. Unit-4…………………………………………………………………………..…….24

5. Unit-5………………………………………………………………………......…….30

1 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402)

Unit-1

1. Which of following is true? 4. What is a dump state?


1. For every finite language, there exists a a) A state in DFA whose removal will
DFA which accepts the language. not change the language accepted by
2. For some finite language, there does not DFA.
exist a DFA which accepts the language.
b) A state in DFA from where cannot
3. Only finite languages are accepted by
goto any other state.
DFAs.
c) A state in DFA from where we cannot
4. Every infinite language is accepted by
goto any accept state.
some DFA.
2. DFA has
d) A state in DFA reachable by every

A. infinitely many state but finitely many other state.


accept states.
B. finitely many states.
5. Which of following are true?
C. transition function with finite domain and
A. NFA may have ϵ transitions but DFA does
range.
not.
D. transition function with possibly infinite
B. NFA and DFA both may have ϵ
range or domain
transitions.
C. NFA computes on multiple paths but not
a) Only A and B simultaneously.

b) Only B and C D. NFA computes on multiple paths


c) Only A ,B, and C simultaneously
d) All a) Only A and B
3. Which of the following language is accepted the b) Only A and C
given DFA? c) Only A ,B, and C
d) All

6. Which of following languages are accepted by


the given DFA?

a) ϕ
b) Σ*− {x|x ∈ Σ∗ and |x| > 0}
c) Σ* − {0, 1}
d) {0, 1} A. All binary strings of even length.
B. All binary strings with odd difference

2 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

between number of 0 and number of 1. vice-versa


C. All binary strings of odd length.
D. All binary strings with even difference
between number of 0 and number of 1. 10. Which of following is true?
a) Only A and B a) A language accepted by a
b) Only B and C regular expression is also
c) Only C and D accepted by some NFA and
d) All some DFA.
b) A language accepted by a
7. Which of following languages are accepted by regular expression is also
the given DFA? accepted by some NFA but not
necessarily accepted by a DFA.
c) A language accepted by a
regular expression is may not be
accepted by any NFA or DFA.
a) {w ∣ w ends with 0} d) A language accepted by a
b) {w ∣ w contains equal number of 0 and 1} regular expression is accepted
c) {w ∣ w does not end with 1}
by some DFA but not
d) {w ∣ w contains 1 and ends with a 0}
necessarily accepted by an NFA.

8. Which of following is true?


11. Regular languages are closed over
a) Every NFA is a set of some DFAs
a) concatenation
b) NFA is a 6 tuple
b) union
c) Every DFA is an NFA
c) intersection
d) Every NFA is a DFA
d) complement
e) All of above
9. Which of following is true?
12. Which of following is true?
a) A language accepted by a DFA is
a) For every regular language there
also accepted by some NFA and
exists a GNFA with atmost 2 states
vice-versa
that accepts the language
b) A language accepted by an NFA is
b) Every GNFA can be converted to a
also accepted by some DFA but not
regular expression such that both
vice-versa
accept same language
c) DFA is 5-tuple but not NFA
c) Every NFA can be converted to a
d) A language accepted by a DFA is
regular expression such that both
also accepted by some NFA but not
3 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

accept same language 16. The appropriate precedence order of

d) All of above operations over a Regular Language is


a) Kleene, Union, Concatenate
b) Kleene, Star, Union
13. What is the language accepted by following c) Kleene, Dot, Union
regular expression? d) Star, Union, Dot
0*(1( 01* 0)*1)*0*0 17. If ∑= {0,1}, then Ф* will result to:
a) ε
a) Binary representation of multiples of 6 b) Ф
b) Binary representation of multiples of 4 c) ∑
c) Binary representation of multiples of 3 d) None of the mentioned
d) Binary representation of multiples of 2 18. Under which of the following operation, NFA
is not closed?
a) Negation
14. Let N be a NFA such that starting state of b) Kleene
N is not an accepting state. What is the c) Concatenation
minimum length string that can accepted d) None of the mentioned
a) Length of the shortest path from 19. Which of the following options is correct?

starting state to some accepting Statement 1: Initial State of NFA is Initial


State of DFA.
state
Statement 2: The final state of DFA will be
b) |Q| − 1, Where Q is the set of
every combination of final state of NFA.
states of N
a) Statement 1 is true and Statement 2 is true
c) 1
b) Statement 1 is true and Statement 2 is false
d) 0 c) Statement 1 can be true and Statement 2 is
true
d) Statement 1 is false and Statement 2 is also
15. Consider the grammar G,
false
S → AB
20. What is wrong in the given definition?
A → aa ∣ ab ∣ ba ∣ bb
B → aBa ∣ bBb ∣ C Def: ({q0, q1, q2}, {0,1}, δ, q3, {q3})

C → aa ∣ ab ∣ ba ∣ bb a) The definition does not satisfy 5 Tuple


which of the following string is generated by definition of NFA
G? b) There are no transition definition
c) Initial and Final states do not belong to the
a) bababbab Graph (set of states)
b) abaab d) Initial and final states can’t be same
c) aaabbbba 21. Reverse of a DFA can be formed by
d) babaa a) using PDA
b) making final state as non-final

4 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

c) making final as starting state and starting c) Always 1


state as final state d) none
d) None of the mentioned 28. Automata with Boolean output
22. For a give Moore Machine, Given a) moore m/c
Input=’101010’, thus the output would be of b) mealy m/c
length: c) DFA
a) |Input|+1 d) none
b) |Input| 29. Automata can be defined by using
c) |Input-1| a) 4 tuples
d) Cannot be predicted b) 5 tuples
23. Transition Function of NFA is given by ___ c) 3 tuples
a) ∑ x Q → ∑ d) 2 tuples
b) Q x ∑ → ∑ 30. Any Language have string which of length
c) Q x ∑ → Q <=3 and start with 0 and end with 1 over
d) Q x ∑ → 2Q {0,1} then find the number of string in this
24. Which one of the following is TRUE? language?
a) The Language L = {an bn| n >= 0 } is a) 4
regular b) 3
b) The Language L = {an | n is prime } is c) 2
regular d) 1
c) The Language L = { w | w over ∑ = {a, b} 31. Under which of the following operation, NFA
has number of b multiple of 5 } is regular is closed?
d) The language L { ww | w ϵ ∑* with ∑ = a) Negation
{0, 1} } is regular b) Kleene
c) Concatenation
25. ϵ-transitions are
d) All of the above
a) conditional
32. Which of the following is an application of
b) unconditional
Finite Automaton?
c) input dependent
a) Compiler Design
d) none of the mentioned
b) Grammar Parsers
26. Length of null string is
c) Text Search
a) 0
d) All of the mentioned
b) 1
33. NFA, in its name has ’non-deterministic’
c) 2
because of :
d) Not defined
a) The result is undetermined
27. Length of any string w is
b) The choice of path is non-deterministic
a) Unique number of input symbol in that
c) The state to be transited next is non-
string
deterministic
b) Number of input symbol in that string
d) All of the mentioned

5 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

34. Which of the following is a not a part of a) 0


definition of finite automata? b) 1
a) Input alphabet c) 2
b) Transition function d) 3
c) Initial State 41. State true or false? Statement: An NFA can be
d) Output Alphabet modified to allow transition without input
35. Language of finite automata is. alphabets, along with one or more transitions
a) Type 0 on input symbols.
b) Type 1 a) True
c) Type 2 b) False
d) Type 3 42. What is the relation between DFA and NFA
36. Transition function of FA maps.to on the basis of computational power?
a) Σ * Q → Σ a) DFA > NFA
b) Q * Q → Σ b) NFA > DFA
c) Σ * Σ → Q c) Equal
d) Q * Σ → Q d) Can’t be said
37. δˆ tells us the best: 43. Which of the following is not an example
a) how the DFA S behaves on a word u of finite state machine system?
b) the state is the dumping state a) Control Mechanism of an elevator
c) the final state has been reached b) Combinational Locks
d) Kleene operation is performed on the set c) Traffic Lights
38. For a give Mealy Machine, Given d) Digital Watches
Input=’101010’, thus the output would be of 44. Given: ∑= {a, b},L= {xϵ∑*|x is a string
length: combination} ∑^4 represents which
a) |Input|+1 among the following?
b) |Input| a) {aa, ab, ba, bb}
c) |Input-1| b) {aaaa, abab, ε, abaa, aabb}
d) Cannot be predicted c) {aaa, aab, aba, bbb}
d) All of the mentioned
39. Subset Construction method refers to: 45. A ______is a substitution such that h(a)
a) Conversion of NFA to DFA contains a string for each a.
b) DFA minimization a) Closure
c) Eliminating Null references b) Interchange
d) ε-NFA to NFA c) Homomorphism
d) Inverse Homomorphism
40. Given Language: {x | it is divisible by 3}. The
total number of final states to be assumed in
order to pass the number constituting {0, 1} is

6 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

Answer Key

Unit-1
Question No. Answer Question No. Answer Question No. Answer

1 a 16 c 31 d
2 b 17 a 32 d
3 b 18 d 33 b
4 c 19 a 34 d
5 b 20 c 35 d
6 c 21 c 36 d
7 c 22 a 37 a
8 c 23 d 38 b
9 d 24 c 39 a
10 a 25 b 40 b
11 e 26 a 41 a
12 d 27 b 42 c
13 a 28 c 42 d
14 d 29 b 44 b
15 a, c 30 b 45 c

7 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

Unit-II
1. L = {ε, a,,aa,aaa,…..} is represented by__ 6. The minimum number of states required
a) a* in a DFA (along with a dumping state) to
b) a+ check whether the 3rd bit is 1 or not for
c) Both a & b |n|>=3 over (0,1)
d) ∑* a) 3
2. ε-closure of a state is combination of self- b) 4
state and ___ c) 5
e) initial state d) 1
f) ε-reachable state 7. While applying Pumping lemma over a
g) final state regular language, we consider a string w
h) All that belong to L and fragment it into
_________ parts.
3. RR* can be expressed in which of the a) 2
forms: b) 5
a) R+ c) 3
b) R- d) 6
c) R+ U R- 8. While applying the concept of Pumping
d) R lemma, If we select a string w such that
4. The regular expression denote a language w∈L, and w=xyz. Which of the following
comprising all possible strings of even portions cannot be an empty string?
length over the alphabet (0, 1) a) x
a) 1+ 0(1+0)* b) y
b) (0+1) (1+0)* c) z
c) (00+01+11+10)* d) all of the mentioned
d) (1+0) 9. P, O, R be regular expression over ∑, P is
5. Given the language L = {ab, aa, baa}, not ε, then R=Q + RP has a unique
which of the following strings are in L*? solution:
{1: abaabaaabaa, 2: aaaabaaaa, 3: a) Q*P
baaaaabaaaab, 4: baaaaabaa} b) QP*
a) 1, 2 and 3 c) Q*P*
b) 2, 3 and 4 d) (P*O*) *
c) 1, 2 and 4 10. Arden’s theorem is true for:
d) 1, 3 and 4 a) More than one initial states
b) Null transitions

8 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

c) Non-null transitions 16. Regular expression equivalent to


d) None of the mentioned language accepted by DFA can be
11. (0+ε) (1+ε) represents determined by
a) {0, 1, 01, ε} a) State Elimination
b) {0, 1, ε} b) Arden Theorem
c) {0, 1, 01 ,11, 00, 10, ε} c) Both State Elimination and Arden
d) {0, 1} Theorem
12. RE (0+ε) (1+1) represents which regular d) None
set 17. You can use regular expressions in the
a) {1, 01} Find what and Replace with strings to
b) { 1, ε} enhance your search
c) { 01, 10, ε} a) True
d) {0, 1} b) False
13. Consider the languages L1 = Ø and L2 = 18. Let the class of language accepted by
{a}. Which one of the following finite state machine be L1 and the class of
represents L1 L2* U L1* languages represented by regular
a) {ϵ} expressions be L2 then
b) Ø a) L1<L2
c) a* b) L1>=L2
d) { ϵ,a} c) L1 U L2 = .*
14. Let Land M be RE, then Idempotent d) L1=L2
identity is 19. . L and M are Regular expressions, then
a) ØL = LØ the following L.M = M.L is
b) L + M = M + L a) True
c) L + L = L b) False
d) Ø + L = L + Ø 20. Expression ‘a’ is equivalent to
15. The set of all strings over ∑ = {0,1} in a) a*
which all strings that begins and ends b) a+Φ
with 0 is c) a+ϵ
a) 0(0+1)*0 d) invalid expression
b) 00 21. Concatenation (.) has the ________
c) 00(0+1)0 highest precedence
d) All of these a) first
b) second
c) third

9 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

d) fourth 28. Which of the following identity is wrong?


22. The logic of pumping lemma is a good a) R + R = R
example of b) (R*)* = R*
a) Pigeon-hole principle c) ɛR = Rɛ = R
b) Divide-and-conquer technique d) ØR = RØ = RR*
c) Recursion 29. The set of all strings over ∑ = {a,b} in
d) Iteration which all strings having bbbb as substring
23. Let for ∑= {0,1} R= (∑∑∑) *, the is
language of R would be a) (a+b)* bbbb (a+b)*
a) {w | w is a string of odd length} b) (a+b)* bb (a+b)*bb
b) {w | w is a string of length multiple of c) bbbb (a+b)*
3} d) bb (a+b)*
c) {w | w is a string of length 3} 30. Which of the following regular expression
d) All of the mentioned identity is true?
24. (a + b)* is equivalent to a) r(*) = r*
a) b*a* b) (r*s*)* = (r + s)*
b) (a*b*)* c) (r + s)* = r* + s*
c) a*b* d) r*s* = r* + s*
d) none of the mentioned 31. Consider the following DFA,
25. L = {aP | p is prime } is
a) regular
b) not regular
c) accepted by DFA
d) accepted by PDA
26. ϵR is equivalent to
a) ϵ
What will be number of states in minimum
b) Φ
DFA, which accepts the same language as
c) R- ϵ
above DFA?
d) Rϵ
27. Which of the following is NOT the set of a) 2
regular expression R = (ab + abb)* bbab? b) 3
a) ababbbbab c) 4
b) abbbab d) 5
c) ababbabbbab
d) abababab

10 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

32. Let L be a language. We define another c) {an bn ≥ 0}


language L’ as follow d) None
35. Which of the strings does the following
L’ = {w ∣ w is binary equivalent of 2x
DFA accepted?
where x ∈ L and consider x as a binary
number}

Which of the following is True?

a) If L is regular then L’ is also regular


b) If L is regular then L’ may not regular
c) L’ is always regular irrespective of L
d) L’ is always non-regular irrespective a) 10100
of L b) 00110
c) 00111

33. L = {w ∣ w is a binary strings and contains d) 01011

equal number of occurrences of substring


01 and 10} 36.What language does the following DFA
computed
What is the minimum number of states in a
DFA for L

a) 4
b) 5
c) 6
d) Can not construct a DFA for L

34. Which regular expression describes the a) {w |w is a string that contains

language generated by the following exactly three 0’s}

grammar? b) {w |w is a string that contains


exactly one or three 0’s}
S → aSb ∣ ϵ c) {w |w is a string that does not
S → aA ∣ bB contain exactly two 0’s}
A → aA ∣ bB ∣ ϵ d) {w |w is a string that does not
B → bB ∣ aA ∣ ϵ contain more than four 0’s}
n n
a) a (a + b)*b , where n > 0
b) an (a + b)* bn , where n ≥ 0.

11 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

37.Let L1 and L2 be languages such that c)


there exist DFA for accepting L1 U
L2. Which of the following statements is
necessarily truer
a) There exists a DFA which accepts
(L1 U L2)*
b) There exists a DFA which accepts
L1 d)
c) There exists a DFA which accepts
(L1∩ L2)
d) There exists a DFA which accepts
L2
38. Let ∑= (a, b, c, d ) . How many strings
are there in ∑4
a) 256
40. Let A be a language accepted by a DFA
b) 16
with g states. Which of the following
c) 4
statements is necessarily true?
d) 64
a) There exists a NFA with q or less
39.What is the DFA for the language {w | w
staves which accepts L
starts with b and has at most one a}
b) Every NFA which accepts L requires
a)
atleast 2q states.
c) The number of strings in L is q - I
d) The number of strings in L is q + I

41. Which language is accepted by the


following NFA?
b)

a) {w| w ends with 010}


b) {w |w seals with 010}

12 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

c) {w |w contains 010 as a substring} a) (p+r)q+pq


d) {w | w does not contain 0 10 as a b) 2p+rq+pq
substring} c) (2pq + q)(p + q)
d) Infinite

42. Which of the following is the language


corresponding to the regular expression Φ 46. Which of the following strings are
(0 + 1)* U Φ* generated by the regular expression
a) {€} (0+1)1*001*1
b) {€,0} a) 010011
c) Φ b) 1001
d) {0} c) 0110
d) 1011001

43. How many strings of length exactly three


47. What is the regular expression
does the language described by the
corresponding to the following NFA?
regular expression (0 + 1)* 0(0 + 0 1)*
contains?
a) 5
b) 8
c) 7
d) 6

44. Which language is accepted by the regular


expression 0*(10*1)*0*10*
a) {w | w has even number of 1’s} a) (0 + 1)*000
b) {w | w has odd number of 1’s} b) (0 + 1)00*
c) {w | w has even number of 0’s} c) (0 + 1)*00
d) {w | w has odd number of 0’s} d) (0 + 1)*00 + (0 + 1)*000(0 + 1)*001

45. Let P, Q and R be regular expressions


48. Let L be a language defined as follow: L = (
such that the number of strings generated
aP | p is a prime} which of the following
by P is p, Q is q and R is r. What is the
are true?
number of strings generated by the
a) L is not a regular language
regular expression (P+R)*Q + PQ?
b) L* is a regular language (where • is the

13 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

Kleene closure} 2. Intersection of a non-regular language and a


c) 𝐿̅ is a regular language. regular language is non-regular.
d) None of the above is true 3. Kleene closure of a non-regular language is
non-regular.
49. What is the language corresponding to the 4. Union of a non-regular language with its
following regular expression? complement is regular
(0+1)*(01+10)(0 + 1)*
a) 1,2 and 3.
a) {w I w contains 01 or 10 as a
b) 1,3 and 4.
substring}
c) 2 and 3.
b) {w I length of w is >= 2}
d) Only 4.
c) {w I w ∈ {0, 1}*}.
d) {w I w contains at least one 0 and one
1} 52. Number of states in the minimized DFA of
the following DFA will be

50. Consider the following languages,

A = { an bm I n, m > 0}.

B = { an bm I n ≥m ≥0}

C = {an bm I n= m ≥ 0}

D = { an bm I n ≥ m ≤ 100}.

a) 1
Which of the above are not regular?
b) 2
c) 3
d) 4
a) Only Band D.
b) Only C.
c) Only B and C. 53. Which of the following languages are
d) All of them. regular?
51. Which of the following statements are true?
A = { x I x has two O's separated by the
1. Union of two non-regular languages is non- number of positions that is a multiple of 4. }
regular. B = { x I x is binary representation of multiple
of 3}

14 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

C = ( x I x is a binary string and decimal of any 56. Consider the following language,
prefix of x is not of form 3m + 2, where m ≥
L = {w ∈ {0, 1}* ∣ w is palindrome }
0}
Which of the following grammar generates the
a) Only B and C. above language.
b) Only B. a) S → 0S0 ∣ 1S1 ∣ ϵ
c) A, B and C. b) S → 0S0S ∣ 1S1S ∣ ϵ
d) Only A c) S → 0S0 ∣ 1S1 ∣ 0 ∣ 1
d) S → 0S0 ∣ 1S1 ∣ 0 ∣ 1 ∣ ϵ

54. What is the language of the following


DFA? 57. Consider the following grammar G,

S → aSaS ∣ ϵ
Which of the following is true?
a) G is ambiguous and L(G) is regular.
b) G is unambiguous L(G) is regular.
c) L(G) is CFL but not regular.
d) None of Above

a) { w I w contains at least three 0s}


58. Consider the following grammar G,
b) { w I w contains number of 0 as a
multiple of 3 and number of 1 as a S → AB
multiple of 2} A → XAX
c) { w I w contains at least three 0s and B → XBX
two 1s} X→0∣1
d) { w I w contains at least three 0s and Consider a language
even number of 1s} L = {xy ∣ x, y ∈ {0, 1}*, |x| = |y| and x ≠ y}
Which of the following production should be
added to above grammar G so that L(G) = L
55. Let L1 and L2 be languages and L1 ⊆ L2.
a) A → 0, B → 1 only.
Which of the following is true?
b) A → 1, B → 0 only.
a) If L1 is regular then L2 is also regular.
c) S → BA, A → 1, B → 0 only.
b) If L1 is CFL then L2 is also CFL. d) None of the other option.
c) L2 can be regular even if L1 is CFL
but not regular.
d) None of the other option. 59. Consider the following language,

15 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

L1 = {wwr # wwr ∣ w ∈ {0, 1} } ∗ L1 = {uvwvr ∣ u, v, w ∈ {0, 1} ∗ , |u| = |w|


L2 = {ai bj ck | i = j or j = k} = 2}
Which of the above is CFL?
L2 = {utu r ∣ u, t ∈ {0, 1} ∗ , |u| = |t|}
a) Only L1
b) Only L2 Which of the following is true?
c) Both L1 and L2. a) L1 and L2 both are CFL.
d) None. b) L1 is CFL but L2 is not a CFL.
c) L2 is CFL but L1 is not a CFL.
60. Consider the following language, d) Both are not CFL.

Answer Key

Unit-2
Question Answer Question Answer Question Answer Question Answer
No. No. No. No.
1 a 16 c 31 c 46 a, b
2 b 17 a 32 b 47 c
3 a 18 d 33 b 48 a, b
4 c 19 b 34 b 49 a,d
5 c 20 c 35 c 50 c
6 c 21 c 36 c 51 d
7 c 22 a 37 a 52 d
8 b 23 b 38 a 53 c
9 b 24 b 39 a 54 d
10 c 25 b 40 a 55 c
11 a 26 d 41 c 56 d
12 a 27 d 42 a 57 a
13 a 28 d 43 a 58 c
14 c 29 a 44 b 59 b
15 a 30 b 45 d 60 b

16 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

Unit-III

1. The entity which generate Language is a) Deterministic Context free grammars


termed as: b) Non-Deterministic Regular grammars
a) Automata c) Context sensitive grammar
b) Tokens d) None of the mentioned
c) Grammar 7. Context Free Grammars has _____tuples
d) Data a) 5
2. Production Rule: aAb->agb belongs to b) 4
which of the following category? c) 3
a) Regular Language d) None
b) Context free Language 8. A grammar is said to be ambiguous
c) Context Sensitive Language grammar if it ________
d) Recursively Ennumerable Language a) produces more than one derivation tree
3. Which of the following statement is false? b) produces more than one left most
a) Context free language is the subset of derivation
context sensitive language c) produces more than one right most
b) Regular language is the subset of derivation
context sensitive language d)All
c) Recursively ennumerable language is 9. Which of the following statements in true?
the super set of regular language (a) If a language is context free it can
d) Context sensitive language is a subset always be accepted by a deterministic
of context free language push-down automaton
4. Language of finite automata is generated (b) The union of two context free
by languages is context free
a) Type 0 grammar (c) The intersection of two context free
b) Type 1 grammar languages is context free
c) Type 2 grammar (d) The complement of a context free
d) Type 3 grammar language is context free
5. Are ambiguous grammar context free? 10. The language accepted by Push down
a) Yes Automaton:
b) No a) Recursive Language
c) Both b) Context free language
d) None of these c) Linearly Bounded language
6. Which of the following are always d) All of the mentioned
unambiguous?

17 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

11. Which of the following is false for a c) CSL<Unrestricted<CF<Regular


grammar G in Chomsky Normal Form: d) none of the mentioned
a) G has no useless symbols
16. The minimum number of productions
b) G has no unit productions
required to produce a language consisting
c) G has no epsilon productions
of palindrome strings over ∑={a,b} is
d) None of the mentioned
a) 3
12. If w belongs to L(G), for some CFG, then
b) 7
w has a parse tree, which tell us the
c) 5
________ structure of w.
d) 63
a) semantic
17. Ambiguous grammar are not context free?
b) syntactic
a) Yes
c) lexical
b) No
d) all of the mentioned
18. Which of the following conversion is not
13. The format: A->aB refers to which of the
possible (algorithmically)?
following?
a) Regular grammar to CFG
a) Chomsky Normal Form
b) NDFA to DFA
b) Greibach Normal Form
c) NDPDA to DPDA
c) Backus Naur Form
d) NDTM to DTMD
d) None of the mentioned
19. Push down automata accepts which
14. Given grammar G:
language
(1)S->AS
a) Context sensitive language
(2)S->AAS
b) Context free language
(3)A->SA
c) Recursive language
(4)A->aa
d) None of these
Which of the following productions denies
20. A context free grammar G is
the format of Chomsky Normal Form?
in Chomsky normal form if
a) 2,4
every production is of the form
b) 1,3
a) A → BC or A → A
c) 1, 2, 3, 4
b) A → BC or A → a
d) 2, 3, 4
c) A → BCa or B → b
15. Which of the following relates to
d) None of these
Chomsky hierarchy?
21. Which context free grammar G is not
a) Regular<CFL<CSL<Unrestricted
in Chomsky normal form
b) CFL<CSL<Unrestricted<Regular
a) A → c or A → AB
b) A → BC or A → a

18 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

c) A → a or B → AB b) In derivation tree, the label of


d) None of these all nodes except leaf nodes is a
22. A context free grammar G is variable
in griebach normal form if c) In derivation tree, if the root of a sub
every production is of the form tree is X then it is called –tree
a) A → b or A → bABC d) None of these
b) A → BC or A → a 27. 87. The context free grammar S →
c) A → aBCa or B → b A111|S1, A → A0 | 00 is equivalent to
d) None of these a) {0ⁿ1ᵐ | n=2, m=3}
23. Which context free grammar G is not b) {0ⁿ1ᵐ | n=1, m=5}
in griebach normal form c) {0ⁿ1ᵐ | n should be greater than two
a) A → b or A → bABC and m should be greater than four}
b) A → bBC or A → a d) None of these
c) A → aBCa or B → b 28. 88. A context free language is called
d) None of these ambiguous if
24. Which of the following statement is false? a) It has two or more leftmost derivations
a) The context free language can be for some terminal string ѡ є L (G)
converted into Chomsky normal form b) It has two or more leftmost derivations
b) The context free language can be for some terminal string ѡ є L (G)
converted into Greibach normal form c) Both (a) and (b)
c) The context free language is accepted by d) None of these
pushdown automata 29. Which of the following statement is false?
d) None of these a) A recursive language is also
25. 85. The context free grammar S → SS | a regular language

0S1 | 1S0 | ɛ generates b) A context free language is also

a) Equal number of 0’s and 1’s a regular language


c) A context free language is also recursive
b) Unequal number of 0’s and 1’s
enumerable language
c) Any number of 0’s followed by any
d) Both (a) and (b)
number of 1’s
30. The Grammar can be defined as: G=(V, ∑,
d) None of these
p, S) In the given definition, what does S
26. 86. Which of the following statement is
represents?
false?
a) Accepting State
a) In derivation tree, the label of
b) Starting Variable
each leaf node is terminal
c) Sensitive Grammar
d) None of these

19 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

31. What is the language of the following c) All of them.


grammar? d) None of them

S -> AB | BA | A | B
A -> aAa | aAb | bAa | bAb | a 34. Consider the following language,
B -> aBa | aBb | bBa | bBb | b
L = (an bn | n≥ 0).
a) {w I w ∈ {a,b}+}
If Lk represents the language L · L · · · L (k
b) { w | w is of form xxr or w is an odd
times L), where · is the concatenation
length string, where x ∈ { a, b}+ and xr
operation. Then which of the following
represents reverse of string x }
statements are true?
c) {w | w is not of form xx, where x ∈ {a,
b}+ } a) L2 is a CFL.
d) { w | w is a palindrome} b) Lk is a CFL.
c) L* is a CFL.
32. Which of the following statements are d) All of above
true? 35. Which of the following are CFLs?
a) Union of a regular language and a
CFL, is CFL.
b) Intersection of a regular language and a) Only A

a CFL, is CFL. b) Only B

c) Concatenation of a regular language c) Buth A and B.


and a CFL, is CFL. d) None of them.

d) All of the above is true

36. Consider the following grammar G


33. Consider the following operation defined
S-> abA
on a language A,
A-> baB
Suffix(A) = {v | uv ∈ A for some string u ∈ ∑*} B-> aA I bb
Prefix$(A) = {u | uv ∈ A for some string v ∈ ∑*} which of the following statements are true
Substring$(A) = {x | uxv ∈ A for some string with respect to G?
u, v ∈ ∑* } a) G is ambiguous.
If A is a CFL then which of the above are also b) G is unambiguous.
CFLs? c) L(G) is regular.
d) Both b and c
a) Only Suffix(A) and Prefix(A).
b) Only Substring(A).

20 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

37. Which of the following statements are b) A context free language is also a
true? regular language
a) CFLs are closed under union. c) A context free language is also
b) CFLs are closed under concatenation. recursive enumerable language
c) CFLs are closed under * (Kleene d) Both (a) and (b)
operation). 42. A context free language is called
d) All of above ambiguous if

a) It has two or more leftmost derivations


38. Consider the following language,
for some terminal string ѡ є L (G)
L = (w | w ∈ {0, 1}* and w is palindrome}. b) It has two or more leftmost derivations
Which of the following grammar for some terminal string ѡ є L (G)
generates the above language. c) Both (a) and (b)
d) None of these
a) S-> 0S0S I 1S1S I € 43. Which of the following statement is false?
b) S-> 0S0 | 1S1 | €
a) The context free language can be
c) S-> 0S0 | 1S1 | 0 | l | €
converted into Chomsky normal form
d) S-> 0S0 | 1S1 | 0 | l
b) The context free language can be
39. Push down automata accepts which
converted into Greibach normal form
language
c) The context free language is accepted
a) Context sensitive language by pushdown automata
b) Context free language d) None of these
c) Recursive language 44. The language L={0ᵐ1ᵐ0ᵐ| m ≥ 1} is a
d) None of these
a) Regular language
40. A context free grammar G is in Chomsky
b) Context free language
normal form if every production is of the
c) Both (a) and (b)
form
d) None of these
a) A → BC or A → A 45. While converting the context free
b) A → BC or A → a grammar into Greibach normal form,
c) A → BCa or B → b which of the following is not necessary
d) None of these
a) Elimination of null production
41. Which of the following statement is false?
b) Elimination of unit production
a) A recursive language is also a regular c) Converting given grammar in Chomsky
language normal form

21 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

d) None of these deterministic push down


automata(NPDA)
46. The context free grammar S → A111|S1, c) Deterministic single-tape Turing
A → A0 | 00 is equivalent to machine and Non-deterministic single-
tape Turing machine
a) {0ⁿ1ᵐ | n=2, m=3}
d) Single-tape Turing machine and multi-
b) {0ⁿ1ᵐ | n=1, m=5}
tape Turing machine
c) {0ⁿ1ᵐ | n should be greater than two
50. Consider the CFG with {S,A,B) as the
and m should be greater than four}
non-terminal alphabet, {a,b) as the
d) None of these
terminal alphabet, S as the start symbol
47. The context free grammar S → SS | 0S1 |
and the following set of production rules
1S0 | ɛ generates
S --> aB S --> bA
a) Equal number of 0’s and 1’s B --> b A --> a
b) Unequal number of 0’s and 1’s B --> bS A --> aS
c) Any number of 0’s followed by any B --> aBB A --> bAA
number of 1’s Which of the following strings is
d) None of these generated by the grammar?

48. Which of the following statement is false? a) aaaabb


b) aabbbb
a) In derivation tree, the label of each leaf
c) aabbab
node is terminal
d) abbbba
b) In derivation tree, the label of all nodes
except leaf nodes is a variable
c) In derivation tree, if the root of a sub
tree is X then it is called –tree
d) None of these

49. Which of the following pairs have


DIFFERENT expressive power?
a) Deterministic finite automata(DFA)
and Non-deterministic finite
automata(NFA)
b) Deterministic push down
automata(DPDA)and Non-

22 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

Answer Key
Unit-3
Question Answer Question No. Answer Question Answer Question Answer
No. No. No.
1 c 16 c 31 c 46 a
2 c 17 b 32 d 47 a
3 d 18 c 33 c 48 d
4 d 19 b 34 d 49 b
5 a 20 b 35 d 50 c
6 a 21 d 36 d
7 b 22 a 37 d
8 d 23 c 38 c
9 b 24 d 39 b
10 b 25 a 40 a
11 d 26 d 41 b
12 b 27 a 42 c
13 b 28 c 43 d
14 a 29 b 44 d
15 a 30 b 45 d

23 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

Unit-IV

1. PDA is more powerful than 6. The push down automata indicate the
a) Turing machine acceptance of input string in terms of
b) Finite automata a) Finial state
c) CFG b) Empty store
d) None of these c) Both (a) and (b)
2. Which operation can be applied on stack d) None of these
in PDA? 7. Which type of symbols contain in the
a) PUSH stack of PDA
b) POP a) Variable
c) No operation b) Terminal
d) All of these c) Both (a) and (b)
3. PDA can be represented with the help of d) None of these
a) Instantaneous description 8. The instantaneous description is PDA
b) Transition diagram shows
c) Transition table a) Present state
d) All of these b) Stack symbol
4. Which of the following statement is false? c) String to be processed
a) Let L is a language accepted by a PDA d) All of these
P then there exist a CFG G L such that 9. The symbol Z0 in formal definition of
L(G) =N(P) PDA is used for
b) If L is a CFL then there exists a push a) Stack symbol
down automata P accepting CFL L b) Input symbol
by empty stack i.e. L = N(P) c) Both (a) and (b)
c) If L is a language accepted by PDA A d) None of these
by final state there exist a PDA B that 10. A PDA chooses the next move based on
accepts L by empty stack such that L a) Current state
=L(A) = N(B) b) Next input symbol
d) All of these c) Both (a) and (b)
5. A push down automata is different than d) None of these
finite automata by 11. Pumping lemma for context free grammar
a) Its memory (stack) is used for
b) Number of states a) Proving certain languages are
c) Both (a) and (b) not context free
d) None of these b) Proving language is infinite

24 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

c) Both (a) and (b) a) Chomsky normal form grammar


d) None of these b) Greibach normal form grammar
12. If L1 & L2 are context free language then c) Both (a) and (b)
a) Their union is also d) None of these
a context free language 17. Pumping lemma
b) There concatenation is for context free language breaks the
also context free language strings into
c) Both (a) and (b) a) Two parts
d) None of these b) Three parts
13. Which of the following statement is false? c) Five parts
a) If L is context free language then L* d) Six parts
is also a context free language 18. In pumping lemma
b) If L1 and for context free language
L2 are context free language then a) We start by assuming the given
there intersection is not language is context free and then we
a context free language get contradict
c) If L1 and b) We first convert the given language into
L2 are context free language then regular language and then apply

there union is also steps on

a context free language c) Both (a) and (b)

d) None of these d) None of these

14. Context free grammar is closed under 19. The CYK algorithm constructs table from

a) Complement where we can conclude whether w is in L

b) Intersection a) O(n³) time

c) Both b) O(n²) time

d) None of these c) O(n) time

15. CYK algorithm is named CYK because it d) None of these

was invented by 20. The CYK algorithm is also known as

a) John Cocke, Tadao Kasami a) Membership algorithm

and Daniel H. Younger b) Pumping lemma

b) Jass Carry, Tom Kosami c) Both (a) and (b)

and Daniel Richy d) None of these

c) Cammy lenna, Yousaf, Kosami 21. A PDA machine configuration (p, w, y)

d) None of these can be correctly represented as:

16. The CYK algorithm start with a) (current state, unprocessed input, stack
content)
25 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

b) (unprocessed input, stack content, b) Null-Push Down Automata


current state) c) Nested Push Down Automata
c) (current state, stack content, d) All of the mentioned
unprocessed input) 27. A language is accepted by a push down
d) none of the mentioned automata if it is:
22. A DPDA is a PDA in which: a) regular
a) No state p has two outgoing transitions b) context free
b) More than one state can have two or c) both (a) and (b)
more outgoing transitions d) none of the mentioned
c) Atleast one state has more than one 28. Two-stack PDA accepts
transitions a) regular languaage
d) None of the mentioned` b) context free language
23. If the PDA does not stop on an accepting c) context sensitive language
state and the stack is not empty, the string d) Only regulat and context free
is: languages
a) rejected 29. L = {anbncn | n> 0} is accepted by
b) goes into loop forever a) FA
c) both (a) and (b) b) DPDA
d) none of the mentioned c) Two-stack PDA
24. A language accepted by Deterministic d) NPDA
Push down automata is closed under 30. CFG can be converted into
which of the following? a) PDA
a) Complement b) DPDA
b) Union c) NPDA with empty stack
c) Both (a) and (b) d) NPDA with final state
d) None of the mentioned
25. Which of the following automata takes 31. Which of the following statements are
stack as auxiliary storage? true?
a) Finite automata A. A PDA is an NFA with a stack.
b) Push down automata B. Size of the stack of a PDA is finite.
c) Turing machine C. PDAs and CFGs are equivalent.
d) All of the mentioned
26. NPDA stands for a) Only A and B
a) Non-Deterministic Push Down b) Only B and C
Automata c) Only A and C

26 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

d) None

32. What is the language accepted by the c) (A* U B*)* is a CFL but not a regular
following PDA? language.
d) A · B is a CFL but not regular.

35. Consider the following language,


A= (ww I w ∈ ∑+ },
a) {w | w ∈ {0, 1}+}
which of the following statements are true?
b) {w | w is of form xxr, where x ∈ {0,
1}+ } a) Both A and 𝐴̅ are CFLs.
c) { w | w is a palindrome) b) A is a CFL but 𝐴̅ is not a CFL.
d) { w | w is an odd length palindrome) c) 𝐴̅ is a CFL but A is not a CFL.
d) Both A and 𝐴̅ are not CFLs.
33. What is the language of the following
grammar? 36. Which of the following languages are
S -> aS1 bs3c| aS4bS2c CFLs?

S1 -> aS1b | € A= (wwr wr w | w ∈ ∑*).


B = (wwr xxr | w, x ∈ ∑*).
S2 -> bS2c | € c = {ai bi ak bl| i,j,k, l >= 0,(i + J) = (k + l)}

S3 -> S3c | € a) Only B.

S4 -> s4a | € b) Only A and B.


c) Only B and C.
i j k
a) {a b c | i +J >= k) d) All of them.
i j k
b) {a b c | i +J = k)
c) { ai bi ck I i = J = k)
d) { ai bi ck I i =J or j = k) 37. Which of the following statements are
true?

34. Consider the following languages A and B, a) An NFA has an equivalent DFA.

A = ( ai bj I i > j). b) An NPDA has an equivalent DPDA.

B = {bkal I k >l}. c) NFAs are more powerful that DFAs.

which of the following statement are true d) NPDAs are more powerful that

a) A.B is a regular language. DPDAs.

b) A* U B* is a regular language.

27 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

38. For a language A, consider the following, A → aS ∣ Sb


Suffix(A) = {v I uv ∈ A for some string u). Which of the following string are
which of the following statements are generated by above grammar?
true? a) a5 b5
a) If A is a CFL then Suffix( A) is also a b) a5 b5 a5
CFL. c) b5 a5
b) If A is a CFL then Suffix ( A) is not a d) a3 b5
CFL.
c) If A is a CFL then Suffix ( A) may or
42. Let A and B be two languages over
may not be a CFL.
alphabet Σ. Which of the following are
d) None of the above is true.
true?
a) if A is regular and B is CFL then A ∩
39. What is the language accepted by the
B is also CFL.
following PDA?
b) if A is regular and B is CFL then A ∪
B is also CFL.
c) if A not CFL and B is CFL then A ∩ B
will not be a CFL.
d) if A not CFL and B is CFL then A ∪ B
will not be a CFL
a) {aibic2i | i>=0}
43. What is the language accepted by
b) {aibjck | i,j,k >=0}
following PDA?
c) {aibjci+j | i ,j >=0}
d) {aibici | i>=0}

40. Which of the following are true?


a) PDA is a NFA with a stack.
b) PDA can store infinite amount of a) {an bn ∣ n ≥ 0}
information. b) {ww ∣ w ∈ {a, b}*}
c) There exist some languages for which c) {wwr ∣ w ∈ {a, b }* }
one can construct a CFG but not a d) {w ∣ w ∈ {a, b}* is even length
PDA. palindrome string}
d) None of the other choices.

41. Consider the following grammar, 44. Match the following grammars to the

S → A ∣ Sb ∣ a ∣ b languages they generate

28 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

a) (1,d)(2,a)(3,d)(4,c)
b) (1,b)(2,d)(3,c)(4,a)
c) (1,b)(2,c)(3,a)(4,d)
d) (1,d)(2,c)(3,a)(4,b)

Answer Key
Unit-4
Question No. Answer Question No. Answer Question Answer
No.
1 b 16 a 31 c
2 d 17 c 32 d
3 d 18 a 33 d
4 d 19 a 34 d
5 a 20 a 35 c
6 c 21 a 36 c
7 c 22 a 37 a, d
8 d 23 a 38 a
9 a 24 a 39 c
10 c 25 b 40 a,b
11 a 26 a 41 a,d
12 c 27 c 42 a,b
13 d 28 c 43 c,d
14 c 29 c 44 b
15 a 30 c

29 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

Unit-V
1. Turing machine was invented by: c) Offline turing machine
a) Alan Turing d) Both (a) and (b)
b) Turing man 7. Which of the following statement is
c) Turing taring worng?
d) None of these a) Turing machine is a simple
2. Turing machine is more powerful than: mathematical model of

a) Finite automata general purpose computer.


b) Turing machine is more powerful
b) Push down automata
than finite automata.
c) Both (a) and (b)
c) Turing machine can be simulated
d) None of these
by a general purpose computer.
3. In one move the turing machine:
d) All of these
a) May change its state 8. An instantaneous description of
b) Write a symbol on turing machine consists of
the cell being scanned. a) Present state and input to be
c) Move the head one position left processed
or right b) Present state and entire input to be
d) All of the above processed

4. Turing machine can be represented c) Present input only

using: d) None of these

a) Transition table 9. Which of the following statement is

b) Transition diagram false?


a) turing machine was developed by
c) Instantaneous description
Alan turing
d) All of these
b) PDA is less powerful than
5. Which of the following is an extension
turing machine
to the basic model of turing machine:
c) Both (a) and (b)
a) Multitude turing machine d) None of these
b) Multi head turing machine 10. In multi head turing machine there are
c) Offline turing machine a) More than one heads of the
d) All of the above turing machine
6. Which of the following is the restricted b) More than one input tapes of
model of turing machines turing machine

a) Turing machine with semi- c) Similar to the basic model of


turing machine
infinite tape
d) All of these
b) Multi stack machine

30 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

11. A turing machine that is able to 17. Which of the following are the models
simulate other turing machines: equivalent to Turing machine?
a) Nested Turing machines a) Multi tape turing machine
b) Universal Turing machine b) Multi track turing machine
c) Counter machine c) Register machine
d) None of the mentioned d) All of the mentioned
12. Which of the problems are unsolvable? 18. Which among the following is incorrect
a) Halting problem for o-machines?
b) Boolean Satisfiability problem a) Oracle Turing machines
c) Both (a) and (b) b) Can be used to study decision
d) None of the mentioned problems
13. Which of the following a turing c) Visualizes Turing machine with a
machine does not consist of? black box which is able to decide
a) input tape cerain decion problems in one
b) head operation
c) state register d) None of the mentioned
d) none of the mentioned 19. RASP stands for:
14. The value of n if turing machine is a) Random access storage program
defined using n-tuples: b) Random access stored program
a) 6 c) Randomly accessed stored program
b) 7 d) Random access storage
c) 8 programming
d) 5 20. State true or false:
15. If d is not defined on the current state Statement: RASP is to RAM like UTM
and the current tape symbol, then the is to turing machine.
machine ______ a) true
a) does not halts b) false
b) halts 21. State true or false:
c) goes into loop forever Statement: We can use the finite
d) none of the mentionedTBD control of turing machine to hold a
16. Statement: Instantaneous descriptions finite amount of data
can be designed for a Turing machine. a) False
State true or false: b) True
a) true c) May True
b) false d) May False

31 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

22. A turing machine has ____________ 27. A multitape turing machine is


number of states in a CPU ________ powerful than a single tape
a) Infinite turing machine
b) Finite a) More
c) May be finite b) Less
d) none c) Equal
23. A multi track turing machine can d) none of the mentione
described as a 6-tuple (Q, X, S, d, q0, 28. Statement 1: Multitrack Turing
F) where X represents machine. Statement 2: Gamma is
a) input alphabet Cartesian product of a finite number of
b) tape alphabet finite sets. Which among the following
c) shift symbols is the correct option?
d) none of the mentioned a) None
24. State true or false: b) Statement 1 is the assertion and
Statement: Two track turing machine is Statement 2 is the reason
equivalent to a standard turing machine c) Statement 1 is the reason and
a) False Statement 2 is the assertion
b) True d) Statement 1 and Statement 2
c) May True are independent from each
d) May False other
25. According to Chomsky hierarchy, 29. State true or false:
which of the following is adopted by Statement: We can use the finite
Recursively Ennumerable languages control of turing machine to hold a
a) Type 0 finite amount of data.
b) Type 1 a) False
c) Type 2 b) True
d) Type 3 c) May True
26. A turing machine with several tapes in d) May False
known as: 30. If L and L' are recursively enumerable,
a) Multi-tape turing machine then L is
b) Poly-tape turing maching a) Recursive
c) Universal turing machine b) Regular
d) All of the mentioned c) Context-free
d) Context-sensitive

32 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

31. Halting non-deterministic Turing machine 33. Let L be a language over ∑ Define the
(TM) is one which halts on all following operations:
computation paths. Let GM,X denote the Permute(L) = (w I w is a permutation of a
configuration graph of a nondeterministic string x ∈ L}
Turing machine M with respect to a string Halfswap(L) = {w I w = xy where |x|= |Y |
x. Which of the following statements are and yx ∈ L)
true? Which one of the following statements is
a) Every node has in-degree at most one true?
in GM,X if Mis a halting TM.
a) Decidable languages are not closed
b) M is a non-halting TM if there exists a
under Permute and Half swap
pair of two nodes in GM,X which are
b) Decidable languages are closed under
reachable from the starting
Permute but not under Half swap
configuration and are also reachable
c) Decidable languages are closed under
from each other.
Hal/swap but not under Permute
c) There exists at least one node with in-
d) Decidable languages are closed under
degree more than one in GM,X if M is a
both Permute and Hal/swap
non-halting TM.
d) Every node has in-degree exactly one
in GM,X if M is a non-hatting TM. 34. Let L1 be a decidable language and L2 be a
Turing recognizable but not decidable
language. Which of the following
32. Which of the following statements are
statements are true?
true?
a) L2 \ L1 is a Turing recognizable
a) Regular languages are a subset of the
language.
set of languages accepted by TMs
b) L1 ∩ L2 is a decidable language.
which do not write anything on the
c) L1 ∩ L2 is a Turing recognizable
tape.
language.
b) Every decidable language can be
d) L1 \ L2 is a decidable language.
accepted by a DFA with a priority
queue.
c) For every TM M there exists another 35. Consider the following statements:
M' which doesn't write the blank S1 = For every decidable language L over ∑
symbol such that L(M) = L(M'). there exists a single tape deterministic halting
d) All of above TM M with T = ( Ц) U ∑ and at most 10 states,
where T is the tape alphabet of M, such that L =
L(M).

33 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

S2 = For every decidable language L there


exists a single tape deterministic halting TM M
Which one of the following is correct?
which changes the content of each cell (with
input and blank symbols both) at most once a) L1 is not decidable and L2 is Turing
during the computation. recognizable.
b) L1 is decidable and L2 is not Turing
Which of the following is correct?
recognizable.
a) Both SI and S2 are true. c) L1 is decidable and L2 is Turing
b) S1 is true but S2 is false. recognizable.
c) S1 is false but S2 is true. d) L1 is not decidable and L2 is not
d) Both SI and S2 are false. Turing recognizable.

36. Let M be a deterministic halting TM and x 38. Let MI and Mi be two context-free but
be an input. Which of the following non-regular languages. Which of the
statements are true? following statements are correct?
a) Every configuration of M with respect a) M1 ∩ M2 is decidable.
to x goes to another configuration. b) M1 ∩ M2 is not necessarily decidable.
b) No configuration of M with respect to x c) M1 \ M2 is recognizable.
can go to the starting configuration. d) M1 \ M2 is not necessarily
c) There can be more than two recognizable.
configurations of M with respect to x
which do not go to another
39. An alternate TM is a deterministic Turing
configuration.
machine which cannot make two
d) There are exactly two configurations of
successive left moves or two successive
M with respect to x which do not go to
right moves of the head. Which of the
another configuration.
following is correct? An alternate TM is a
deterministic Turing machine which
37. A Turing machine's description can be cannot make two successive left moves or
encoded as a binary string. Let ( M) denote two successive right moves of the head.
the description of a TM M in the binary Which of the following is correct?
form. Consider the following languages: a) Atternate TM accepts all and only
L1 = ( (M) I M's head doesn't move beyond the regular languages.
100th cell on the tape on any input.) b) Atternate TM accepts all and only
L2 = ( (M) I L(M) is non-empty.} DCFLs.

34 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

c) Atternate TM accepts all and only c) L is not Turing recognizable.


CFLs. d) L̅ is undecidable.
d) None of the above.

43. Consider the following languages:


40. Consider the following languages:
L1= ( (M) | M is a TM and L(M) is finite.)
L1 = { (G) I G is a CFG and L(G) is finite. }
L2 = ( (M) | M is a TM and L(M) is the set of
L2 = { (D) I D is a DFA and x, rev(x) ∈ L(D)
palindromic strings. }
for at least one string x. }
Which of the following statement is correct?
Which of the following is correct?
a) L1 is decidable but L2 is undecidable.
a) Both LI and L2 are decidable.
b) L2 is decidable but L1 is undecidable.
b) Both LI and L2 are not decidable.
c) Both L1 and L2 are decidable.
c) Only LI is decidable.
d) Both L1 and L2 are undecidable.
d) Only L2 is decidable.

44. Let L1 be a language which can be


41. Consider the following languages:
reduced to another language L2. Which of
Li = {(D) | D is a DFA and L(D) is the set of
the following are correct?
binary strings with 101 as suffix.}
a) If L1 is decidable then L2 is decidable.
L2 = {(M) | M is a TM which accepts rev(x) if
b) If L1 is undecidable then L2 is
it accepts x.)
undecidable.
Which of the following statement is correct? c) If L1 is regular then L2 is regular.
a) L1 is decidable but L2 is not. d) If L2 is regular then L2 is regular.
b) L2 is decidable but L1 is not.
c) Both L1 and L2 are decidable.
45. Which of the following statement is true
d) Both L1 and L2 are undecidable.
about the mapping of integers on the set of
TMs described in this week's lectures?
a) The mapping is one-one and onto.
42. Consider the following language: b) The mapping is one-one but not onto.
L={(D1,D2) | D1 and D2 are two DFAs L(D1) c) The mapping is onto but not one-one.
⊂ L(D2) } Which of the following statement is d) The mapping is neither one-one nor
correct? (C denotes the proper subset.) onto.
a) L is decidable.
b) L is Turing recognizable but
46. Consider the following languages:
undecidable.

35 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

L1= {(D1,D2) | D1 and D2 are DFAs and | recognizable


L(D1)| < |L(D2)| } c) L1 is not decidable and L2 is
L2 = {(M1,M2) | M1 and M2 are TMs and recognizable
| L(M1)| < |L(M2)|.} d) L1 is not decidable and L2 is not
Which of the following option is correct? recognizable
a) Both L1 and L2 are decidable.
b) Both L1 and L2 are undecidable.
49. Let L1 and L2 be two decidable languages.
c) Only L1 is decidable.
Let and be two recognizable but not
d) Only L2 is decidable.
decidable languages. Which of the
47. Which of the following statement is true in
following statements are false?
a nondeterministic halting TM ?
a) (L1 ∪ L2) ∖ L3 is a recognizable
a) Tape alphabet is same as the input
language
alphabet ∑
b) L1 ∖ (L3 ∪ L4) is a recognizable
b) x ∈ L(M) if and only if M accepts
language
on exactly one computation path
c) L3 ∖ L1 is a decidable language
c) On an input x, M halts on all
d) All of Above
computation path
50. Let M be a deterministic TM. If it is
d) If x ∈ L(M) then halts and accept
known that M does not halt on an input x,
on at least one computation paths
then which of the following statement is
but may or may not halt on other
necessarily true?
paths
a) There are finitely many different
configurations of M with respect to
48. Consider the following languages: x
L1 = {< M >∣ M’ s head always moves to b) There are infinitely many different
right on every transition} configurations of M with respect to
L2 = {< M >∣ L(M) contains at least 5 x
strings} c) There is exactly one configuration
of M with respect to x
Which of the following is correct?
d) Every configuration of M with

a) L1 is decidable and L2 is recognizable respect to x yield another


b) L1 is decidable and L2 is not configuration

36 University Academy
THEORY OF AUTOMATA AND FORMAL LANGUAGES (KCS-402) 2020-21

Answer Key
Unit-5
Question Answer Question Answer Question Answer Question Answer
No. No. No. No.
1 a 16 a 31 b 46 c
2 b 17 d 32 d 47 c
3 d 18 d 33 d 48 a
4 d 19 b 34 a 49 d
5 d 20 a 35 c 50 d
6 d 21 b 36 d
7 d 22 a 37 a
8 a 23 b 38 a, c
9 c 24 b 39 d
10 b 25 a 40 a
11 b 26 a 41 a
12 c 27 a 42 a
13 d 28 b 43 d
14 b 29 a 44 b
15 b 30 a 45 c

37 University Academy

You might also like