Gujarat Technological UniversitySummer 2026 Examination

GTU 3160704 Theory of Computation (TOC) Summer 2026 Paper Solution & PDF

B.E. · Computer Engineering · Semester 6 · Subject Code: 3160704
Download Official GTU PDF
Share:
Total Marks70 MarksExternal theory exam
Passing Marks23 Marks33% minimum cutoff
Exam Duration2.5 Hours10:30 AM – 1:00 PM
Paper Structure5 QuestionsWith internal OR choices
Jump toQ1Q2Q3Q4Q5

Question 1

14 MarksMedium
(a)

In each case, say whether the indicated function is one-to-one and onto.

if : R+ → R+ defined by f(x) = 2x
iig : R+ → N defined by g(x) = ⌊x⌋ ( the largest integer ≤ x)
3 Marks
(b)
Derive the string a + (a * a) / a – a using leftmost derivation and rightmost derivation for
following grammar.
G : S → S + S | S – S | S * S | S/S | ( S ) | a
4 Marks
(c)
iUsing the principle of Mathematical Induction, Prove that for every n ≥ 1, ii. In following case, a relation on the set {1, 2, 3} is given. Of the three properties, reflexivity, symmetry, and transitivity, determine which ones the relation has. Give reasons. R ={ (1, 1), (2, 2), (3, 3), (1, 2) }
i)Using the principle of Mathematical Induction, Prove that for every n ≥ 1, ii. In following case, a relation on the set {1, 2, 3} is given. Of the three properties, reflexivity, symmetry, and transitivity, determine which ones the relation has. Give reasons. R ={ (1,
1), (2,
2), (3,
3), (1,
2)}
7 Marks

Question 2

14 MarksMedium
(a)
Find a regular expression corresponding to each of the following subsets of {0, 1}*.
iThe language of all strings that begin or end with 00 or 11.
iiThe language of all strings in which every 0 is followed immediately by 11.
3 Marks
(b)
Convert the following mealy machine into moore machine.
4 Marks
(c)
Use minimization algorithm to find a minimum-state FA.
7 Marks
OR OPTION
(c)
Convert following NFA-^ to an NFA.
7 Marks

Question 3

14 MarksMedium
(a)

Let M1 and M3 be the FAs shown in below figure, recognizing languages L1 and L3 respectively. Draw FAs recognizing the language L1 ∩ L3.

GTU Theory of Computation (3160704) Summer 2026 Question 3(a) Diagram
3 Marks
(b)
Write a CFG for the regular expression : (011 + 1)*(01)*.
4 Marks
(c)
Find context-free grammar for the following language :
i)L = {0i 1j 0k | j > i + k}4 Marks
ii)The set of odd-length strings in {a, b}* whose first, middle and last symbols are all the same.
7 Marks
OR OPTION
(a)
For following regular expression, draw an FA recognizing the language 0 + 10* + 01*0.
3 Marks
(b)

Check whether the grammar is ambiguous or not ?

iG : S → A | B ii. G : S →aSb | aaSb | ^ A → aAb | ab B → bB | ^
4 Marks
(c)
Given the context-free grammar G, find a CFG G’ in Chomsky Normal Form.
G : S → aAa | bBb | ^
A → aBb | bBa
B → aB | bB | ^
7 Marks

Question 4

14 MarksMedium
(a)
Explain in brief Post’s Correspondence Problem.
3 Marks
(b)
Construct the equivalent PDA for the following CFG :
S → XaY | YbX
X → YY | aY | b
Y → b | bb
4 Marks
(c)
Design PDA for the language which accepts balanced strings of brackets { } and [ ].
7 Marks
OR OPTION
(a)
Define Bounded Minimalization.
3 Marks
(b)
Show that L = {ww | w ∈ {0, 1}*} is not context free language.
4 Marks
(c)
Design PDA to accept L = { x ∈ {a, b}* | na(x) > nb(x)}.
7 Marks

Question 5

14 MarksMedium
(a)
Define Constant function, successor function and Projection function.
3 Marks
(b)
Write short note on Universal Turing Machine.
4 Marks
(c)

Design a Turing Machine that accepts the language of all strings which contain aba as substring. Trace on input string ababab.

7 Marks
OR OPTION
(a)
Show that the multiplication is primitive recursive.
3 Marks
(b)
Write short note on Church-Turing Thesis.
4 Marks
(c)
Design a Turing Machine that accepts the language of palindromes over {a, b}.
7 Marks
College Exam Groups

Studying for Theory of Computation?

Circulate this solved paper with KaTeX formulas and 1-click AI step solvers to your batchmates on WhatsApp or Telegram.

About this Examination Paper & Attribution

Official Gujarat Technological University (GTU) examination paper and step-by-step solutions for Theory of Computation (TOC) (Summer 2026, B.E. · Computer Engineering, Sem 6). Features complete 70-mark regular & remedial examination pattern, official marking distribution across all 5 questions, and direct 1-click official PDF download.

Transcribed for student exam preparation from Gujarat Technological University official examination archives. Questions, syllabus guidelines, and curriculum marking schemes remain the intellectual property of Gujarat Technological University.

Download PDF