Skip to content
Previous Year Question Paper

CSIT-503 (A) - Theory of Computation

November 2022•CSIT•SEMESTER-5
November 2022
Max Marks: 70
Duration: 3 Hours
Instructions:

• Attempt any five questions.

• All questions carry equal marks.

Q.1
a)Unit 2

Compute the Regular Expression for the DFA as shown below. alt=''

b)Unit 1

Design DFA's for detecting 1100 Sequence with Overlap over the alphabet Σ={0,1}\Sigma = \{0, 1\}.

Q.2
a)Unit 1

Design a NFA that accepts the language over the alphabet, Σ={0,1,2}\Sigma = \{0, 1, 2\} where the decimal equivalent of the language is divisible by 4.

b)Unit 3

Identify the language, L generated by the following grammar, G: G=({A,B},{a,b},{S→Aaa∣A},{B→bbb∣B},S)G = (\{A, B\}, \{a, b\}, \{S \to Aaa \mid A\}, \{B \to bbb \mid B\}, S)

c)Unit 1

Convert the following NFA to an equivalent DFA. alt=''

Q.3
a)Unit 2

Find a regular grammar that generates the language on {a,b}\{a, b\} consisting of all strings with at most one a's and more than two b's.

b)Unit 4

Construct Non-Deterministic Pushdown Automata (NPDA) to accept the language {w∣w starts and ends with the same symbol}\{w \mid w \text{ starts and ends with the same symbol}\} over the alphabet, Σ={0,1}\Sigma = \{0, 1\}.

Q.4
a)Unit 3

Construct context free grammars to accept the language L(G)={anbmcpdn∣n≥0,m>0}L(G) = \{a^n b^m c^p d^n \mid n \ge 0, m > 0\} over the alphabet, Σ={a,b,c,d}\Sigma = \{a, b, c, d\}.

b)Unit 4

Give a Deterministic PDA that accepts {anbm∣n≥m+2}\{a^n b^m \mid n \ge m + 2\} over the alphabet, Σ={a,b}\Sigma = \{a, b\}.

Q.5
a)Unit 5

Construct a Turing Machine (TM) to accept the language L={0n1n2n∣n>0}L = \{0^n 1^n 2^n \mid n > 0\} over the alphabet, Σ={0,1,2}\Sigma = \{0, 1, 2\}.

b)Unit 4

Construct corresponding CFG for the following NPDA. alt=''

Q.6
a)Unit 4

Give a Deterministic PDA that accepts {anbm∣n≥m+2}\{a^n b^m \mid n \ge m + 2\} over the alphabet, Σ={a,b}\Sigma = \{a, b\}.

b)Unit 4

Give an NPDA that simulates the following grammar (S is start symbol): S→aABB∣aAAS \to aABB \mid aAA A→bBB∣aA \to bBB \mid a B→bBB∣AB \to bBB \mid A

Q.7
a)Unit 5

Prove that the problem of determining whether for a Turing machine M there is some input string for which M halts is undecidable.

b)Unit 5

Prove that the recursive languages are closed under union, intersection, and complement.

Q.8
a)Unit 3

Given the following ambiguous context free grammar S→aAb∣aAaS \to aAb \mid aAa A→a∣AaA \to a \mid Aa B→bB \to b

i) Find the string S generated by the grammar that has two leftmost derivations. Show the derivations.

ii) Show the two derivation trees for the string S.

iii) Find an equivalent unambiguous context-free grammar.

iv) Give the unique leftmost derivation and derivation tree for the string S generated from the unambiguous grammar above.