Computer Engineering (Semester 5)
Total marks: 70
Total time: 2 Hours 30 min
INSTRUCTIONS
(1) Attempts questions Q.1 or Q.2, Q.3 or Q.4 , Q.5 or Q,6 and Q.7 or Q.8 .
(2) Neat diagrams must be drawn whenever necessary.
(3) Assume suitable data , if necessary.
1.a.
Define the following terms with example-
i) Alphabets
ii)String
iii)Regular Expression
(6 marks)
00
1.b.
Design a DFA which accepts a ternary number divisible by 4.
(6 marks)
00
1.c.
Design FA accepting the following language over the alphabet {0,1}
i) Set of all strings having at least three consecutive zeros.
ii) Set of all strings that begin and end with same symbol.
(8 marks)
00
OR
2.a.
Define the following terms with example
i) DFA
ii) NFA
iii) NFA - $\epsilon$
(6 marks)
00
2.b.
b) Eliminate the useless symbol in the grammer below-
S $\rightarrow$ aA|bB
A $\rightarrow$aA|a
B $\rightarrow$bB
D $\rightarrow$ab|Ea
E $\rightarrow$aC|d
(6 marks)
00
2.c.
Construct a DFA accepting the following language over the alphabet {a,b}
i) Set of all string that begin with substring ab.
ii) Set of all strings with at most two consecutive b's.
(8 marks)
00
3.a.
Write short notes on -
i) Universal Turing Machine
ii) Multi-tape Turing Machine
(4 marks)
00
3.b
Construct a Turing Machine for R = (a+b)*bb.
(6 marks)
00
3.c.
Construct a Turing Machine to accept the language
(8 marks)
00
OR
4.a.
Write short notes on -
i) Unsolvable problems
ii) Application of TM.
(4 marks)
00
4.b.
Construct a Turing Machine for R = (aba*b).
(6 marks)
00
4.c.
Construct Turing Machine that accepts string with equal number of 0's and 1's over
= {0,1].
(8 marks)
00
5.A.
Prove that CFLs are closed under union, concatenation and Kleene's closure.
(6 marks)
00
5.b.
Design PDA for the following language -
(6 marks)
00
5.c.
Explain the working of Bottom-up parser with example.
(4 marks)
00
OR
6.a.
Convert the following CGF to PDA -
S $\rightarrow$ aSb | A
a $\rightarrow$ bSa | s | $\epsilon$
(6 marks)
00
6.b.
Show that CFLs are not closed under intersection and complementation.
(6 marks)
00
6.c.
Explain acceptance by PDA -
i) By final state
ii) By empty state
(4marks)
00
7.a.
Explain Tractable and Intractable problem.
(6marks)
00
7.b.
How the Kruskal's Algorithm can be solve by using Turing Machine ?
(6marks)
00
7.c.
Explain the Satisfiability Problem with an example.
(4marks)
00
OR
8.a
Prove that satisfiability Problem is NP - complete.
(6marks)
00
8.b.
What do you mean by Polynomial Time reduction ? Explain with suitable example.
(6marks)
00
8.c.
Differentiate between P and NP classes.
(4marks)
00