Toc Model qp2
Toc Model qp2
VI SEM BCA
Model Question paper-2
Computer Science
BCA 601: THEORY OF COMPUTATION
SECTION-A
Answer any TEN questions .Each question carries TWO marks 10X2=20
5. Design a regular expression for the language containing even number of 0’s
followed by odd number of 1’s.
9. Define CNF.
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
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
Language
SECTION-D
Answer any ONE question. Each question carries TEN marks 1*10=10