Enrolment No.
/Seat No_____________
GUJARAT TECHNOLOGICAL UNIVERSITY
BE - SEMESTER–VI (NEW) EXAMINATION – SUMMER 2024
Subject Code:3160704 Date:15-05-2024
Subject Name:Theory of Computation
Tim[Link] AM TO 01: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) Suppose A and B are sets, 𝑓 = 𝐴 → 𝐵 and 𝑔 = 𝐵 → 𝐴. If 𝑓(𝑔(𝑦)) = 𝑦 for 03
every 𝑦 ∈ 𝐵, then f is a _______ function and g is a ______ function. Give
reasons for your answers.
(b) Given three statements p, q and r. 𝑝: 𝑎 = 1, 𝑞: 𝑏 = 0, 𝑟: 𝑐 = 3. 04
𝑊𝑟𝑖𝑡𝑒 𝑡ℎ𝑒 𝑓𝑜𝑙𝑙𝑜𝑤𝑖𝑛𝑔 𝑠𝑡𝑎𝑡𝑒𝑚𝑒𝑛𝑡𝑠 𝑠𝑦𝑚𝑏𝑜𝑙𝑖𝑐𝑎𝑙𝑙𝑦, 𝑢𝑠𝑖𝑛𝑔 𝑝, 𝑞, 𝑟, ⋁, ⋀ , ¬ 𝑎𝑛𝑑 →
𝑜𝑛𝑙𝑦.
1. Either 𝑎 = 1 or 𝑏 ≠ 0.
2. 𝑏 = 0 , but neither 𝑎 = 1 𝑛𝑜𝑟 𝑐 = 3.
(c) [Link] lemma for regular languages. 07
4.
Q.2 (a) Define Chomsky Normal Form of grammar. 03
5.
(b) Define a Moore machine. 04
6.
(c) Apply the rules and convert the given NFA-λ to FA. 07
OR
(c) Draw the NFA-λ for r = (0)11* + (101)* 0 and also construct the equivalent NFA 07
and FA for the same.
Q.3 (a) Given two languages L1 and L2 defined over Σ = {a, b}∗ , L1 accepts palindrome 03
strings and L2 accepts strings with equal number of 0’s and 1’s. Which one of these
languages is regular? Give reasons.
(b) Show how, if a pushdown automaton recognizes some language, then it is context 04
free.
(c) If a regular expression is given as (001)* (01 + 10). Apply the rules to construct a 07
regular grammar for this language.
OR
Q.3 (a) Construct a Finite Automata that accepts all strings containing 010 or 111 as sub- 03
string only.
1
(b) Apply pumping lemma to show that the language 𝐿 = {𝑎𝑛 𝑏 𝑛 𝑐 𝑛 | 𝑛 ≥ 0} is not 04
context free.
(c) Apply the rules and show step by step conversion of the following grammar to 07
CNF.
S → ASA | aB
A→B|S
B→b|ϵ
Q.4 (a) Define DPDA with clear definition of δ (transition function). 03
(b) Discuss intersection of CFLs with an example. 04
(c) Apply the rules and step by step create a Turing Machine to accept 𝐿 = {𝑎𝑛 𝑏 𝑛 } 07
OR
Q.4 (a) The language of DPDA is called DCFL. Explain whether this statement is true or 03
false.
(b) Discuss complement of CFLs with an example. 04
(c) Construct a Turing machine to accept even palindrome over Σ = {a,b}* 07
Q.5 (a) Explain the concept of undecidable problems. 03
(b) Discuss multi-tape Turing machine. 04
(c) Write a note on Primitive Recursive functions. 07
OR
Q.5 (a) A language is decidable if and only if some nondeterministic Turing machine 03
decides it. Explain the statement.
(b) Regular languages and CFLs are both decidable and Turing-recognizable. Explain 04
whether true or false.
(c) Define and explain Bounded Quantification. 07
*************