Browse papers
A

Section A: Long Answer Questions

Attempt all / any as specified.

4 questions
1long12 marks

(a) Distinguish between a Deterministic Finite Automaton (DFA) and a Non-deterministic Finite Automaton (NFA) with respect to their transition functions and computational power. (4)

(b) Consider the NFA MM over the alphabet Σ={0,1}\Sigma = \{0,1\} with start state q0q_0, accepting state q2q_2, and the following transitions: δ(q0,0)={q0,q1}\delta(q_0,0)=\{q_0,q_1\}, δ(q0,1)={q0}\delta(q_0,1)=\{q_0\}, δ(q1,1)={q2}\delta(q_1,1)=\{q_2\}. Convert MM into an equivalent DFA using the subset construction method, showing the resulting state table and the corresponding state diagram. (8)

finite-automatadfa-nfasubset-construction
2long12 marks

(a) Define a Context-Free Grammar (CFG) formally as a 4-tuple. Show that the grammar with productions EE+EEE(E)idE \rightarrow E + E \mid E * E \mid (E) \mid \text{id} is ambiguous by giving two distinct parse trees for the string id+idid\text{id} + \text{id} * \text{id}. (6)

(b) Construct a Pushdown Automaton (PDA) that accepts the language L={anbnn1}L = \{ a^n b^n \mid n \geq 1 \} by final state. Clearly specify the transition function and trace the acceptance of the string aabbaabb. (6)

context-free-grammarambiguitypushdown-automata
3long12 marks

(a) Design a Turing Machine that accepts the language L={w{a,b}w contains an equal number of a’s and b’s}L = \{ w \in \{a,b\}^* \mid w \text{ contains an equal number of } a\text{'s and } b\text{'s} \}. Give the transition table and explain the working of your machine on the input abbaabba. (8)

(b) State the Halting Problem and prove that it is undecidable. (4)

turing-machinedecidabilityhalting-problem
4long12 marks

(a) State the rules for constructing regular expressions and write a regular expression over Σ={0,1}\Sigma = \{0,1\} for the language of all strings that contain at least two consecutive 00's and end with a 11. (5)

(b) State the Pumping Lemma for regular languages and use it to prove that the language L={anbnn0}L = \{ a^n b^n \mid n \geq 0 \} is not regular. (7)

regular-expressionspumping-lemmaregular-languages
B

Section B: Short Answer Questions

Attempt all / any as specified.

8 questions
5short7 marks

Design a DFA over the alphabet Σ={0,1}\Sigma = \{0,1\} that accepts all strings in which the number represented by the binary string is divisible by 33 (read most significant bit first). Draw the state diagram and briefly justify each state.

dfa-designfinite-automata
6short7 marks

Convert the regular expression (ab)ab(a \mid b)^* ab into an equivalent NFA with epsilon-transitions using Thompson's construction. Show each step of the construction.

regular-expressionsfinite-automata
7short6 marks

Convert the following context-free grammar into Chomsky Normal Form (CNF):

SASAaBS \rightarrow ASA \mid aB

ABSA \rightarrow B \mid S

BbεB \rightarrow b \mid \varepsilon

context-free-grammarchomsky-normal-form
8short7 marks

Differentiate between deterministic and non-deterministic pushdown automata. Construct a PDA equivalent to the grammar SaSbεS \rightarrow aSb \mid \varepsilon and explain why this language cannot be accepted by any finite automaton.

pushdown-automatacfg-to-pda
9short6 marks

(a) Explain the formal definition of a standard (single-tape) Turing Machine as a 7-tuple. (3)

(b) Briefly describe a multi-tape Turing Machine and state whether it is more powerful than a single-tape Turing Machine, justifying your answer. (3)

turing-machinevariants
10short6 marks

Differentiate between recursive (decidable) and recursively enumerable languages with the help of suitable examples. Explain the relationship between the two classes using a closure-under-complement argument.

decidabilityrecursive-recursively-enumerable
11short7 marks

(a) Define the complexity classes PP and NPNP and explain what is meant by an NPNP-complete problem. (4)

(b) State the significance of the PP versus NPNP question and give one example of a well-known NPNP-complete problem. (3)

computational-complexityp-npnp-completeness
12short6 marks

Using the principle of mathematical induction, prove that for every integer n1n \geq 1, the number of distinct strings of length nn over an alphabet Σ\Sigma with Σ=k|\Sigma| = k is exactly knk^n. Clearly state the basis and the inductive step.

mathematical-inductionformal-proofs