Skip to content
Previous Year Question Paper

CS-501 - Theory of Computation

December 2025•CSE•SEMESTER-5
December 2025
Max Marks: 70
Duration: 3 Hours
Instructions:

• Attempt any five questions.

• All questions carry equal marks.

Q.1
a)Unit 1

Explain finite automata as language acceptors and translators.

b)Unit 1

Design a Mealy machine that outputs '1' whenever the input symbol is '1', otherwise outputs '0'.

Q.2
a)Unit 2

Explain deterministic and non-deterministic finite automata with examples.

b)Unit 2

Convert the given NDFA to an equivalent DFA: States {q0,q1}\{q0, q1\}, Alphabet {a,b}\{a, b\}, Transitions: δ(q0,a)={q0,q1}\delta(q0, a)=\{q0, q1\}, δ(q0,b)={q0}\delta(q0, b)=\{q0\}, δ(q1,b)={q1}\delta(q1, b)=\{q1\}. Final state= q1q1

Q.3
a)Unit 2

Explain regular expressions and Arden's theorem.

b)Unit 2

Write a regular expression for the language over {a,b}\{a, b\} that contains strings ending with "ab".

Q.4
a)Unit 3

Explain context free grammar and derivation trees.

b)Unit 3

For the grammar: S→aSb∣abS \to aSb \mid ab, derive the string "aabb" and draw its parse tree.

Q.5
a)Unit 3

Explain ambiguity in grammar and methods to remove it.

b)Unit 3

Convert the grammar into Chomsky Normal Form: S→AB∣A,A→a,B→bS \to AB \mid A, A \to a, B \to b

Q.6
a)Unit 4

Explain pushdown automata and deterministic and non-deterministic PDAs.

b)Unit 4

Design a PDA for the language L=anbn∣n≥1L={a^n b^n \mid n \ge 1}.

Q.7
a)Unit 5

Explain Turing machines and techniques for their construction.

b)Unit 5

Design a Turing machine to accept strings over {0,1}\{0,1\} having even number of 1's.

Q.8
a)Unit 5

Explain decidable, undecidable, recursive, and recursively enumerable languages.

b)Unit 5

What is the halting problem? Explain why it is undecidable.