Professional Documents
Culture Documents
com
B.E. (Computer Science Engineering) Fourth Semester (C.B.S.)
Theoretical Foundations of Computer Science
P. Pages : 3 NJR/KS/18/4436
Time : Three Hours *0601* Max. Marks : 80
_____________________________________________________________________
Notes : 1. All questions carry marks as indicated.
2. Solve Question 1 OR Questions No. 2.
3. Solve Question 3 OR Questions No. 4.
4. Solve Question 5 OR Questions No. 6.
5. Solve Question 7 OR Questions No. 8.
6. Solve Question 9 OR Questions No. 10.
7. Solve Question 11 OR Questions No. 12.
8. Assume suitable data whenever necessary.
b) What is string, prefix, proper prefix & proper suffix with examples. 4
OR
2. a) Consider a Relation R = {(a, b), (a, a), (b, b), (c, c), (d, d), (b, a)} on set A = {a, b, c, d}. Is 6
relation R an equivalence relation. If so find equivalence classes.
3. a) Construct DFA which can accept the string those can have odd number of 0's and any 7
number of 1's.
b) Design a Moore machine for binary input sequence, if it ends in 101, output is 'A'. if it 6
ends in 110 output is 'B'. Otherwise C.
OR
a E a
q0 q1 q2
NJR/KS/18/4436 1 P.T.O
b) Minimize the following Automata. 7
b a b
q0 b q3 a q4 q5
b
a a b a
a a
b
q1 q2 q7 a q6
b
b
0 1 0
0 1
q0 q1 q2
i)
L a n bmck | n m or m k .
ii) L a n bm | 2n m 3n .
iii) L a n bmcmd n \ m, n 1 .
iv) L a n b2n | n 1 .
OR
6. a) Remove all unit productions, all useless production and all E-productions from the 7
grammar given below.
S aA | aBB
A aaA |
B bB | bbC
CB
7. a)
Construct PDA for L a 2n bn | n 0 . 6
b)
Show that L a n b j | n j2 is not a context free language. 3
NJR/KS/18/4436 2
OR
b) Explain the modal of PDA and its acceptance by stack and acceptance by final state. 6
OR
OR
*********
NJR/KS/18/4436 3 P.T.O
NJR/KS/18/4436 4