Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Gujarat Technological University

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Seat No.: ________ Enrolment No.

___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–VI(NEW) EXAMINATION – WINTER 2022
Subject Code:3160704 Date:13-12-2022
Subject Name:Theory of Computation
Time:02:30 PM TO 05:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

Marks
Q.1 (a) Define the following functions: one-one, on-to, and inverse. 03
(b) Prove “There must be a prime number between n and n!” 04
(c) Write down 5-tuple definition for the finite automata. Construct the 07
minimal finite automata over Σ = {a,b} for the following languages.
L1 = {Where all the strings start and ends with different symbol}
L2 = {Where every string has odd occurrences of “ba”}
.
Q.2 (a) Enlist types of grammars, types of languages and types of automata. 03
(b) Define pumping lemma for regular language. 04
Show that the language L= {anbncn / n>=1} is non-regular using pumping
lemma theory.
(c) Construct the Moore machine that counts the no. of occurrences of 07
substring “bba” over Σ = {a,b}.
Now convert this Moore machine into Mealy machine. Show the transition
table and transition diagram for both the machines.
OR
(c) Define the steps to convert ε -NFA into NFA. Then convert the following 07
ε -NFA into NFA.

Q.3 (a) Define type 2 grammar with example. 03


(b) Construct the regular expressions for the following languages. 04
L1 = {Where the no. of ‘a’ is odd}, Σ = {a,b}
L2 = {Where every string starts with ‘0’ and of even length}, Σ = {0,1}
(c) What is Instantaneous Description? Construct the pushdown automata 07
over Σ = {a,b} for the language L = {an c bn / n>=1}.

1
OR
Q.3 (a) Define the following operations for Push Down Automata: PUSH, POP, 03
and SKIP.
(b) Construct the regular expressions for the following languages. 04
L1 = {Where every string starts with ‘b’ and does not contain 2
consecutive a’s}, Σ = {a,b}
L2 = {Where every string starts with ‘1’ and of odd length}, Σ = {0,1}
(c) Define: CNF. Show the steps to convert CFG into CNF. Convert the 07
following CFG into equivalent CNF.
S→TU
T → 0T1 | ε
U → 1U0 | ε

Q.4 (a) Enlist and explain the operations performed by tape in turing machine. 03
(b) Define pumping lemma for context free language. 04
Show that the language L= {ww / w ∈{a,b}*} is not context free language
using pumping lemma theory.
(c) Explain ambiguous and unambiguous context free grammar with example. 07
OR
Q.4 (a) Enlist closure properties for the context sensitive language. 03
(b) Discuss universal turing machine with example. 04
(c) Write down 7-tuple definition for the turing machine. 07
Construct the turing machine and its transition table over Σ = {a,b} for the
language L = {anbn / n>=1}.

Q.5 (a) State the following functions: Partial, Constant and Total. 03
(b) What is minimization? Explain with suitable example. 04
(c) Discuss Post’s Correspondence Problem with example. 07
OR
Q.5 (a) Define the following terms: Recursive language, and Recursive 03
Enumerable Language.
(b) Explain in detail: Class P and Class NP. 04
(c) Describe: Recursive function. Prove that every recursive function is 07
computable.
***************

You might also like