automata MCQ
automata MCQ
B. Tech CSE
Year & Semester: 3rd & 5th
Subject: Automata Theory
a) True
b) False
3. Let L be a language defined over an alphabet Σ, then the language of strings, defined over
Σ, not belonging to L, is called Complement of the language L, denoted by Lc or L’.
a) True
b) False
b) Regular Expression
c) String
d) Word
5. For a certain language L, the complement of Lc is the given language L i.e. (Lc)c = Lc
a) True
b) False
a) Transition Graph of L
b) Regular expression of L
c) Complement of L
d) Finite Automata of L
a) True
b) False
9. If L1 and L2 are regular languages, then these can be expressed by the corresponding FAs.
a) True
b) False
10. The language that can be expressed by any regular expression is called a Non regular
language.
a) True
b) False
11. The languages -------------- are the examples of non regular languages.
a) PALINDROME and PRIME
12. Let L be any infinite regular language, defined over an alphabet Σ then there exist three
strings x, y and z belonging to Such that all the strings of the form XY^ n Z for n=1,2,3, …
are the words in L. called.
a) Complement of L
b) Pumping Lemma
c) Kleene’s theorem
d) None in given
13. Languages are proved to be regular or non regular using pumping lemma.
a) True
b) False
d) FACTORIAL
15. If, two strings x and y, defined over Σ, are run over an FA accepting the language L, then x
and y are said to belong to the same class if they end in the same state, no matter that state is
final or not.
a) True
b) False
18. The part of an FA, where the input string is placed before it is run, is called _______
a) State
b) Transition
c) Input Tape
d) Output Tape
19. In new format of an FA , This state is like dead-end non final state
a) ACCEPT
b) REJECT
c) START
d) READ
20. For language L defined over {a, b}, then L partitions {a, b}into …… classes
a) Infinite
b) Finite
c) Distinct
d) Non-distinct
c) One character can be pushed and any no. of characters can be popped
d) Any no. of characters can be pushed and any no. of characters can be popped
a) n=1, 2, 3, 4……….
b) n=0, 1, 2, 3, 4……….
c) n=…….-3,-2,-1, 0, 1, 2, 3, 4……
d) n=…….-3,-2,-1, 1, 2, 3, 4……
24. The PDA is called non-deterministic PDA when there are more than one out going edges
from……… state
a) START or READ
b) POP or REJECT
c) READ or POP
d) PUSH or POP
25. There is a problem in deciding whether a state of FA should be marked or not when the
language Q is infinite.
a) True
b) False
26. If an effectively solvable problem has answered in yes or no, then this solution is called
---------
a) Decision procedure
b) Decision method
c) Decision problem
d) Decision making
d) None of given
28. To examine whether a certain FA accepts any words, it is required to seek the paths from
------- state.
a) Final to initial
b) Final to final
c) Initial to final
d) Initial to initial
29. Grammatical rules which involve the meaning of words are called ---------------
a) Semantics
b) Syntactic
c) Both a and b
d) None of given
30. Grammatical rules which do not involve the meaning of words are called ---------------
a) Semantics
b) Syntactic
c) Both a and b
d) None of given
31. The symbols that can’t be replaced by anything are called -----------------
a) Productions
b) Terminals
c) Non-terminals
d) All of above
32. The symbols that must be replaced by other things are called __________
a) Productions
b) Terminals
c) Non-terminals
d) None of given
a) Productions
b) Terminals
c) Non-terminals
d) None of given
a) Small
b) Capital
c) Both a and b
d) None of the above
a) Small
b) Capital
c) Bold
d) None of the above
36. The language generated by __________ is called Context Free Language (CFL).
a) FA
b) TG
c) CFG
d) TGT
37. Σ = {a,b} Productions S→XaaX X→aX X→bX X→Λ
This grammar defines the language expressed by___________
a) (a+b)aa(a+b)
b) (a+b)a(a+b)a
c) (a+b)aa(a+b)aa
d) (a+b)aba+b)
38. S → aXb|b XaX → aX|bX|Λ The given CFG generates the language in English
__________
39. The CFG is not said to be ambiguous if there exists atleast one word of its language that can
be generated by the different production trees,
a) TRUE
b) FALSE
d) None of given
a) TRUE
b) FALSE
a) TRUE
b) FALSE
43. The productions of the form nonterminal → one nonterminal, is called _________
a) Null production
b) Unit production
a) True
b) False
47. Let FA3 be an FA corresponding to FA1+FA2, then the initial state of FA3 must correspond
to the initial state of
Select correct option:
a) FA1 only
b) FA2 only
c) FA1 or FA2
d) FA1 and FA2
a) TG only
b) GTG only
c) RE only
d) All of the given
52. If r1 = (aa + bb) and r2 = (a + b) then the language (aa + bb)(a + b) will be generated by
Select correct option:
a) (r1)(r2)
b) (r1 + r2)
c) (r2)(r1)
d) (r1)
a) Must be finite
b) Must be infinite
d) False
56.
This statement is
a) True
b) False
c) Depends on language
d) None of these
58.
c) (aa+bb+(ab+ba)(aa+bb)(ab+ba))
d) None of these
60. If L1 and L2 are expressed by regular expressions r1 and r2, respectively then the language
expressed by r1 + r2 will be _________
a) Regular
b) Ir-regular
c) Can’t be decided
d) Another Language which is not listed here
61.
c) FA
d) TG
62. In FA, if one enters in a specific state but there is no way to leave it, then that specific state is
called
a) Dead State
b) Waste Basket
c) Davey John Locker
d) All of these
a) Regular
b) Non-regular
c) Regular but finite
d) None of the given
c) Whether two given regular expressions of a regular language are equivalent or not
d) None of these
a) One terminal
b) More than one terminal
c) One non-terminal
d) Terminals and non-terminals
67.
For which of the following application regular expressions cannot be used?
A Designing compilers
B Developing text editors
C Simulating sequential circuits
D All of these
68.
FSM can recognize
A Any grammar
B Only CFG
C Any unambiguous grammar
D Only regular grammar
69. Which of the following is the most general phase structured grammar ?
a) Regular
b) Context Sensitive
c) Context Free
d) None of the above
70.
The language accepted by finite automata is
a) Context Free
b) Regular
c) Non Regular
d) None of the above
a) n states
b) (n+1) states
c) (n+2) states
d) 2n states
74. Which of the following permanent database that has an entry for each terminal
symbol ?
a) Literal Table
b) Identifier Table
c) Terminal Table
d) Source Table
77. Finite automata are used for pattern matching in text editors for
a) Compiler lexical analysis
b) Programming in localized application
c) Both A and B
d) None of the above
78. Any syntactic construct that can be described by a regular expression can also
be described by a
a) Regular Grammar
b) Context Sensitive
c) Context Free
d) None of the above
80. Given the language L = {ab, aa, baa}, which of the following strings are in L*?
1) abaabaaabaa
2) aaaabaaaa
3) baaaaabaaaab
4) baaaaabaa
a) 1,2 and 3
b) 2,3 and 4
c) 1,2 and 4
d) 1,3 and 4
a) Union
b) Intersection
c) Complementation
d) None of the above
a) ab*(b + aa*b)*
b) a*b(b + aa*b)*
c) a*b(b* + aa*b)
d) a*b(b * + aa*b)*
85. CFG can be recognized by a
a. 1,4
b. 1,3
c. 2
d. 3
99. Push down machine represents
a. Type 0 Grammar
b. Type 1 Grammar
c. Type 2 Grammar
d. Type 3 Grammar
100. Which of the following statements is false?
a. If a language is not recursively enumerable then its complement cannot be
recursive
b. The family of recursive languages is closed under union
c. The family of recursive languages is closed under intersection
d. None of the above
101.
Consider the following statements :
I. Recursive languages are closed under complementation.
II. Recursively enumerable languages are closed under union.
III. Recursively enumerable languages are closed under complementation.
Which of the above statements are true ?
A I only
B I and II
C I and III
D I and III
102.
103.
Which of the following statements is false?
A Every context sensitive language is recursive
B Every recursive language is context sensitive
C Both A and B
D None of the above
104.
Pumping lemma is used for proving
105.
The logic of pumping lemma is a good example of
A The pigeon hole principle
B Divide and conquer method
C Iteration
D Recursion
109. 5. Let the class of language accepted by finite state machine be L1 and the class of
languages represented by regular expressions be L2 then
a) L1<l2
b) L1>=L2
c) L1 U L2 = .*
d) L1=L2
111.
. Which of the following is true?
a) Every subset of a regular set is regular
b) Every finite subset of non-regular set is regular
c) The union of two non regular set is not regular
d) Infinite union of finite set is regular
112.
. L and ~L are recursive enumerable then L is
a) Regular
b) Context free
c) Context sensitive
d) Recursive
113. . Regular expressions are closed under
a) Union
b) Intersection
c) Kleen star
d) All of the mentioned
114.
All strings having equal number of a and b can be recognized by
a) PDA
b) DFA
c) NDFA
d) All of these
115.
Which of the following statements is/are FALSE?
(1) For every non-deterministic Turing machine, there exists an equivalent
deterministic Turing machine.
(2) Turing recognizable languages are closed under union and complementation.
(3) Turing decidable languages are closed under intersection and complementation
(4) Turing recognizable languages are closed under union and intersection.
a) 1 and 4 only
b) 1 and 3 only
c) 2 only
d) 3 only
116.
Which of the following is not true?
Set of regular languages over a given alphabet set,is not closed under
A. Union
B. Complementation
C. Intersection
D. None of the above
118.
A. Read/write
B. Input tape
C. Finite state control
D. All of these
119.
The behavior of a NFA can be stimulated by DFA
A. always
B. sometimes
C. never
D. depend on NFA
120.
How many states can a process be in ?
A. 2
B. 3
C. 4
D. 5
121.
Which of the following is the most phase structured grammar?
A. Regular
B. Context free
C. Context sensitive
D. None of the above
123.
The language accepted by finite automata is
A. Context free
B. Regular
C. Non regular
D. None of these
124.
CSG can be recognized by
125.
Which is not the correct statement(s) ?
(i) Every context sensitive language is recursive.
(ii) There is a recursive language that is not context sensitive.
126.
Context free languages are not closed under
A. Union
B. Concatenation
C. Closure
D. Iteration
127.
Contex-free Grammar (CFG) can be recognized by
128.
Two finite states are equivalent if they
129.
Which of the following statements is false?
A. A turing machine is more powerful than finite state machine because it has no finite
state
B. A finite state machine can be assumed to be a turing machine of finite tape length
without rewinding capability and undirectional tape movement
C. Both A and B
D. None of the above
130.
Which of the following statements is false?
131.
The logic of pumping lemma is a good example of
132.
Given the following statements :
(i) The power of deterministic finite state machine and nondeterministic finite
state machine are same.
(ii) The power of deterministic pushdown automaton and nondeterministic
pushdown automaton are same.
133.
A pushdown automaton is different than a finite automaton by
A. A read head
B. A memory in the form of stack
C. A set of states
D. All of the above
134.
FORTRAN is a
A. Regular language
B. Context free language
C. Context sensitive language
D. Turing machine
135.
Which of the following problem is decidable?
1. Does a given programm ever produce an output?
2. If L is a CFL,then, L is also Context Free?
3. If L is a regular Language,then, L is also Regular?
4. If L is a Recursive language,then, L is also Recursive?
A. 1,2,3,4
B. 1,2
C. 2,3,4
D. 3,4
136.
Any syntactic construct that can be described by a regular expression can also be
described by a
137.
Context free language can be recognized by
138.
The classic formalization of generative grammars first proposed by
A. Alexender
B. Bill Gates
C. Noam Chomsky
D. Charles Babbage
139.
A PDM behaves like a TM when the number of auxiliary memory it has is
A. Zero
B. One or more
C. Two or more
D. None of these
140.
A. A
B. B
C. C
D. D
141.
Given the language L = {ab, aa, baa}, which of the following strings are in L*?
1) abaabaaabaa
2) aaaabaaaa
3) baaaaabaaaab
4) baaaaabaa
A. 1, 2 and 3
B. 2, 3 and 4
C. 1, 2 and 4
D. 1, 3 and 4
142.
Which of the following is most powerful?
A. DFA
B. NDFA
C. 2PDA
D. DPDA
143.
Push down machine represents
A. Type 0 Grammar
B. Type 1 grammar
C. Type-2 grammar
D. Type-3 grammar
144.
A push Down Machine behaves like a Turing Machine when number of auxiliary
memory it has
A. 2
B. 1
C. 0
D. 4
145.
Which of the following statements is false?
146.
Finite automata are used for pattern matching in text editors for
147.
If two finite state machines are equivalent they should have the same number of
A. States
B. Edges
C. States and edges
D. None of these
148.
If every string of a language can be determined whether it is legal or illegal in finite
time the language is called
A. Decidable
B. Undecidable
C. Interpretive
D. Non deterministic
149.
The unit production is
Terminal --> Terminal
Terminal --> Non Terminal
C) Non terminal --> Terminal
D) Non terminal --> Non Terminal
150.
The input string is placed, before it runs, in
a. Stack
b. Memory
c. Tape
d. Ram
151.
The CFG is said to be ambiguous if there exist at least one word of its language that can
production trees
a. One
b. Two
c. More than one
d. At most one
152.
A _________ is the one for which every input string has a unique path through the
machine.
a. deterministic PDA
b. nondeterministic PDA
c. PUSHDOWN store
d. Input Tape
153.
For language L defined over {a, b}, then L partitions {a, b}* into …… classes
a. Infinite
b. Finite
c. Distinct
d. Non-distinct
154.
Let L be any infinite regular language, defined over an alphabet Σ then there exist three
strings x, y and z belonging to Σ* such that all the strings of the form for n=1,2,3, … are the
words in L. called.
a. Complement of L
b. Pumping Lemma
c. Kleene’s theorem
d. None in given
168. X + Y read as
a) X or Y
b) X plus Y
c) Either X or Y
d) X and Y
169. (PQ)*P=?
a) Q(pp)*
b) P(QP)*
c) P(P+Q)
d) Q(Q+P)
170. (P+Q)*=(P*Q*)*=?
a) (P*+Q*)*
b) (P*+Q)*
c) (P+Q)**
d) (Q*+P*)**
171. The regular expression which accept all strings beginning or ending with either 01
and 10 is
a) 01+ 01 + 10+
b) (01+10)(0+1)* + (0+1)*(01+10)
c) (0+1)*(01+10)
d) (01+10)(0+1)* + (0+1)*
172.
a) Λ
b)
c) ɛ
d) ₵
173. According to the Arden’s Theorem the equation in R is R=Q+RP has a unique Solution given by
a) R=Q*P
b) Q=R*P
c) R=QP*
d) P=QP*
174. The unique solution R=QP* for the equation R=Q+RP is given by
a) Arden
b) Noam Chomsky
c) Ackerman
d) None of the above
175. We can apply the Arden’s theorem only when
a) FA doesn’t contain any Λ-move
b) The given Finite Automata contains only one start state
c) Both a and b
d) None of the above
176. Kleen Star of “ a “ can be written as
a) *a
b) a*
c) =a*
d) A=*
177. The tuples of a Grammar are
a) 4
b) 5
c) 3
d) 6
178. Regular grammar is known as
a) Type-0
b) Type-1
c) Type-2
d) Type-3
179. Unrestricted grammar is known as
a) Type-0
b) Type-1
c) Type-2
d) Type-3
180. Context Sensitive grammar is known as
a) Type-0
b) Type-1
c) Type-2
d) Type-3
181. Context Free grammar is known as
a) Type-0
b) Type-1
c) Type-2
d) Type-3
182. In Chomsky Hierarchy, the inner most layer contains______ grammar.
a) Type-0
b) Type-1
c) Type-2
d) Type-3
183. Example of NP-complete problem is______
a) SHORTEST PATH
b) UNARY KNAPSACK
c) EULER PATH
d) TRAVELING SALESMAN PROBLEM
185. Proving that a language A is not regular using Pumping Lemma, the first condition is
a) XYiZ ϵ A
b) XYZi ϵ A
c) XiYZ ϵ A
d) XYiZ ϵ Σ
217) Consider three problems P1, P2 and P3. It is known that P1 has polynomial time solution
and P2 is NP-complete and P3 is in NP. Which one of the following is true.
c. P3 is NP complete if P2 is reducible to P3
218) Let L and be a language and its complement. Which one of the following possibilities will not
hold?
a. L and are recursive
b. L is recursively enumerable but not recursive is not recursively enumerable
c. L and are not recursively enumerable
d. L and are recursively enumerable but not recursive
219) Consider S → SS|a.
a. 3
b. 5
c. 7
d. 14
c. given two arbitrary context-free grammar, G1 and G2, it is undecidable with L(G1) = L(G2)
d. given two regular grammars G1 and G2, it is undecidable whether L(G1) = L(G2)
221) Two of the following four regular expressions are equivalent. Which two?
i. (00)* (0 + ε)
ii. (00)*
iii. 0*
iv. 0(00)*
a. r(*) = r*
b. (r*s*)* = (r + s)*
c. (r + s)* = r* + s*
d. r*s* = r* + s*
a. union
b. homomorphism
c. complementation
d. concatenation
a. I only
b. I and II
c. I and III
d. II and III
227) Consider a language L for which there exists a Turing machine (TM), T, that accepts every word
in L and either rejects or loops for every word that is not in L. The language L is
a. NP hard
b. NP complete
c. recursive
d. recursively enumerable
228) Which of the following strings is not generated by the following grammar? S → SaSbS|ε
a. aabb
b. abab
c. aababb
d. aaabb
229) Which of the following is not primitive recursive but partially recursive?
a. McCarthy’s function
b. Riemann function
c. Ackermann’s function
d. Bounded function
a. CFL
b. CSL
c. recursive
d. regular