Вы находитесь на странице: 1из 21

QUESTION BANK 2018

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR


Siddharth Nagar, Narayanavanam Road – 517583

QUESTION BANK (DESCRIPTIVE)

Subject with Code : FLAT(16CS517) Course & Branch: B.Tech - CSE


Year & Sem: III-B.Tech & I-Sem Regulation: R16

UNIT I
Inroduction, Finite Automata

1. a) Consider the below finite automata and check the strings are accepted or not

(i) 1110 (ii) 0001 (iii) 1010 [L2,2+2+2M]


b) Define NFA. What are the differences between DFA & NFA? [L2,4M]
2. Convert the following NFA with ε moves to DFA without ε moves. [L2,10M]

a.
3. Minimize the following finite automata. [L3,10M]

4. Convert the following Mealy machine into its equivalent Moore machine. [L2,10M]

Present I/P=0 I/P=1


State
Next State O/P Next State O/P

A C 0 B 0

FLAT Page 1
QUESTION BANK 2018

B A 1 D 0

C B 1 A 1

D D 1 C 0

5. a) Write about relations on sets. [L1,2M]


b) Define Grammar? What are the tuples. [L1,2M]
c) Define Finite Automaton. [L2,2M]
d) Show that (0*1*)* = (0+1)*. [L3,2M]
e) Define Melay machine and Moore machine. [L2,2M]
6. a) Discuss Chomsky’s Hierarchy of formal languages. [L1,5M]
b) Explain briefly about DFA and NFA? [L1,5M]

7. a) Define Moore machine? Construct Mealy machine corresponding to Moore machine?


[L2,5M]

b) Prove i) R=(1+00*1) + (1+00*1) (0+10*1)* (0+10*1)* = 0*1(0+10*1)*


ii) R= Є+1*(011)*(1*(011)*)*= (1+011)* [L3,21/2+21/2M]
8. Write down procedure for Myhill- Nerode theorem with a given example.
(‘*’ means final states). [L2,10M]
Next State

Present State I/P=a I/P=b

A B F

B A F

C G A

D H B

E A G

*F H C

*G A D

*H A C

9. a) Define relations on set and explain its property with an example [L1,3M]

FLAT Page 2
QUESTION BANK 2018

b) Define NFA and DFA. Construct DFA for the given NFA [L2,7M]

10. a) List out the identities of Regular expression. [L3,4M]


b) From the identities of RE, prove that
i) 10+(1010)*[^+(1010)*]=10+(1010)* [L3,2M]
ii)(0+011*)+(0+011*)(01+0100*)(01+0100*)*=01*(010*)* [L3,2M]
c) Define finite automata? Explain detail about the tuples . [L2,2M]

FLAT Page 3
QUESTION BANK 2018

UNIT II
Regular Languages

1. a) Construct an equivalent FA for the given regular expression (0+1)*(00+11)(0+1)* [L1,5M]


b) State Arden’s theorem and construct the regular expression for the following FA using Arden’s
theorem. [Ll,5M]
2. Explain about Arden’s theorem, for constructing the RE from a FA with an example. [L1,10M]

3. a) List out the identities of Regular expression. [L1,4M]


b)From the identities of RE, prove that [L2,6M]
i) 10+(1010)*[^+(1010)*]=10+(1010)*
ii)(0+011*)+(0+011*)(01+0100*)(01+0100*)*=01*(010*)*
4. a) Consider the below finite automata and check the strings are accepted or not [L3,6M]

(i) 1110 (ii) 0001 (iii) 1010


b) Construct an equivalent FA for the given regular expression (0+1)*(00+11)(0+1)* [L3,4M]
5. a) Prove R=Q+RP has unique solution, R=QP* [L1,3M]
b)Explain about the Arden’ theorem, for constructing the RE from a FA with an example [L1,7M]

6. Explain how equivalence between two FA is verified with an example. [L2,10M]


7. Prove that the language L= {anbn | n>=1} is not regular using pumping lemma [L2,10M]
with procedure.
8. a) Construct an equivalent FA for the given regular expression (0+1)*(00+11)(0+1)* [L3,5M]
b) State Arden’s theorem and construct the regular expression for the following FA using
Arden’s theorem.
[L3,5M]

FLAT Page 4
QUESTION BANK 2018

9. a)Write the process of equivalence two FA’s? Find whether the equivalence two FA’s or not.[L3,7M]

b) List out the identities of Regular expression. [L3,3M]


n n n
10. Prove that the language L= {a b c | n>=1}is not regular using pumping lemma. [L3,10M]

FLAT Page 5
QUESTION BANK 2018

UNIT III
Contex Free Grammars and Languages

1. Write the procedure and Eliminate left recursion from the following Grammar [L2,10]
EE+T/T
TT*F/F
F(E)/id
2. a) Explain about derivation and parse trees? Construct the string 0100110 from the Leftmost
and Rightmost derivation.
S0S/1AA
A0/1A/0B
B1/0BB [L2,5M]
b) Find the parse tree for generating the string 11001010 from the given grammar. [L2,5M]
S1B/0A
A1/1S/0AA
B0/0S/1BB
3. a) Define Ambiguous grammar. [L2,4M]
b) Remove Left recursion from the grammar SSab/T
TTcd/F
FFa/G [L2,6M]
4. a) Explain Left recursion and Left factoring. [L3,4M]
b) Perform left factor from the grammar AabB/aB/cdg/cdeB/cdfB
[L3,6M]
5. Simplify the following context free grammar. (Here, Ʌ stands for epsilon(ϵ)). [L4,10M]
STU|V
TaTb|Ʌ
UcU| Ʌ
VaVc|W
WbW| Ʌ
6. Convert the following grammar into Greibach normal form. [L4,10M]
SAA/a
ASS/b
7. a) Write the process for Convert the grammar into CNF? [L3,4M]
b) Convert the following grammar into CNF. [L3,6M]
SbA/aB
AbAA/aS/a
BaBB/bS/a.
8. a) What is linear grammar? Explain in detail with example. [L3,4M]
b)Explain the closure properties of context free languages. [L3,6M]
9. a)Remove the unit production from the grammar
SAB,AE,BC,CD,Db,Ea [L3,4M]
b)Remove ϵ productons from the grammar
SABaC, ABC,Bb/ ϵ,CD/ ϵ,Dd [L3,6M]
10. a) Write about Decision problems for CFLs with example? [L3,5M]

FLAT Page 6
QUESTION BANK 2018

b) What is the differentiate between CFG and Regular Language? [L3,4M]

UNIT IV
Pushdown Automata

1. a) Construct a PDA which recognizes all strings that contain equal number
of 0’s and 1’s. [L2,6M]
b) A PDA is more powerful than a finite automaton. Justify this statement. [L2,4M]
2. Construct PDA from the following Grammar.
S aB
B bA/b
A aB [L2,10M]
3. Construct PDA from the following Grammar
S0BB
B0S/1S/0 [L2,10M]
4. Construct a CFG equivalent to the following PDA. [L3,10M]

PDA={(p, q), (0, 1), δ, p, q, (Z, X)}, where p is initial state, q is final state.δ is defined as
δ(p,0,Z)=(p,XZ), δ(p,0,X)=(p,XX), δ(p,1,X)=(q,ϵ), δ(p,1,X)=(p,ϵ), δ(p,ϵ,Z)=(p,ϵ).
5. a) Construct an equivalent PDA for the following CFG [L3,7M]
SaAB | bBA
AbS | a
B aS | b
b) Explain the informal introduction and formal definition of PDA. [L2,3M]
6. a) Define PDA? Explain about the graphical notation of PDA. [L2,4M]
b) Construct a PDA which recognizes all strings that contain equal number
of 0’s and 1’s. [L2,6M]
7. a) Define Instantaneous description (ID) in PDA. [L2,5M]
b) Explain about the graphical notation of PDA. [L2,5M]
8. a) Write the process for convert PDA into an equivalent CFG. [L4,4M]
b) Convert the following PDA into an equivalent CFG. [L4,6M]
δ (q0,a0,z0)(q1,z1z0)
δ(q0,b,z0)(q1,z2z0)
δ(q1,a,z1)(q1, z1z1)
δ(q1,b,z1)(q1, λ)
δ(q1,b,z2)(q1,z2z2)
δ(q1,a,z2)(q1, λ)
δ(q1, λ,z2)(q1, λ) // accepted by the empty stack.
9. a) Define push down automata? Explain acceptance of PDA with empty stack. [L2,5M]
b) Define Instantaneous description (ID) in PDA. [L2,5M]
10. a) Explain about the graphical notation of PDA. [L2,4M]
b) Construct an equivalent PDA for the following CFG. [L3,6M]
FLAT Page 7
QUESTION BANK 2018

SaAB | bBA
AbS|a
BaS | b.
UNIT - V
Turing machines & Undecidability

1. Construct a Turing machine which multiplies two unary numbers. [L1,10M]


n n
2. Construct a Turing machine for Language L=a b ,where n>0 [L1,10M]
n n
3. Construct a Turing machine that recognizes the language L={a b , n>1}. Show an ID for the
string ‘aabb’ with tape symbols. [L2,10M]
4. Explain conversion of regular Expression to TM with example. [L3,10M]
5. Explain the various types of Turing machine. [L3,10M]
6. Exaplain Universal turing machine
[L3,10M]
7. a)Design a multi head Turing Machine for checking whether a binary string is a
palindrome or not. Show the ID for 1001. [L3,6M]
b) Write about Enumerator in Turing Machine. [L3,4M]
8. Explain in detail about variations of the TM? [L3,10M]
9. Construct a Turing machine that recognizes the language anbncn. [L3,10M]
10. a) Define PCP. Verify whether the following lists have a PCP solution. [L3,7M]
, , , , , .
b) Describe linear bounded automaton. [L3,3M]

Prepared by: B. PAVAN KUMAR & P.NAGARAJU

FLAT Page 8
QUESTION BANK 2018

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR


Siddharth Nagar, Narayanavanam Road – 517583

QUESTION BANK (OBJECTIVE)

Subject with Code : FLAT(16CS517) Course & Branch: B.Tech - CSE


Year & Sem: III-B.Tech & I-Sem Regulation: R16

UNIT I
Inroduction, Finite Automata

1. If there are two sets A and B , then their intersection is denoted by ______ [ ]
A) A B B) A B C) A + B D) none of these.
2. A relation R is said to be _____ , if for two elements ‘a’ and ‘b’ in X, if a is related to b then b is
related to a. [ ]
A) Symmetric B) Transitive C) equivalence relation D) none of these.
3. A relation R is said to be _______ relation on A , if R is reflexive, symmetric and transitive. [ ]
A) Equivalence Relation B) Non-Equivalence Relation C) Relation D) none of these.
4. A Grammar consists of _______ tuples . [ ]
A) Four B) Five C) Three D) None of these.
5. In the following which one is correct _______ [ ]
A) a+=a*.a* B) a*=a+.a C) a+=a*.a D) None of these
6. Which of the following grammar generates strings with any number of 1’s_____ [ ]
A) S 1A, Aε B) S 1S, Sε C) SS0, S ε D) None of these.
7. Grammar consists of four tuples such as set of non terminals, ______ , set of production rules
and ______. [ ]
A) Set of terminals B) Start symbol C) A & B D) None of these.
8. Type 1 grammar is called ______ [ ]
A) Regular Grammar B) Context free grammar
C) Context sensitive language. D) None of these
9. According to the Chomsky Hierarchy, regular grammar is Type _____ grammar. [ ]
A) 0 B) 1 C) 2 D) 3
10. Which is correct for δ(q,ab) [ ]
A) δ(q,a) δ(q,b) B) δ(δ(q,a),b) C) δ(q,a),b D) None of these.
11. The maximum number of state of a DFA converted from an NFA with n states is _____ [ ]
A) n B) n2 C) 2n D) none of these.
12. Which is true for the Mealy Machine? [ ]
A) Output depends on the present state. B) Output depends on the present input.
C) Output depends on the present state and the present inputs. D) None of these.
13. Finite automata is defined as _____ [ ]
A) M={Q,∑,δ,q0,F} B)M={Q,∑,q0,F} C) M={Q,δ,q0,F} D) none of these
14. For DFA, the transitional function δ is representing by Q x ∑  _____ [ ]
A) q0 B) F C) Q D) none of these.

FLAT Page 9
QUESTION BANK 2018

15. In any finite automata contains any ε move, then that finite automata is called _____ with ε moves.
A) NFA B) DFA C) A& B D) none of these [ ]
16. In the tabular format representation of finite automata, the single circle state representing _____ state.
A) final B) starting C) intermediate D) none of these [ ]
17. A relation R in set S is ______, if for x,y and z in S, xRz wheneverxRy and yRz. [ ]
A) Symmetric B) Transitive C) equivalence relation D) none of these.
18. The Myhill- Nerode theorem is used for ______ [ ]
A) Maximizing the FA B) Minimizing the FA C) both A & B D) none of these.
19. In the Moore Machine , the output depends on _____ [ ]
A) Present state B) final state C) input symbol D) none of these
20. Type 2 language is called as ______ [ ]
A) Regular Expression B) Context free grammar C) context sensitive language D) none of these.
21. A language set contains _____ [ ]
A) String B) Alphabet C) set D) none of these.
22. If ∑={1}, then ∑ - ∑ is ______
* +
[ ]
A) 1+ B) {1} C) {ε} D) none of these
23. 1+ means_____ [ ]
A) Any combination of 1 including ε B) Any combination of 1 excluding ε
C) only once D) none of these
24. In a Grammar, ______ are those symbols which can be replaced multiple times. [ ]
A) Terminal B) Non Terminal C) Start SymbolD) none of these.
25. A set having infinite number of elements is called _________________. [
]
A) Set B) Finite set C) Infinite set D) None
26. An alphabet is a finite set of symbols then it is denoted by _____ in automata. [ ]
A) ε B)∑ C) E D) none of these.
27. If 00000111 is a binary string then length of given string |w| is ______ [
]
A) 4 B) 8 C) 5 D) none of these.
28. In a given grammar SaSAc/abc , Abb, the terminal symbols are ______ [ ]
A) ab B) A C) S D) abc.
29. The finite automata with output can be divided into _____ types. [ ]
A) 2 B) 3 C) 4 D) none of these.
30. For a Moore machine, the states are labeled with the ____ in a transitional diagram [ ]
A) state name only B) output only C) state name and output D) none of these.
31. An Finite automata has a _____ number of states. [ ]
A) Infinte B) finite C) only 5 D) none of these.
32. Which of the following string is of length 0? [ ]
A) s B) abc C) ab D) {ε}
33. In below fig Є-closure (q0) is_________ [ ]
0 1 2

 
q0 q1 q2

A) {q0} B){q0,q1} C) {q0,q1,q2} D) {q0,q2}


34. The regular expression 1 + 0 1 = [ ]
A) ε + 0 B) ( ε + 0 ) 1 C) 1 01 D) 1 ( ε + 0 )
FLAT Page 10
QUESTION BANK 2018

35. Consider the following finite automata. The regular expression for this FA is ________ [ ]
a

A
A)ε B) a C) aa D) a*
36. The union of two regular expressions R1 and R2, written as R1 + R2 is also a regular expression. [ ]
A) True B)False C) True of False D) Can’t say
37 Let the input alphabet be ∑ = {0}, then ∑* = _______________ [ ]
A) {ε} B) {ε, 0} C) {0} D) {ε, 0, 00, 000, …….}
38. In transition diagram the final state is represented as [ ]
A) Single Circle B) Star C) Double Circle D)Arrow
39. The regular expression for the regular set { 2,22,222,........ } is ______. [ ]
A) 2* B) 2+ C) 2(2) * D) both (B) & (C)
40. DFA stands for [ ]
A) Deterministic Finite Authorization B) Deterministic Finite Acceptance
C) Deterministic Finite Automaton D) Deterministic Finite Analysis

FLAT Page 11
QUESTION BANK 2018

UNIT II
Regular Languages
1. If ∑={1}, then ∑ - ∑ is ______
* +
[ ]
A) 1 +
B) {1} C) {ε} D) none of these
+
2. 1 means_____ [ ]
A) Any combination of 1 including ε B) Any combination of 1 excluding ε C) only once D) none of these
3. The regular expression 1 + 0 1 = [ ]
A) ε + 0 B) ( ε + 0 ) 1 C) 1 01 D) 1 ( ε + 0 )
4. According to one of the Identity Rules, Є+ R*R=_______ [ ]
A) R B)R* C) R R* D) none
5. The union of two regular expressions R1 and R2, written as R1 + R2 is also a regular expression. [ ]
A) True B)False C) True of False D) Can’t say
6. Let the input alphabet be ∑ = {0}, then ∑* = _______________ [ ]
A) {ε} B) {ε, 0} C) {0} D) {ε, 0, 00, 000, …….}
7. In transition diagram the final state is represented as [ ]
A) Single Circle B) Star C) Double Circle D)Arrow
8. Arden’s Theorem states that if P and Q are regular expressions, and P does not contain Λ,
then the equation R = Q + RP has a unique solution _________ [ ]
A) PQ* B) QP* C) P* D) Q*
9. According to one of the Identity Rules, Є+ R*R=_______ [ ]
A) R B)R* C) R R* D) none
10. The regular expression for the regular set { 2,22,222,........ } is ______. [ ]
+ *
A) 2* B) 2 C) 2(2) D) both (B) & (C)
11. According to one of the Identity Rules, Є+ R*R*=_______ [ ]
A) R B)R* C) R R* D) none
12. Which of the strings do not belong to the regular expression (ba+baa)*aaba_______ [ ]
A)baaaba B)babaabaaaba C)babababa D)baaaaba
13. The regular expression is accepted by___ [ ]
A)finite automata B)push down automata C)turing machine D)All
14. The regular expression1+01= [ ]
A)ε+0 B)(ε+0)1 C)101 D)1(ε+0)
15. Consider the following finite automata. The regular expression forth is FA is________ [ ]
A)ε B)a C)aa D)a*
16. The union of two regular expressions R1 and R2,written as R1+R2 is also a regular expression. [ ]
A)True B)False C)True of False D)Can’tsay
17. Let the input alphabet be Σ={0},then Σ*=_______________ [ ]
A){ε} B){ε,0} C){0} D){ε,0,00,000,…….}
18. Intransition diagram the final state is represented as [ ]
A)Single Circle B)Star C)Double Circle D)Arrow
19. Then the equation R=Q+RP has a unique solution_________ [ ]
A)PQ* B)QP* C)P* D)Q*

20. According to one of the Identity Rules, Є+R*R=_______ [ ]


A)R B)R* C)RR* D)none
21. The regular expression for the regular set{2,22,222,........}is______. [ ]
FLAT Page 12
QUESTION BANK 2018

A)2* B)2+ C)2(2)* D)both(B)&(C)


22. According to one of the Identity Rules, Є+R*R*=_______ [ ]
A)R B)R* C)RR* D)none
23. Which of the strings do not belong to the regular expression (ba+baa)*aaba_______ [ ]
A)baaaba B)babaabaaaba C)babababa D)baaaaba

24. Regular expressions are closed under______ [ ]


A)Union B)Intersection C)Kleene star D)All of the above.

25. The regular expression is accepted by___ [ ]


A)Finite automata B)Pushdown automata C)Turing machine D)All
26. The Unrestricted grammar is accepted by___ [ ]
A)Finite automata B)Pushdown automata C)Turing machine D)All
27. Regular expressions are closed under______ [ ]
A)Union B)Intersection C)Kleene star D)All of the above.
28. Type1grammar is called______ [ ]
A)Regular Grammar B)Context free grammar C)Context sensitive language D)None of These
*
29. Ʌ+RR =? [ ]
* +
A) R B) R C) R D) Ʌ
30. {a/b}denotes the set[ ]
A) {ab} B) {a, b} C) {a, b}* D) {ab}*
31. Which of the strings do not belong to the regular expression (ba+baa)*aaba [ ]
A) baaaba B) babaabaaaba C) babababa D) baaaaba
32. Which of the following type of language is regular expression? [ ]
A) Type 0 B) Type 1 C) Type 2 D) Type 3
33. Regular sets are closed under [ ]
A) Union B) Concatenation C) Kleene Closure D) All of the above
34. The set of all strings of {0,1} having exactly two 0’s is [ ]
* * * * * *
A) 1 01 01 B) {0+1) 1 C) {11+0} D) {00+11}
35. What is the solution for the equation R= Q + RP [ ]
* * * *
A) R=QP B) R=QP C) R=PQ D) R=P Q
36. Which is true for ϵ-closure of a state? [ ]
A) All the states reachable from the state with input null excluding the state
B) The state only
C) All the other states
D) All the states reachable from the state with input null
37. The pumping lemma for regular expression is used to prove that [ ]
A) Certain sets are regular B) Certain sets are not regular
C) Certain regular grammar produce RE D) Certain regular grammar does not produce RE
38. The machine format of regular expression is [ ]
A) Finite automata B) Push down automata C) Turing machine D) All of the above
39. Which of the following RE over {0, 1}denotes the set of all strings not containing
100 as substring? [ ]
* * * * * *
A) (1+0) 0 B) 0 1010 C) 0 1 01 D) All of the above
40. The set of all strings of {0, 1} where 0 is followed by 1 and 1 is followed by 0 is [ ]
FLAT Page 13
QUESTION BANK 2018

A) (01)* B) 0*1* C) 0*1 + 1*0 D) 0*1* + 1*0*


UNIT III
Context Free Grammars and Languages

1. Which of the following grammar G is in CNF ? [ ]

A) S  aSb | SS | Є B) S  AB | AS , A  a | aS , B  b

C) S  aSA | AS | Є , A a D) S  AB | AS , A  a , B b

2. A grammar G that produces more than one parse tree for some string w then it
is said to be in _______ [ ]
A)Unambiguity B) ambiguity C) derivation tree D) all
3. Pumping lemma is to prove certain languages that are ____ [ ]
A)regular B) not regular C) grammar D) none
4. CFG is not closed under ____ [ ]
A) union B) cancatenation C) kleen star D) complementation
5. Which of the following is a unit production? [ ]
A) A b B) A BC C) A B D) A bB
6. Reduced grammar can be obtained by eliminating ____ [ ]
A) Useless Productions B) Null Productions C) Unit Productions D) all of these.
7. A CFG is in GNF, if every production is of the form A aα , where α belongs ____ [ ]
+
A) V N B)V N C)V N * D) ∑
8. Let G be a CFG. A tree is a derivation (or parse) tree for G if vertex n has label Λ(ε) then n may be a
______ node [ ]
A) root B)interior C) leaf D)none of these
9. A formal definition of CFG is G=______________ [ ]
A)(V N,T) B) (V N,T,P) C) (V N,T,S) D) (V N,T,P,S)
10. The difference between finite automata and pushdown automata is___ [ ]
A) Reading head B) input tape C) finite control D) stack.
11. Remove useless symbols from the following grammar S>AB | a , Aa ____ [ ]
A) S A B) S  a C) S B D) Aa
12. The production is in the form NTT is called______ [ ]
A)Useless symbol B) unit Production C) non reachable symbol D)noneof these.
13. A parse tree is an ordered tree in which the LHS of a production represents _____ node
and RHS of a production represents a _____ node. [ ]
A) children node, Parent B) Parent , children C) root, parent D) none of these.
14. A CFG is said to be CNF if all production of the grammar are in the _______ form [ ]
A) NTNT1NT2 B) NTT C) Both A or B D) none of these.
15.______ is used to avoid the problem of backtracking. [ ]
A) left factoring B) left recursion C) ambiguous D) none of these.
16. In a CFG, the symbols which do not produce any terminal string is called_____ [ ]
A) non reachable B) non generating C) unit production D) none of these.
17. The grammar SaSb│bSb│c produces the string_______ [ ]
A) Wc│W ∈ (a,b) *
B) WcW │W ∈ (a,b) C) W c│W ∈ (a,b) D)none of these.
* * * *

FLAT Page 14
QUESTION BANK 2018

18. anbncn where n>0 is not a context free language but _______ language [ ]
A) context sensitive B) finite automata C) regular grammar. D) none of these.
19. Parsing a string from a given grammar means_____ [ ]
A) Finding a derivation B) Finding leftmost derivation
C) Finding right most derivation D) none of these.
20. In a CFG,the production in the form non-terminal→single non-terminal is called____ [ ]
A) production B)unit production C) null production D) none of these
21. Which of the following is in GNF? [ ]
A) A→BC B) A→a C) A→Ba D) none of these.
22. Finding a derivation for a string from a given grammar is called____ [ ]
A)parsing B) traversing C)deleting D)inserting
23. ____is used to prove that that certain sets are not context free [ ]
A) normal form B)ambiguous C)unit production D)pumping lemma
24. The parse tree construction is only possible for_____grammar [ ]
A)context-sensitive B)context-free C)regular D)none
25. A CFL is said to be_____if all its grammars are ambiguous. [ ]
A)inherently ambiguous B)regular expression C)regular grammar D)none
26. The root of the parse tree of a CFL is represented by the____ of the corresponding CFG. [ ]
A) start symbol B) terminal symbol C) A or B D) None of these
27. In a CFG,a production is in the form NT→ε is called ___ [ ]
A) useless production B)unit production C) null productionD) none of these
28. Every context-free grammar can be transferred into an equivalent_____ [ ]
A)GNF B)CNF C)A&B D)none
29. The production is in the form NTε is called______ [ ]
A)Useless symbol B) unit Production C) null production D) none of these.
30. Remove useless symbols from the following grammar SAB | a , AC ____ [ ]
A) S A B) S  a C) S B D) None of these
31. A CFG is said to be CNF if all production of the grammar are in the _______ form [ ]
A) NTNT1NT2 B) NTT C) Both A or B D) none of these.
32. A CFG is in GNF, if every production is of the form A aα , where α belongs ____ [ ]
A) N B)V N + C)V N * D) none of these
33. Which of the following grammar G is in CNF ? [ ]
A) S  aSb | SS | Є B) S  AB | AS , A  a | aS , B  b
C) S  AB | AS , A  a , B b D) none of these
34. A CFG is said to be CNF if all production of the grammar are in the _______ form [ ]
A) NTNT1NT2 B) NTT C) Both A or B D) none of these.
35. ______ is used to avoid the problem of backtracking. [ ]
A) left factoring B) left recursion C) ambiguous D) none of these.
36. In a CFG, the symbols which do not produce any terminal string is called_____ [ ]
A) non reachable B) non generating C) unit production D) none of these.
37. The grammar SaSb│bSb│c produces the string_______ [ ]
A) Wc│W ∈ (a,b)* B) WcW*│W ∈ (a,b)* C) W*c│W ∈ (a,b)* D) none of these.
38. anbncn where n>0 is not a context free language but _______ language [ ]
A) context sensitive B) finite automata C) regular grammar. D) none of these.
FLAT Page 15
QUESTION BANK 2018

39. Parsing a string from a given grammar means_____ [ ]


A) Finding a derivation B) Finding leftmost derivation
C) Finding right most derivation D) none of these.
40. A grammar G that produces more than one parse tree for some string w then it is
said to be in _______ [ ]
A)Unambiguity B) ambiguity C) derivation tree D) all

UNIT IV
Pushdown Automata

1. The difference between finite automata and pushdown automata is___ [ ]


A) Reading head B) input tape C) finite control D) stack.
2. In the PDA, the transitional function is in the form of _____ [ ]
A) Qx(∑∪{ λ})x Γ  (Q, Γ) B) Q x ∑  Q C) Qx Γ  Q D) none of these.
3. For constructing a PDA from a given grammar, first we need to convert the grammar into
____ normal form [ ]
A)GNF B)CNF C) General Form D) none of these
4. MPCP stands for [ ]
A) many posts correspondence problem B) many posts correspondence problem
C) modified posts correspondence problem D) merged posts correspondence problem
5. In a PDA, a transition is represented as δ(q0, a, z0) = {(q1, azo)}. Here, q1 is____ [ ]
A) initial state B)final state C)next state D)none of these
6. A push down automaton M is a system (Q , ∑, Γ , δ ,q0 , Zo, F) Where Γ is ______ [ ]
A) input alphabet B) stack alphabet C)tape symbol D) none of these
7. Which of the following is not accepted by the PDA but accepted by the two stack PDA. [ ]
A)anbn B) anbncn C) an D)none of these
8. The symbols belong to the stack of a PDA ____ [ ]
A) Terminals only B) Non terminals only
C) States D) both terminals and non-terminals.
9. We will say that , a given string is accepted by a pushdown automata when it is ____ [ ]
A) accepted by final state B) accepted by empty stack
C) both A & B D) none of these.
10 .Two stack PDA is equivalent to_____ [ ]
A) Turing machine B) finite automata C) Non finite automata D) None of these
11 .In PDAs, Q is ____ [ ]
A) a state B) a set of states C) a relation D) a function
12. In a PDA, a transition is represented as δ(q0, a, z0) = {(q1, azo)}. Here, q0 is____ [ ]

A) initial state B)final state C)next state D)none of these


13. Two stack PDA is equivalent to_____ [ ]
A) Turing machine B) finite automata C) Non finite automata D) None of these
14. In the PDA, the transitional function Γ denotes_____ [ ]
A) stack symbols B) initial state C) Final state D) none of these.

FLAT Page 16
QUESTION BANK 2018

15. The difference between finite automata and PDA is in_______________. [ ]


A) Reading head B) Input tape C) Finite control D) Stack

16. The movement of the head is limited to a certain region for which of the following
machine____ [ ]
A)K dimensional TM B) Linear bounded automata
C) Pushdown automata D) none of these.
17. A TM consist of an _____, a ______ and _______. [ ]
A) input tape, write head, finite control B) input tape, read-write head, finite control
C) input tape, read head, finite control D) none of these.
18. The symbols belong to the stack of a PDA ____ [ ]
A) Terminals only B) Non terminals only
C) States D) both terminals and non-terminals.
19. In PDAs, Q is ____ [ ]
A) a state B) a set of states C) a relation D) a function
20. In a PDA, a transition is represented as δ(q0, a, z0) = {(q1, azo)}. Here, q0 is____ [ ]
A) initial state B)final state C)next state D)none of these

21. The transition a Push down automaton makes is additionally dependent upon the: [ ]
A) stack B) input tape C) terminals D) none of these
22. A PDA machine configuration (p, w, y) can be correctly represented as: [ ]
A) (current state, unprocessed input, stack content)
B) (unprocessed input, stack content, current state)
C) (current state, stack content, unprocessed input)
D) none of the mentioned
23. |-* is the __________ closure of |-. [ ]
A) symmetric and reflexive B) transitive and reflexive
C) symmetric and transitive D) none of the mentioned
24. With reference of a DPDA, which among the following do we perform from the start state with an
empty stack? [ ]
A) process the whole string B) end in final state
C) end with an empty stack D) all of the mentioned
25. A DPDA is a PDA in which: [ ]
A) No state p has two outgoing transitions
B) More than one state can have two or more outgoing transitions
C) Atleast one state has more than one transitions
D) None of the mentioned
26. State true or false:
Statement: For every CFL, G, there exists a PDA M such that L(G) = L(M) and vice versa. [ ]
A) true B) false C) Both D).None

27. If the PDA does not stop on an accepting state and the stack is not empty, the string is: [ ]
A) rejected B) goes into loop forever C) both (a) and (b) D) none of the mentioned
28. A language accepted by Deterministic Push down automata is closed under which of the following?

FLAT Page 17
QUESTION BANK 2018

A) Complement B) Union C) Both (a) and (b) D) None of the mentioned [ ]


29. Which of the following is a simulator for non deterministic automata? [ ]
A) JFLAP B) Gedit C) FAUTO D) None of the mentioned
30. Finite-state acceptors for the nested words can be: [ ]
A) nested word automata B) push down automata C) ndfa D) none of the mentioned

31. The production of the form A->B , where A and B are non terminals is called [ ]
A) Null production B) Unit production C) Greibach Normal Form D) Chomsky Normal Form
32. Halting states are of two types. They are: [ ]
A) Accept and Reject B) Reject and Allow C) Start and Reject D) None of the mentioned
33. A push down automata can be represented as: [ ]
A) PDA= ε-NFA +[stack] B) PDA= NFA +[stack] C)Both(A)&(B) D) None
34. A pushdown automata can be defined as: (Q, ∑, G, q0, z0, A, d).What does the symbol
z0 represents? [ ]
A) an element of G B) initial stack symbol C) top stack alphabet D) all of the mentioned
35. Which of the following correctly recognize the symbol ‘|-‘ in context to PDA? [ ]
A) Moves B) transition function C) or/not symbol D) none of the mentioned
36. Which among the following is true for the given statement? [ ]
Statement :If there are strings R and T in a language L so that R is prefix of T and R is not equivalent
to T.
A) No DPDA can accept L by empty stack B) DPDA can accept L by an empty stack
C) L is regular D) None of the mentioned
37. Which of the following can be accepted by a DPDA? [ ]
A) The set of even length palindrome over {a,b} B) The set of odd length palindrome over {a,b}
c
C) {xx | where c stands for the complement,{0,1}} D) None of the mentioned
38. For a counter automaton, with the symbols A and Z0, the string on the stack is always in the form of
__________ [ ]
n n
A) A B) A Z0, n>=0 C) Z0A , n>=0 D) None of the mentioned
39. State true or false: [ ]
i i
Statement: Counter Automaton can exist for the language L={0 1 |i>=0}
A) True B) False C) Error D) None
40. Let ∑={0,1}* and the grammar G be: [ ]
Sε
SSS
S0S1|1S0
State which of the following is true for the given
A) Language of all and only Balanced strings B) It contains equal number of 0’s and 1’s
C) Ambiguous Grammar D) All of the mentioned

FLAT Page 18
QUESTION BANK 2018

UNIT - V
Turing Machines and Undecidability
1. Turing machine accepts _____________grammars. [ ]
A) Unrestricted B) regular C) phase structured D) none of these.
2. The Turing Machine accepts_____ [ ]
A)Regular Grammar B) Context free language C) Contest Senstitive Language D) all of these.
3. A language is recursively enumerable if a Turing Machine___ [ ]
A)Halts & accepts B) halts & rejects C) Loops forever C) all of these.
4. A language is called decidable, if there exist a Turing Machine___ [ ]
A) Accepts L B) Rejects L C) loops forever on L D) none of these.
5. Which of the following problems is undecidable? [ ]
A) Membership problem for CFGs B) Ambiguity problem for CFG
C)Finiteness problem for FSAs D) none of these.
6. A post machine has a ____ [ ]
A) stack B) Linear list C) Queue D) Circular queue.
7. The head of the Turing machine is called_____ [ ]
A)Read-Write head B) read head C) write head D) none of these.
8. ______ is called as a Universal machine [ ]
A) Turing machine B) Pushdown automata C) finite automata D) none of these.
9. A TM consist of an _____, a ______ and _______. [ ]
A) input tape, write head, finite control B) input tape, read-write head, finite control
C) input tape, read head, finite control D) none of these.
10. Turing machine is a machine format of____ [ ]
A)unrestricted language B) finite automata C) both A & B D)None of these.
11. A TM has ____ memory [ ]
A) random-access B) limited C) unbounded D) stack
12. A TM consist of an input tape, ______ and finite control. [ ]
A) write head only B) read-write head C) read head only D) none of these.
13. Two stack PDA is equivalent to_____ [ ]
A) Turing machine B) finite automata C) Non finite automata D) None of these
14. Turing machine is a machine format of____ [ ]
A)unrestricted language B) finite automata C) both A & B D)None of these.
15. A multi-tape Turing machine has___________________. [ ]
A)Multiple tape B) Multiple head C) Multiple tape & head D) None

16. The Turing Machine accepts_____ [ ]


A)Regular Grammar B) Context free language C) Contest Senstitive Language D) all of these.
17. A language is recursively enumerable if a Turing Machine___ [ ]
A)Halts & accepts B) halts & rejects C) Loops forever D) all of these.
18. A language is called decidable, if there exist a Turing Machine___ [ ]
A) Accepts L B) Rejects L C) loops forever on L D) none of these.

FLAT Page 19
QUESTION BANK 2018

19. Which of the following problems is undecidable? [ ]


A) Membership problem for CFGs B) Ambiguity problem for CFG
C)Finiteness problem for FSAs D) none of these.
20. A post machine has a ____ [ ]
A) stack B) Linear list C) Queue D) Circular queue.
21. The movement of the head is limited to a certain region for which of the
following machine____ [ ]
A)K dimensional TM B) Linear bounded automata C) Pushdown automata D) none of these.
22. The head of the Turing machine is called_____ [ ]
A)Read-Write head B) read head C) write head D) none of these.
23. ______ is called as a Universal machine [ ]
A) Turing machine B) Pushdown automataC) finite automata D) none of these.
24. A TM has ____ memory [ ]
A)random-access B) limited C) unbounded D) stack
25. A TM consist of an input tape, ______ and finite control. [ ]
A) write head only B) read-write head C) read head only D) none of these.
26. The Turing machine is a machine format of____ [ ]
A) unrestricted language B) finite automata C) both A & B D)None of these.
27. A multi-tape Turing machine has___________________. [ ]
A)Multiple tape B) Multiple head C) Multiple tape & head D) None

28. A multi-head Turing machine has___________________. [ ]


A)Multiple tape B) Multiple head C) Multiple tape & head D) None

29. Which is not a part of the mechanical diagram of the turing machine? [ ]

A) Input tape B) Read-write head C) Finite control D) Stack

30. A Turing machine can be used to [ ]

A). Accept languages B). Compute functions C). a & b D). none
31. Any turing machine is more powerful than FSM because [ ]
A). Tape movement is confined to one direction
B). It has no finite state control
C). It has the capability to remember arbitrary long input symbols
D). TM is not powerful than FSM
32. PCP having no solution is called [ ]
A). undecidability of PCP B). decidability of PCP
C). Semi-decidability of PCP D). None
33. Which of the following is type-2 grammar? [ ]
A). A→ α where A is terminal B). A→ α where A is Variable
C). Both D). None
34. 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

FLAT Page 20
QUESTION BANK 2018

35. A turing machine is [ ]


A). Recursively enumerable language B). RL C). CFL D) .CSL

36. Which of the following has a read only tape [ ]

A) Single-tape TM B) Multi-tape TM C) Linear bounded automata D) None of these

37. The movement of the head is limited to a certain region for which of the following machine [ ]

A) K-dimensional TM B) Linear bounded automata

C) Pushdown automata D) Two-way infinite tape

38. Which one of the following conversions is impossible [ ]

A) NTMDTM B) Multi-tape TMSingle-tape TM

C) Multi-head TMSingle-head TM D) NPDADPDA

39. A language L is called decidable, if there exists a Turing machine M which [ ]

A) Accepts L B) Rejects L C) Loops forever on L D) None of these

40. A language is recursively enumerable if a Turing machine

A) Halts and accepts B) Halts and rejects C) Loops forever D) All of these

Prepared by: B. PAVAN KUMAR & P.NAGARAJU

FLAT Page 21

Вам также может понравиться