Sunteți pe pagina 1din 2

# 29. a. Convert the following grammar to GNF Reg. No.

S+XAIBB
B+blSB
X+b B.Tech. DEGREE EXAMINATION, NOVEMBER 2017
A-+a Third/ Fourth/ Fifttr Semester

## (oR) I5CS3O1 - TIIEORY OF COMPUTATION

b. State CNF and convert the following CFG to CNF (For the candidates admitted during the academic year 2015 - 2016 onwards)
S--+ABAIBaAIA Note:
A+BalSle (i) Part - A should be answered in OMR sheet within first 45 minutes and OMR sheet should be handed
over to hall invigilator at the end of 45ft minute.
B-+Balblca (ii) Part - B and Part - C should be answered in answer booklet.
C+Ca
D+DaDla Time: Three Hours Max. Marks: 100

30. a. Construct a PDA for the language 1 = w e {0,1}} using empty stack. PART-A(20x1=20Marks)
1**R I
Answer ALL Questions
(oR)
b. Construct CF-G for the PDA
1. A language is regular if and only if
(A) Accepted by DFA (B) Accepted by PDA
6(q,0,2) = (q,02)
(C) Accepted by LBA (D) Accepted by Turing Machine
6(q,l,z) = (q,lz)
d(q,0,0): (q,00) 2. The set of all strings over the alphabet s = {a,b\ (including e) is denoted by
5(q,1,1) = (q,ll) (A) @+b)* (B) @+b)+
6(q,0,1) = (q,e) (C) a* b* (D) ,* b*
d(9,1,0) = (q,e)
3. Pumping lemma is based on
5(q,e,z) = (q,e) (A) Pigeonholeprinciple (B) Mathematical induction
(C) Contradiction method (D) Deductive proofs
31. a. Design a Turing Machine to recognize the langu a5e L =
{ln2n3n ln>l}.
4. Regular expression for all strings starts with 'ab' and ends with 'bba' is
(oR) (A) aba*b*bba (B) ab@b)*bba
b. Compute a Turing Machine that performs multiplication of 2 unary numbers. (c) ab(a+b)*bba (D) ab(a* +b*1bba

32. a. State and prove post correspondence problem with an example. 5. Following context free grammar \$-raBlbA, A+blaSlbAA, S+blbSlaBB generates strings of
terminals that have
(oR) (A) Equal number of a's and b's (B) Odd number of a's and b's
b.i. Show that the union of two recursive language is recursive and union of two recursively (C) Even number of a's andb's (D) Odd number of a's and even number of b's
enumerable language is also recursive.
6. The CFG S+aSlbslalb is equivalent to regular expression
ii. Define the language 'Lu' and show that 'Lu' is recursively enumerable language. (A) a+b (B) @+b\(a+b)*
(C) (a + b)(a + b) (D) @+b)*
,F****
7. Which of the following is not generated by the gralnmar S+SaSbSle
(A) aabb (B) aababb
(C) abab (D) aaabb
8. Which of the following context free language is inherently arnbiguous?
(A) {anbncmdm l,n,m>l\ (B) {anbmcP 64 ln = por m = Q, ft,ffi, P,q>l\
(C) p* q} (D) {anbn,n>a}
{anbmcP{T ln* mn
22NF3/4/5rsCS301
Page 4 of4 22NF3/4/s15CS30l Page I of4
Push down machine represents PART-B(5x4=20Marks)
(A) Type 0 grammar (B) Type 1 gmmmar Answer A1YY FM Questions
(C) Type 2 grammar (D) Type 3 grammar
n(n+l)(2n+l)
21. Prove the following using mathematical induction 12 +22 +32 +......r2 =
10. The idea of automaton with a stack as auxiliary storage?
(A) Finite automata (B) Non deterministic finite automata
(C) Pushdown automata (D) Deterministic automata 22. Yerify whether L: {r2n I n> l) is regular.

11. Equivalent CFG notation for the transition function 5(q1,a,A) = (q2,e) is 23. Give the left most and right most derivation for the sting'aobbbbaa' using the grammar
(A) lqAqzl-+ afqAqzl (B) lqlAq2l-+ a S+aBlbA
(C) lqlAq2l-+ e (D) lq2 A ql -+ a A+alaSlbAA
B+blbslaBB
12. Two stack PDA is equivalent to
(A) Deterministic finite automata (B) Nondeterministic finite automata 24- Convert the CFG to PDA
(C) Context free (D) Turing machine S-+0S01
1S1l
13. Which of the following problems is solvable? 1l0le
(A) Writing a universal Turing Machine (B) Determining of an arbitrary Turing
Machine is an Universal Turing Machine 25. Write short notes on
(C) Determining of a Universal Turing (D) Determining of a Universal Turing (i) NP-completeness
Machine can be written for fewer Machine and some input will halt (ii) NP-hardness
than k instruction for some k
14' Th" language 1: : n) 1} is recognized by 26. When a problem is said to be undecidable? Give an example of decidable problem.
{anbncn
(A) NFA (B) DFA
(C) (D) Pushdown machine 27. Explain Multitape Turing Machine. Is it more powerful than basic Turing Machine? Justif,
Turing machine
your answer.
15. Next move function 6 of a turing machine M = (Q,Z,f ,6,qg,B,F) is mapping of
(A) 6:QxZ, -+ QxT (B) 6:Qxf ->QxIx{I,R} PART-C(5x12:60Marks)
(C) 5:QxZ->Qxfx{Z,R} (D) 6:Qxf '+QxXx{Z,R} Answer ALL Questions

16. Which model is powerful (represent the correct order)? 28. a. Construct a regular expression given in the following state diagram
(A) TM < PDA < FSA (B) FSA < TM < PDA CI

(c) FSA < PDA < TM (D) FSA < TM < PDA

17. If there exists a language L, for which there exists a TM, T that accepts every word in L and
either rejects or loops for every word not in L, is called
(A) Recursive (B) Recursively enumerable
(C) NP hard (D) I.IP completeness
(oR)
18. Recursively enumerable languages are not closed under
(A) Union (B) Intersection
b. Consider the following c-NFA
(C) Complement (D) Concatenation
I e a b c
Qi
19. Which of the following problems is not NP-hard? -)p {q, r} 0 {q} {r}
(A) Hamiltonian circuit problem (B) 0/1 knapsack problem q 6 {p} {r} {p, q}
(C) Finding biconnected component of a (D) The graph colouring *r s 0 0 s
graph (i) Compute the e-closure of each state
20. Which of the following problems is undecidable? (ii) Convert the automata to DFA.
(A) Membership problem for CFG's (B) Ambiguity problem for CFG's
(C) Finiteness problem for FSA's @) Equivalence problem for FSA's
Page 3 of4 22NF3/4/5r5CS30l
Page2 of 4 22NF3/4/515CS301