TCS Question Bank Without Answer
TCS Question Bank Without Answer
8. Function which mapping one to one from input to state such function is known as----
---function.
a)Machine b) State c) both a and b d) none of these
9. Function which mapping one to one from input to output such function is known as--
-----function.
a)Machine b) State c) both a and b d) none of these
GFCCT 1
14. Push Down Automata has________tuples.
a) 4 b) 5 c) 6 d) 7
a) True b) False
22.
The (a/b) is rule used for conversion of RE to NFA with ϵ-moves is used for--------.
a) a * b) a + c) a 5 d) a 4
GFCCT 2
28. If L(r)={ ε, X, XX, XXX, XXXX, XXXXX} then r =______________
a)( ε+X) b) ( ε+X)5 c) ( ε+X)n d)None
29. The language accepted by finite automates are described or represented by simple
expression called__________________.
32. If rightmost and leftmost production is single non-terminal then it is known as--------
---- production.
a) unit b) self c) cross d) none of these
36. The grammar in which right hand side production contains at most one non-terminal
is called ____________ grammar.
a) Context free b) Context sensitive c) Recursive d) Regular
37. In CNF grammar is required in the form of _____.
GFCCT 3
41. A grammar that produce more than one parse tree for some sentence is
called______.
a) True b) False
GFCCT 4
8)
Why we require NFA with ϵ-moves?
9) Construct DFA for accepting string over {a,b,c} which string start with „a‟ and not
having substring „abc‟ in it.
10) Design Moore machine for accepting 2‟s complement of binary number.
14) Design a FA that reads strings made up of letters in the word „renyolds‟ & recognize
those strings that contain the word „old‟ as a substring.
15) State difference between DFA and NFA.
18) Find a CFG for each of the language defined by the following regular expression.
i)a.b* ii)a*.b*
19) Give application of R.E. and F.A.
29)
How many ways PDA accept language? Give names.
30) Give pictorial representation of PDA.
31) How many ways PDA accept language? Give the names.
GFCCT 5
33)
Define Turing Machine.
34)
Explain Turing Machine model.
35) Give the instantaneous description of Turing Machine?
4. Design a Mealy machine for 1‟s complement of binary number and convert it into
Moore machine.
5. Construct Mealy machine for increment binary number.
Δ A B
q0 q0, q1 q2
q1 q0 q1
q2 - q0, q1
7. Construct Mealy machine for 2‟s complement and convert it into Moore machine.
10. Construct DFA for find out given binary number is divisible by 3.
11. Design a DFA which accept string either ending with ab or bc over ∑={a,b,c}.
12. Design a DFA which accept string does not having abc as substring over ∑={a,b,c}.
GFCCT 6
15. Construct F.A. equivalent to R.E.
(a/b)* (aaa+bbb)* (a/b)*
19. Find Regular expression for the following DFA by using Arden‟s theorem.
22. What is pumping lemma? Using pumping lemma check {ap|p is prime} is regular or
not.
23. What is pumping lemma? Using pumping lemma check {anbn+1| n>=1} is regular or
not.
25. Check whether the following grammar is ambiguous or not; if ambiguity found
remove the ambiguity and rewrite an equivalent grammar.
S->iCtS |iCtSeS|a, C->b
GFCCT 7
28. Convert the following right linear grammar to equivalent left linear grammar
S⟶ bB
B⟶ bC
B⟶ aB
C⟶ a
B⟶b
29. Convert the following right linear grammar to equivalent left linear grammar
S⟶ 0A | 1B
A⟶ 0C | 1A | 0
B⟶ 1B | 1A | 0 | 1A |1
C⟶ a
30. Write a grammar for language over {a,b} which accept palindrome strings.
31. Find a grammar in GNF equivalent to grammar E -> E+T|T ,T-> T*F|F,
F ->(E) |a
32. Find a grammar in CNF equivalent to grammar E -> E+T|T ,T-> T*F|F,
F ->(E) |a
35. What is context free grammar? Explain derivations and parse tree with example.
36. Check whether the following grammar is ambiguous or not; if ambiguity found
remove the ambiguity and rewrite an equivalent grammar.
E - > E+E |E*E|id.
GFCCT 8
41. Construct PDA that accepts the language generated by CFG.
S->S+S|S*S|4
43. Design a PDA for language L={ai bj ck | i,j,k>=1 ;k=i+j} use final state as well as
empty stack.
44. Design a PDA to check whether a given string over {a,b} ends in abb.
45.
Construct CFG for PDA M=({q0,q1},{0,1},{0,1,z0},ɗ,q0, z0,ᶲ)
ɗ(q0, ϵ, z0) => (q1, ϵ)
ɗ(q0, 0, z0) => (q0, 0z0)
ɗ(q0, 0, 0) => (q0, 00)
ɗ(q0, 1, 0) => (q0, 10)
ɗ(q0, 1, 1) => (q0, 11)
ɗ(q0, 0, 1) => (q1, ϵ)
ɗ(q1, 0, 1) => (q1, ϵ)
ɗ(q1, 0, 0) => (q1, ϵ)
ɗ(q1, ϵ, z0) => (q1, ϵ)
A construct CFG, simplify CFG and describe the language it accept.
46. Construct Turing Machine for checking well formdness of parenthesis.
GFCCT 9