TOC (7th&8th) May2015
TOC (7th&8th) May2015
of Pages : 02
Total No. of Questions : 09
B.Tech.(CSE) (2011 Batch) (Sem.–7,8)
THEORY OF COMPUTATION
Subject Code : BTCS-702
Paper ID : [A2986]
Time : 3 Hrs. Max. Marks : 60
INSTRUCTION TO CANDIDATES :
1. SECTION-A is COMPULSORY consisting of TEN questions carrying T WO marks
m
each.
2. SECTION-B contains FIVE questions carrying FIVE marks each and students
has to attempt any FOUR questions.
o
.r c
3. SECTION-C contains T HREE questions carrying T EN marks each and students
has to attempt any T WO questions.
SECTION A
1. Write briefly :
pe m
a o
.r c
a. Define an Automation System.
r p
b. Explain the acceptance of a string with NFA and DFA over same alphabet.
b
c. What is Chomsky classification of formal languages?
p e
a
d. Explain the languages supported by different automation and their relations.
b rp
f. What is the difference between acceptance of string in PDA with null stack or with
final state?
1 | M-71894 (S2)-165
SECTION B
2. Design a turning machine which recognizes the set of all even length palindromes over
{0, 1}.
3. Design a PDA which recognizes the set of all even length palindromes over {a, b}.
4. Show that if L1 and L2 are recursive languages, then L1 L2 and L1 L2 are also
recursive.
5. The language L is defined as the set of all string over {a, b} consisting of twice as many
a’s as b’s construct a context free grammar for language L and a pushdown automata
recognizing language L by empty store.
6.
m
Prove that there exist a DFA for every NFA which accept the same language.
o
7. .r c
SECTION C
Which of the following sets are context-free and which are not? Give grammar for those
pe
that are context-free and proof for those that are not.
(a) {an bm ck | n, m, k > = l and (2n = 3k or 5k = 7m)}
m
a o
.r c
n m k
(b) {a b c | n, m, k > = l and (n = !3 m or n = !5k)}
r p
(c) {an bm ck | n, m, k > = l and (n + k = m)}
i j k
b l
(d) {a b c d | i, j, k, l > = l, i = k, j = l}
(e) {ai bi ck dl | i, j ,k, l > = l, i = l, j = k}
p e
a
rp
8. (a) A PDA is called restricted if on any transition it can increase the height of the stack
by only one symbol, i.e., if E (q, a, z) = (p, y) such that |y| < = 2 and E is transition
b
function of PDA. Now show that for any PDA say P we can construct a restricted
PDA P’ such that L (P) = L (P’).
(b) Construct the equivalent grammar in CNF for the given CFG.
2 | M-71894 (S2)-165