VIJAYA DEGREE COLLEGE
VI SEM BCA
Model Question paper-2
Computer Science
BCA 601: THEORY OF COMPUTATION
TIME: 3 hrs MARKS: 100
INSTRUCTION : ANSWER ALL SECTIONS
SECTION-A
Answer any TEN questions .Each question carries TWO marks 10X2=20
1. Define Finite Automata.
2. Define state ,transition,and state-transition diagram with a suitable
example.
3. Explain when is a language accepted by a finite automata.
4. Explain the terminal and non-terminal symbols of a grammar.
5. Design a regular expression for the language containing even number of 0’s
followed by odd number of 1’s.
6. State pumping lemma for context free languages.
7. Define derivation .Mention the different types of derivation.
8. Mention the different types of PDA.
9. Define CNF.
10.Explain the mathematical representation of Turing Machine with a suitable
example.
11.Define halting problem of turing machine.
12.State any two properties of CFL’s
SECTION-B
Answer any FIVE questions. Each question carries FIVE marks 5X10=50
13. Construct a NFA to accept strings of a’s and b’s having substring aba.
14. Define regular expression. Explain the applications of regular
Expression.
15. Convert the DFA to NFA
0,1 0
q1 q2 q3
22 32
1
22 2
16. State and prove22the pumping lemma for regular languages.
n n m
17. Obtain a CFG for
22 the following language L={a b c |n>=1,m>=1}
18. Explain the Post Correspondence Problem of Turing Machine.
19. Rewrite the following grammar after eliminating the useless symbols
S->AB|DS
A->a
B->c
C->D
D->Dd|Ɛ
E->a
20. Define ambiguous grammar.Show that the following grammar is
ambiguous
S->aSbS|bSaS|Ɛ
SECTION-C
Answer any THREE questions. Each question carries FIFTEEN marks 3*15=45
21. Convert the following NFA to equivalent DFA
0 1, 0 0, 1 1
q0 q1 q2
22
22. Construct DFA for a regular expression (a+b)*ab
23. (a)Obtain the left and right derivation for a string w=001122 for the
production rules S->AB,A->01|0A1,B->2B|Ɛ.
(b)Prove that regular languages ate closed under intersection and
union
24. Convert the given CFG into GNF S->AB,A->BS|1,B->SA|0
25. (a)Explain intersection and homomorphism property of Regular
Language
(b) Explain the block diagram of PDA with its components
Specification ,language and transition table.
SECTION-D
Answer any ONE question. Each question carries TEN marks 1*10=10
26. Minimize the given DFA using table filling algorithm
$ a b
A B A
B A C
C D B
D D A
E D F
F G E
G F G
H G D
27. Explain the different types of Turing Machine. Design a turing
machine that accepts the language of all strings over the alphabet ∑={a,b}
whose second letter is b