Skip to content
Previous Year Question Paper

CS-501 - Theory of Computation

November 2022•CSE•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 2

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

Q.2
a)Unit 2

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 3.

b)Unit 3

Identify the language, L, generated by the following grammar, G: G=({S,A,B},{a,b},{S→Aa,A→aB,B→bB∣b},S)G = (\{S, A, B\}, \{a, b\}, \{S \to Aa, A \to aB, B \to bB | b\}, S).

Q.3
a)Unit 2

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

b)Unit 3

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

Q.4
a)Unit 3

Construct context free grammars to accept the language L={an+2bn+1∣n=m}L = \{a^{n+2} b^{n+1} | n=m\} over the alphabet, Σ={a,b}\Sigma = \{a, b\}

b)Unit 4

Construct Non-Deterministic Pushdown Automata (NPDA) to accept the language L={0n+12n∣n>m}L = \{0^{n+1} 2^{n} | n > m\} over the alphabet, Σ={0,1}\Sigma = \{0, 1\}

Q.5
a)Unit 5

Construct Turing Machine (TM) to accept the language L={0n12n∣n>0}L = \{0^{n} 1^{2n} | 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 {anbncn∣m,n≥0}\{a^{n} b^{n} c^{n} | m, n \ge 0\} over the alphabet, Σ={a,b,c}\Sigma = \{a, b, c\}.

b)Unit 4

Give an NPDA that simulates the following grammar (S is start symbol): S→aBb∣cDDS \to aBb | cDD B→cd∣aSB \to cd | aS D→dD∣dD \to dD | d

Q.7
a)Unit 3

Show that the following language on Σ={a,b,c}\Sigma = \{a, b, c\} is not context-free. L={aibnaj∣i≥0}L = \{a^{i} b^{n} a^{j} | i \ge 0\}

b)Unit 5

Prove that a language L is recursive if and only if L and Lˉ\bar{L} are recursively enumerable.

Q.8
a)Unit 5

Prove that there is no algorithm that determines whether an arbitrary Turing Machine halts when run with the input string 101.

b)Unit 5

Prove that the problem of determining whether for a Turing Machine M the language L(M) is regular is undecidable.