Rajiv Gandhi Proudyogiki Vishwavidyalaya, Bhopal
B.Tech. – Semester 5 | November 2023
CS-501 (GS) – Theory of Computation
Time: 3 hours | Maximum marks: 70
Attempt five questions. Each main question has equal weight (14 marks). In case of ambiguity, the English version takes precedence.
Questions restated for study purposes.
Question 1
1(a) Construct a DFA over {0,1} accepting strings that do not end in 01.
1(b) Design a DFA accepting binary representations of multiples of 3.
Question 2
2(a) Remove useless symbols from the CFG S→AB|Ca, B→BC|AB, A→a, C→aB|b.
2(b) Derive a regular expression for the automaton with initial q₀, final q₂ and transitions (on 0,1): q₀→(q₁,q₀), q₁→(q₂,q₁), q₂→(q₁,q₀).
Question 3
3(a) Define ambiguous grammar and determine whether S→SS|a|b is ambiguous.
3(b) Construct a finite automaton equivalent to (0+1)*(00+11)(0+1)*.
Question 4
4(i) Construct a CFG for aⁿbᵐcⁿ, where m,n≥1.
4(ii) Construct a context-free grammar that generates integers.
Question 5
5(i) Construct a PDA accepting L={(ab)ⁿ | n≥1} by empty stack.
5(ii) Construct a PDA accepting L={wwᴿ | w∈{a,b}*} by empty stack.
5(iii) Construct a PDA accepting L={a²ⁿbⁿ | n≥1} by empty stack.
Question 6
6(a) Construct a PDA accepting the language generated by S→aABB|aAA, A→aBB|a, B→bBB|A.
6(b)(i) Specify a CFG as a four-tuple (V,T,P,S) over {a,b} for strings containing at least two a symbols.
6(b)(ii) Specify a CFG as a four-tuple (V,T,P,S) over {a,b} for strings without the substring bbb.
Question 7
7(a) Explain the difference between recursive and recursively enumerable languages.
7(b) Explain what it means for the Turing machine halting problem to be undecidable.
Question 8
8(i) Write a short note on the Post correspondence problem.
8(ii) Write a short note on the halting problem.
8(iii) Write a short note on closure properties of regular grammars.
8(iv) Write a short note on Turing machines.
Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion