Skip to content
Previous Year Question Paper

CS-501 - Theory of Computation

November 2023•CSE•SEMESTER-5
November 2023
Max Marks: 70
Duration: 3 Hours
Instructions:

• Attempt any five questions.

• All questions carry equal marks.

Q.1
a)Unit 2

Draw a DFA to accept string of 0's and 1's not ending with the string 01.

b)Unit 2

Design a DFA to accept string of 0's and 1's when interpreted as binary numbers would be multiple of 3.

Q.2
a)Unit 3

Find the context free grammar with no useless symbols equivalent to S→AB/CA,B→BC/AB,A→a,C→aB/bS \to AB/CA, B \to BC/AB, A \to a, C \to aB/b

b)Unit 2

Derive regular expression from this finite automata. alt=''

Q.3
a)Unit 3

What is meant by ambiguous grammar? Test whether the grammar is ambiguous or not S→SS/a/bS \to SS/a/b

b)Unit 2

Construct an equivalent FA for the given regular expression (0+1)∗(00+11)(0+1)∗(0+1)^* (00+11) (0+1)^*.

Q.4
Unit 3

Construct the following CFG grammar

i) ambncna^m b^n c^n where m,n≥1m, n \ge 1

ii) Obtain a CFG to generate a integer

Q.5
Unit 4

Construct the PDA accepting the language:

i) L={(ab)n∣n>=1}L = \{ (ab)^n | n >= 1 \} by empty stack.

ii) L={(wwR)∣w is in (a+b)∗}L = \{ (ww^R) | w \text{ is in } (a+b)^* \} by empty stack.

iii) L={anbn∣n>=1}L = \{ a^n b^n | n >= 1 \} by empty stack.

Q.6
a)Unit 4

Let G be the grammar given by S→AABB/AAA,A→ABB/a,B→BBB/AS \to AABB/AAA, A \to ABB/a, B \to BBB/A construct the PDA that accepts the language generated by this grammar G.

b)Unit 3

Define the context free grammars in the 4 tuple from (V,T,P,S)(V, T, P, S) for the given languages on Σ=(a,b)\Sigma = (a, b).

i) All strings having atleast two 'a's.

ii) All possible strings not containing triple 'b's.

Q.7
a)Unit 5

What is the difference between a recursive and recursively enumerable languages?

b)Unit 5

What do you mean by saying that the halting problem of TM is undecidable?

Q.8
Unit 5

Write short notes on : (Any three)

i) Post correspondence problem

ii) Halting problem

iii) Closure property of regular grammar

iv) Turing machine