100% found this document useful (1 vote)
985 views13 pages

Comprehensive FLAT Question Bank

Uploaded by

Abhinav S
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
100% found this document useful (1 vote)
985 views13 pages

Comprehensive FLAT Question Bank

Uploaded by

Abhinav S
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
You are on page 1/ 13

Comprehensive-FLAT-Question-Bank

For more notes visit

https://rtpnotes.vercel.app

Qno Question Answer


1 Which language is the most restrictive? B
a) Context Free b) Regular c) Context Sensitive d)
None
2 The language accepted by a Push down Automata: C
A) Type0
B) Type1
C) Type2
D) Type3
3 All the regular languages can have one or more of D) i, ii, iii, iv
the following
descriptions:

i) DFA ii) NFA iii) e-NFA iv) Regular Expressions


Which of the following are correct?
A) i, ii, iv
B) i, ii, iii
C) i, iv
D) i, ii, iii, iv
4 Which of the following are non regular? None of the
a) The set of strings in {a,b} with an even number of mentioned
b’s
b) The set of strings in {a, b, c} where there is no c
anywhere to the left
of a
c) The set of strings in {0, 1}* that encode, in binary,
an integer w that is
a multiple of 3. Interpret the empty strings e as the
number 0.
d) None of the mentioned
5 Recursively enumerable languages are not closed C
under
A) Union
B) Homomorphism
Qno Question Answer
C) Complementation
D) Concatenation
6 If all the production rules have single non - terminal A
symbol on the left
side, the grammar defined is :
a.
context free grammar
b.
context sensitive grammar
c.
unrestricted grammar
d.
phrase grammar
7 L = (an bn an | n = 1,2,3) is an example of a language D
that is
A.context free
B.not context free
C.not context free but whose complement ic CF
D.both(A)and(C)
8 A grammar whose productions are of the form A → A
BC is in what
normal form?
(A) Chomsky normal form
(B) Greibach normal form
(C) Both (A) and (B)
(D) Neither (A) nor (B)
9 Which of the technique can be used to prove that a D
language is
non regular?
a) Ardens theorem
b) Pumping Lemma
c) Ogden’s Lemma
d) None of the mentioned
10 Which of the technique can be used to prove that a B
language is
non regular?
a) Ardens theorem
b) Pumping Lemma
c) Ogden’s Lemma
d) None of the mentioned
11 Let N be an NFA with n states. Let k be the number of D
states of a
minimal DFA which is equivalent to N. Which one of
Qno Question Answer
the following is
necessarily true? (A) 𝑘 ≥ 2 𝑛 (B) 𝑘 ≥ 𝑛 (C) 𝑘 ≤ 𝑛 2 (D) 𝑘
≤ 2^n
12 A language L is accepted by FSA if it is: D
A)CFL
B)CSL
C)Recursive
D)Regular
13 Which of the following denotes Chomskian hiearchy? A
[A] REG ? CFL ? CSL ? type0
[B] CFL ? REG ? type0 ? CSL
[C] CSL ? type0 ? REG ? CFL
[D] CSL ? CFL ? REG ? type0
14 Which of the following regular expression identity is B
true ?
a) r(*) = r*
b) (r*s*)* = (r+s)*
c) (r+s)* = r* + s*
d) r*s* = r* + s*
15 Consider the following languages over the alphabet Σ C
= {0,1,c}

Here wr is the reverse of the string w.


Which of these languages are deterministic Context-
free languages?
(A) None of the languages
(B) Only L1
(C) Only L1 and L2
(D) All the three languages
16 Grammars that can be translated to DFAs: B
a. Left linear grammar
b. Right linear grammar
c. Generic grammar
d. All of these
17 Which of the following statements is true? B
A) If a language is context free it can always be
accepted by a
Qno Question Answer
deterministic push-down automaton.
B) The union of two context free language is context
free
C) The intersection of two context free languages is
context free
D) The complement of a context free language is
context free
18 An e-NFA is ___________ in representation. B
a) Quadruple
b) Quintuple
c) Triple
d) None of the mentioned
19 Which of the following does not have left recursions? B
a) Chomsky Normal Form
b) Greibach Normal Form
c) Backus Naur Form
d) All of the mentioned
20 Write the regular expression of the language A
L={€,ab,abab,ababab,.......}
a) (ab)*
b) (a,b)*
c) (a)*(b)*
d) ab*
21 If f : {a, b}* —> (a, b}* be given by f (n) = ax A
for every
value of n ∈ (a, b}, then f is
A.one to one not onto
B.one to one and onto
C.not one to one and not onto
D.not one to one and onto
22 A CFG is not closed under D
a) Dot operation
b) Union Operation
c) Concatenation
d) Iteration
23 If L1′ and L2′ are regular languages, then L1.L2 will be A
a) regular
b) non regular
c) may be regular
d) none of the mentioned
24 Given the following statements: D
S1: Every context-sensitive language L is recursive.
Qno Question Answer
S2: There exists a recursive language that is not
context sensitive.
Which statement is correct?

a. S1 is not correct and S2 is not correct


b. S1 is not correct and S2 is correct
c. S1 is correct and S2 is not correct
d. S1 is correct and S2 is correct

25 Grammars that can be translated to DFAs B


a. Left linear grammar
b. Right linear grammar
c. Generic grammar
d. All of these
26 Which of the following are non regular? D
a) The set of strings in {a,b} with an even number of
b’s
b) The set of strings in {a, b, c} where there is no c
anywhere to the left
of a
c) The set of strings in {0, 1}* that encode, in binary,
an integer w that is
a multiple of 3. Interpret the empty strings e as the
number 0.
d) None of the mentioned
27 The language accepted by a Push down Automata: Type2
28 Which of the following strings is not generated by the d) aaabb
following
grammar S-> SaSbS|e

a) aabb
b) abab
c) aababb
d) aaabb
29 A pushdown automata behaves like a Turing machine D)2 or more
when the number
of auxiliary memory is
A)0. B)1. C)1 or more D)2 or more
30 There exists an initial state, 17 transition states, 7 A
final states and
one dumping state, Predict the maximum number of
states in its
equivalent DFA?
Qno Question Answer
a) 226
b) 224
c) 225
d) 223
31 Given the language L = {ab, aa, baa}, which of the 1,2,4
following strings are in L*?
A) abaabaaabaa
B) aaaabaaaa
C) baaaaabaaaab
D) baaaaabaa
Choose the correct answer
32 Any production of CFG of the form A---->€ is A
a)€ production b) unit production c) removal of
symbol d) zero
production
33 The context-free languages are closed for ? B) Union
A) Intersection
B) Union D) Kleene Star
C) Complementation
D) Kleene Star
34 There are ____ tuples in finite state machine. B
a) 4
b) 5
c) 6
d) unlimited
35 Which of the technique can be used to prove that a B
language is non
regular?
a) Ardens theorem
b) Pumping Lemma
c) Ogden’s Lemma
d) None of the mentioned
36 The number of states in a turing machine is ______ infinite
37 Myphill Nerode does the following: Both a and b
a) Minimization of DFA
b) Tells us exactly when a language is regular
c) Both (a) and (b)
d) None of the mentioned
38 Language not accepted in Linear bounded automata D
a)regular
b)context free
Qno Question Answer
c)context sensitive
d)recursively enumerable
40 Which one of the following problems is undecidable? A
(A) Deciding if a given context-free grammar is
ambiguous.
(B) Deciding if a given string is generated by a given
context-free
grammar.
(C) Deciding if the language generated by a given
context-free grammar
is empty.
(D) Deciding if the language generated by a given
context-free grammar
is finite.
41 The context free grammar given by C
S→XYX
X→aX|bX|λ
Y→bbb
generates the language which is defined by regular
expression:
a) (a+b)*bbb
b) abbb(a+b)*
c) (a+b)*(bbb)(a+b)*
d) (a+b)(bbb)(a+b)*
42 Language of finite automata is C
D) Type 3
A) Type 0
B) Type 1
C) Type 2
D) Type 3
43 The minimum number of states of the non- C
deterministic finite
automation which accepts the language
{a b a bn| n ≥ 0} ∪ {a b an|n ≥ 0} is

A)3
B)4
C)5
D)6
44 Palindromes can’t be recognized by any FSA because D
[A] FSA cannot remember arbitrarily large amount of
information
[B] FSA cannot deterministically fix the midpoint
Qno Question Answer
[C] Even if the mid point is known an FSA cannot find
whether the
second half of the string matches the first half
[D] all of the above
45 Which one of the following statement is FALSE? C
[A] context-free languages are closed under union
[B] context-free languages are closed under
concatenation
[C] context-free languages are closed under
intersection
[D] context-free languages are closed under Kleene
closure
46 Context free languages are not closed under A
(A)Intersection (B) Union (C)Reversal (D)Kleene
closure
47 Consider the following problems. L(G) denotes the D
language generated by a grammar G. L(M) denotes
the language accepted by a machine M.

(I) For an unrestricted grammar G and a string w,


whether w ∈ L(G)
(II) Given a Turing machine M, whether L(M) is regular
(III) Given two grammars G1 and G2, whether L(G1)
= L(G2)
(IV) Given an NFA N, whether there is a deterministic
PDA P such that N and P accept the same language.

Which one of the following statements is correct?


(A) Only I and II are undecidable (B) Only III is
undecidable
(C) Only II and IV are undecidable (D) Only I, II and
III are
undecidable
48 Ambigous grammar is defined a grammar having True
more than one
derivation tree
1.True
2.False
49 Which of the following pairs have different expressive C
power?
a. Single-tape-turing machine and multi-dimensional
turing machine
b. Multi-tape turing machine and multi-dimensional
Qno Question Answer
turing machine
c. Deterministic push down automata and non-
deterministic pushdown automata
d. Deterministic finite automata and Non-deterministic
finite automata
50 The set that can be recognized by a deterministic These are
FSA is closed under
union,Kleen
closure
51 The problem that is undecidable - D
(A) Finiteness problem for FSA’s
(B) Membership problem for CFG’s
(C) Equivalence problem for FSA’s
(D) Ambiguity problem for CFG’s
52 Grammars that can be translated to DFAs: B
A.Left linear grammar
B.Right linear grammar
C.Generic grammar
D.All of these
53 A Language for which no DFA exist is a ________ Non-Regular Language
54 Which of the following will the given DFA won’t ε
accept?

55 Regular expression for all strings starts with ab and ab(a+b)*bba


ends with bba is.
56 Which of the following options is correct? Statement 1 is
Statement 1: Initial State of NFA is Initial State of DFA. true and
Statement 2: The final state of DFA will be every Statement 2 is
combination of final state of NFA. true
Qno Question Answer
57 The number of elements present in the e-closure(f2) 2
in the given diagram:

58 The language accepted by Push down Automaton: Context free


language
59 Given grammar G: 2,4
(1)S->AS
(2)S->AAS
(3)A->SA
(4)A->aa
Which of the following productions denies the format
of Chomsky Normal Form?
60 Which of the problems are unsolvable? Halting
problem &
Boolean
Satisfiability
problem
61 Given Grammar: S->A, A->aA, A->e, B->bA B->bA
Which among the following productions are Useless
productions?
62 The production of the form A->B , where A and B are Unit production
non terminals is called
63 Which of the following is not a component of a formal Compiler
language?
64 Which type of automation recognizes regular Finite Automation
languages?
65 The Chomsky hierarchy classifies formal languages 4
into how many levels?
Qno Question Answer
66 Which type of automation has both finite control unit Turing Machine
and unbounded tape
67 The language accepted by a turing machine with a Recursive enumerable
halting state is known as language
68 Which of the following is a non deterministic Pushdown automation
automation
69 Which of the following is true about regular They can be recognized by
languages? finite automation
70 The chomsky normal form is a way to represent a All production rules have
context free grammar where atmost two non terminals
on the right hand side
71 Which of the following is a regular expression for the (a+b)a(a+b)
language of all strings over {a,b} that contain at least
one "a"?
72 Which type of automation is used in lexical analysis Finite automation
for tokenizing source code
73 A non Kleene star operation accepts the following C
string of infinite length over set A = |{0,1}|

a) 01,0011,010101
b) 0011,11001100
c)ε,0011,11001100
d)ε,0011,11001100
74 Which of the following is not part of 5 type finite D
automata?
a) Input Alphabet
b) Transition function
c) Initial state
d) Output alphabet
75 Which of the following conversion is not possible C
(algorithmically)?
a) Regular grammar to CFG
b) Non deterministic FA to Deterministic FA
c) Non Deterministic PDA to Deterministic PDA
d) Non Deterministic TM to Deterministic TM
76 Regular expression for all strings start with ab and C
ends with bba is

a) aba^*b^*bba
b) ab(ab)^*bba
Qno Question Answer
c) ab(a+b)^*bba
d) All of the mentioned
77 Pumping lemma is generally used for proving that B
a) Given grammar is regular
b) Given Grammar is not regular
c) Whether two given regular expression are
equivalent or not
d) None of these
78 Consider the regular language L = (111+11111) * 3
The minimum number of states in any DFA accepting
this language is
79 Suppose a regular language L is closed under the B
operation halving then the result would be

a) 1/4 L will be regular


b) 1/2 L will be regular
c) 1/8 L will be regular
d) All of the mentioned
80 Which among the following cannot be accepted by a D
regular grammar?
a) L is a set of numbers divisible by 2
b) L is a set of binary complement
c) L is a set of string with odd number of 0
d) L is a set of 0n1n
81 If L1 and L2 are context free languages, which of the D
following is context free?

a) L1*
b) L2UL1
c) L1.L2
d) All of the mentioned
82 Consider a grammar with the following productions A
S-> aab | bac | aB
S -> aS |
S -> abb | ab
S -> bdb

The above grammar is


a) Context Free
b) Regular
c) Context sensitive
d) Type 0

You might also like