Gujarat Technological UniversitySummer 2026 examination

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

B.E. · Computer Engineering · Semester 6 · Subject code 3160704
Download official PDFView PDF here
Share with your class
Total
70 marks
To pass
23 marks (33%)
Duration
2.5 Hours 10:30 AM – 1:00 PM
Questions
5 with internal choice
No solutions on this paper yetNeed them for your exam? Ask once. Papers that students ask for are solved first, and we aim to add them within 24 hours.

5 of 25 questions on this paper were also asked in other years. 12 more are types of question GTU sets again with new data. Each is marked below with the years it appeared.See all 34 repeated 3160704 questions, most asked first

Q.1

14 Marks
(a)
3 marks

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)
(b)
4 marks
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
(c)
7 marksSame type asked in 3 of 7 papers
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)}

Also asked in Winter 2025 Q1c, Winter 2023 Q1c

Q.2

14 Marks
(a)
3 marksSame type asked in 4 of 7 papers
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.

Also asked in Winter 2025 Q3a, Winter 2024 Q1b, Winter 2023 Q2b

(b)
4 marksSame type asked in 2 of 7 papers
Convert the following mealy machine into moore machine.

Also asked in Winter 2025 Q2a

(c)
7 marksSame type asked in 3 of 7 papers
Use minimization algorithm to find a minimum-state FA.

Also asked in Winter 2025 Q3c, Winter 2023 Q3c OR

(c)
7 marksSame type asked in 3 of 7 papers
Convert following NFA-^ to an NFA.

Also asked in Summer 2024 Q2c, Winter 2023 Q3c

Q.3

14 Marks
(a)
3 marksSame type asked in 3 of 7 papers

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

Also asked in Winter 2025 Q3b, Winter 2023 Q2c OR

(b)
4 marks
Write a CFG for the regular expression : (011 + 1)*(01)*.
(c)
7 marksSame type asked in 5 of 7 papers
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.

Also asked in Winter 2025 Q2b, Summer 2025 Q3c, Summer 2025 Q3b OR, Winter 2024 Q4a, Winter 2023 Q3a

(a)
3 marks
For following regular expression, draw an FA recognizing the language 0 + 10* + 01*0.
(b)
4 marksSame type asked in 4 of 7 papers

Check whether the grammar is ambiguous or not ?

iG : S → A | B ii. G : S →aSb | aaSb | ^ A → aAb | ab B → bB | ^

Also asked in Winter 2025 Q5a OR, Winter 2024 Q2c OR, Winter 2023 Q3a OR

(c)
7 marksSame type asked in 7 of 7 papers
Given the context-free grammar G, find a CFG G’ in Chomsky Normal Form.
G : S → aAa | bBb | ^
A → aBb | bBa
B → aB | bB | ^

Also asked in Winter 2025 Q5c OR, Summer 2025 Q3c OR, Winter 2024 Q4c OR, Summer 2024 Q3c OR, Winter 2023 Q4c OR, Summer 2023 Q3c

Q.4

14 Marks
(a)
3 marks
Explain in brief Post’s Correspondence Problem.
(b)
4 marksSame type asked in 2 of 7 papers
Construct the equivalent PDA for the following CFG :
S → XaY | YbX
X → YY | aY | b
Y → b | bb

Also asked in Winter 2023 Q4b

(c)
7 marksSame type asked in 3 of 7 papers
Design PDA for the language which accepts balanced strings of brackets { } and [ ].

Also asked in Winter 2024 Q3c, Winter 2023 Q5b, Winter 2023 Q5b OR

(a)
3 marksAsked in 3 of 7 papers
Define Bounded Minimalization.

Also asked in Winter 2025 Q5a, Summer 2023 Q5c

(b)
4 marksSame type asked in 3 of 7 papers
Show that L = {ww | w ∈ {0, 1}*} is not context free language.

Also asked in Winter 2025 Q4a OR, Summer 2024 Q3b OR

(c)
7 marksAsked in 2 of 7 papers
Design PDA to accept L = { x ∈ {a, b}* | na(x) > nb(x)}.

Also asked in Winter 2025 Q5c

Q.5

14 Marks
(a)
3 marks
Define Constant function, successor function and Projection function.
(b)
4 marksAsked in 2 of 7 papers
Write short note on Universal Turing Machine.

Also asked in Winter 2023 Q5a

(c)
7 marks

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

(a)
3 marks
Show that the multiplication is primitive recursive.
(b)
4 marksAsked in 2 of 7 papers
Write short note on Church-Turing Thesis.

Also asked in Summer 2025 Q5c OR

(c)
7 marksAsked in 3 of 7 papers
Design a Turing Machine that accepts the language of palindromes over {a, b}.

Also asked in Winter 2025 Q4c, Winter 2023 Q5c

More Theory of Computation papers

Questions repeat across sessions. Working through two or three papers shows you which topics GTU asks most.

Preparing with friends?

Send this paper to your class group. Every question has its own link.

About this paper

Official Gujarat Technological University (GTU) examination paper 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.

ViewDownload PDF