Download GTU (Gujarat Technological University Ahmedabad) B.Tech/BE (Bachelor of Technology/ Bachelor of Engineering) 2020 Winter 6th Sem 2160704 Theory Of Computation Previous Question Paper
Enrolment No.___________
GUJARAT TECHNOLOGICAL UNIVERSITY
BE- SEMESTER?VI (NEW) EXAMINATION ? WINTER 2020
Subject Code:2160704 Date:27/01/2021
Subject Name:Theory of Computation
Time:02:00 PM TO 04:00 PM Total Marks: 56
Instructions:
1. Attempt any FOUR questions out of EIGHT questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
Q.1 (a) Discuss Recursive definition. Also define the language L defined by the 03
following recursive definition over = {a, b}:
^ L;
For every x L, xa, bx, and abx are in L;
Nothing else is in L.
(b) Let relation R = {(a,b) : a + b = 10 and a, b N}. Decide whether R is an 04
equivalence relation or not. Justify your answer with proper reason.
(c) Using the principle of mathematical induction, for all n > 0, prove that, 07
( + 1) (4 - 1)
1 ? 2 + 3 ? 4 + 5 ? 6 + . . . . . + (2n - 1) ? 2n =
3
Q.2 (a) Write regular expressions for the following languages defined over = {0, 1}:
03
(i)
The language of all the strings that do not end with 01.
(ii) The language of all the strings containing even number of 0's and even
number of 1's.
(b) Draw DFA for the following languages defined over = {a, b}:
04
(i)
The language of all the strings with next-to-last symbol is a.
(ii) The language of all the strings containing substring bba.
(c) Convert the following NFA into its equivalent DFA using the subset 07
construction.
Q.3 (a) Prove that the context-free languages are closed under union.
03
(b) For the following CFG, find out two left most derivations for the string "aaabb" 04
and also draw the corresponding parse trees.
S XY
X XX | a
Y YY | b
(c) Define CNF. Also convert the following CFG into its equivalent CNF.
07
S aX | Y | bab
X ^ | Y
Y bb | bXb
Q.4 (a) What language over {a, b}* does the CFG with productions
03
S aT | bT
T aS | bS | ^
generate? Prove your answer.
1
(b) Let M1 and M2 be the FAs pictured in Fig. (i) and Fig. (ii) accept the languages 04
L1 and L2, respectively.
Fig. (i)
Fig. (ii)
Draw FAs accepting the following languages:
(i)
L1 L2
(ii) L
2
(c) Find context-free grammar generating the languages below.
07
(i)
{aibjck | j = i or j = k}
(ii) {aibjck | j i + k}
Q.5 (a) Define - A Pushdown Automaton and acceptance by a PDA.
03
(b) Convert the CFG with following productions into its equivalent PDA.
04
S [S] | SS | ^
(c) Design a PDA to accept L = {wcwR | w (a,b)*}.
07
Q.6 (a) Discuss pumping lemma for context free languages.
03
(b) Define bijection. Decide and justify whether the function f : N N defined by 04
f(n) = n2 is bijection or not.
(c) Design a PDA to accept L = {xcy | x, y (a,b)* and |x| = |y|}.
07
Q.7 (a) Discuss - recursively enumerable languages.
03
(b) Discuss - universal Turing machine.
04
(c) Draw Turing machine for L = {xx | x {a, b}*}. Also trace out the same on 07
input string aba.
Q.8 (a) Discuss chomsky hierarchy.
03
(b) Discuss primitive recursive function using proper example.
04
(c) Draw Turing machine to accept language L = {x {a, b}* | x ends with aba}. 07
Also trace out the same on input string aba.
*************
2
This post was last modified on 04 March 2021