Skip to content
Previous Year Question Paper

CS-501 - Theory of Computation

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

• Attempt any five questions.

• All questions carry equal marks.

Q.1
a)Unit 1

Explain Moore and Mealy machines with examples. How do they differ in output behaviour?

b)Unit 1

Convert the given Moore machine to a Mealy machine: States: {A,B}\{A, B\} Output: A/0, B/1 Transitions: A→aB,A→bA,B→aA,B→bBA \to aB, A \to bA, B \to aA, B \to bB

Q.2
a)Unit 2

What is a 2-way DFA? How does it differ from standard DFA in terms of tape head movement?

b)Unit 2

Minimize the DFA with states {A,B,C,D}\{A,B,C,D\}, where A is initial, C is final, and transitions: A→aB,A→bA;B→aC,B→bA;C→aC,C→bD;D→aC,D→bAA \to aB, A \to bA; B \to aC, B \to bA; C \to aC, C \to bD; D \to aC, D \to bA

Q.3
a)Unit 3

Explain ambiguity in context-free grammars with an example. How can it be resolved?

b)Unit 3

Convert the grammar S→aSb∣SS∣ϵS \to aSb \mid SS \mid \epsilon to Chomsky Normal Form (CNF).

Q.4
a)Unit 4

Describe the conversion from PDA to CFG using the standard algorithm.

b)Unit 4

Construct a PDA for the language L={wwR∣w∈(a+b)}L = \{ww^R \mid w \in (a+b)\}.

Q.5
a)Unit 5

Compare multi-tape and multi-head Turing machines. How do they affect computational power?

b)Unit 5

Explain the concept of NP-complete problems with examples.

Q.6
Unit 5

Differentiate between decidable and recursively enumerable languages.

Q.7
a)Unit 5

Discuss the significance of the Recursion Theorem in computability theory.

b)Unit 5

Prove that the Halting Problem is undecidable using diagonalization.

Q.8
Unit 2

For the regular expression (a+b)ab(a+b)(a+b)ab(a+b), calculate the minimum number of states in equivalent NFA and DFA.