*X10319* Reg. No.
Question Paper Code : X 10319
B.E./B.Tech. Degree ExaminationS, november/december 2020
Fifth Semester
Computer Science and Engineering
CS 8501 – THEORY OF COMPUTATION
(Regulations 2017)
Time : Three Hours Maximum : 100 Marks
Answer all questions
Part – A (10×2 = 20 Marks)
1. Define Deterministic Finite Automaton.
2. State any four types of proofs.
3. Write the regular expression for all strings that contain no more than one
occurrence of aa.
4. Write a regular expression for even number of a’s and even number of b’s of a
string w = {a, b}*.
5. Write a Context Free Grammar for the language consisting of equal number of
a’s and b’s.
6. Define Deterministic PDA.
7. What are the two normal forms of CFG ? Write their productions format.
8. Define the language recognized by any Turing Machine.
9. What are recursive languages ?
10. Define the classes P and NP problem. Give example problems for both.
Part – B (5×13 = 65 Marks)
11. a) Prove that for every L recognized by an NFA, there exists an equivalent DFA
accepting the same language L.
(OR)
b) Prove that for every L recognized by an ∈-NFA, there exists an equivalent DFA
accepting the same language L.
X 10319 *X10319*
12. a) Prove that the following languages are not regular using pumping lemma.
i) All unary strings of length prime. (7)
ii) L = {uu|u∈{0, 1}*}. (6)
(OR)
b) State and Prove any two closure properties of Regular Languages.
13. a) How ∈-productions are eliminated from a grammar whose language doesn’t
have empty string ? Remove ∈-productions from the grammar given below.
S → a|aA|B|C A → aB| ∈ B → Aa C → aCD D → ddd
(OR)
b) Write procedure to find PDA to CFG. Give an example for PDA and its CFG.
14. a) How a CFG for L is converted into CNF accepting the same language ? Convert
the following CFG into CFG in CNF.
S→bA|aB A→bAA|aS|a B→aBB|bS|b
(OR)
b) Construct a Turing Machine for proper subtraction, which is defined as m – n
if m > n and 0 otherwise.
15. a) Prove that Universal language is recursively enumerable but not recursive.
(OR)
b) Define PCP and prove that PCP is undecidable.
Part – C (1×15 = 15 Marks)
16. a) Construct a Turing Machine for multiplying two non negative integers using
subroutine.
(OR)
b) How PDA is converted into CFG ? Convert the following PDA into CFG.
P = ({p, q}, {0, 1}, {Z, X}, δ, p, Z, Φ)
δ (p, 1, Z) = {(p, XZ)}, δ (p, ∈, Z) = {(p,∈)} δ (p, 1, X) = {(p, XX)},
δ (q, 1, X) = {(q, ∈)}, δ (p, 0, X) = {(q, X)}, δ (q, 0, Z) = {(p, Z)}
–––––––––––––