DR.
BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE
Supplementary Examination – Summer 2022
Course: B. Tech. Branch : CSE Semester :5th
Subject Code & Name: BTCOC502: Theory of Computations
Max Marks: 60 Date: Duration: 3 Hr.
Instructions to the Students:
1. All the questions are compulsory.
2. The level of question/expected answer as per OBE or the Course Outcome (CO) on
which the question is based is mentioned in ( ) in front of the question.
3. Use of non-programmable scientific calculators is allowed.
4. Assume suitable data wherever necessary and mention it clearly.
(Level/CO) Marks
Q. 1 Solve Any Two of the following. 2*6=
12M
A) Find DFA that accepts only the language of all strings with b 6M
as the second letter over the alphabet Σ={a,b}.
B) Construct a Mealy machine of the following Moore machine 6M
C) Construct the DFA for the following NFA 6M
Q.2 Solve Any Two of the following. 2*6=
12M
A) Explain Chomsky classification of grammars 6M
B) Consider the grammar given as G = ({S,A}, {a,b}, P , S ) 6M
Where production P consists of ,
S→ aAS | a
A→ SbA | SS | ba
Find
a) Leftmost derivation
b) Rightmost derivation
c) Parse tree
for the string “ aabbaa ”.
C) Find a reduced grammar G to the grammar given below 6M
S→ AB|CA
A→ a
B→BC|AB
C→aB|b
Q. 3 Solve Any One of the following. 2*6=
12M
A) Convert the following CFG to CNF: 6M
S aSa| bSb | a | b | aa | bb
B) Obtain RLG from the given Finite Automata 6M
C) For the grammar given find L(G ) 6M
S → a │ Sa │ b │ bS .
Q.4 Solve Any Two of the following. 2*6=
12M
A) Construct a PDA accepting L = { an bm an |m, n ≥1} by a null 6M
stack. Is it deterministic?
B) Construct a PDA equivalent to the following context free grammar 6M
S→aAA
A→aS|bS|a
C) Let M = ( { q0 , q1} , { 0 , 1}, { X , Z0} , , q0 , Z0 , } 6M
where is given by
( q0 , 0 , Z0) ={ (q0 ,X Z0) }
( q0 , 0 , X) = { (q0 ,X X) }
( q0 , 1 , X) = { (q1 , ) }
( q1 , 1 , X) = { (q1 , ) }
( q1 , , X) = { (q1 , ) }
( q1 , , Z0) = { (q1 , ) }
Construct a CFG
Q. 5 Solve Any One of the following. 2*6=
12M
A) Obtain a Turing machine to accept the language 6M
L= { 0n1n 2n | n≥ 1}.
B) Design a TM to find one’s complement of the binary number. 6M
C) Explain the following 6M
1)Turing Machine with stay-option
2) Multiple Tapes Turing Machine
*** End ***
The grid and the borders of the table will be hidden before final printing.