Вы находитесь на странице: 1из 2

B.TECH.

DEGREE EXAMINATION, JANUARY 2007


Eighth Semester
Branch: Computer Science and Engineering
THEORY OF COMPUTATION (R)
(Old Scheme-Prior to 2002 Admissions-Supplementary)

Part A
1. Let A, B are finite or infinite sets. Prove Au B = B if A is a subset of B and A (\ B = A.
2. Prove that set of prime numbers is infinite.

3. Prove by using pumping lemma, L = {on In, n ~ o} is not regular.


4. List out the differences between NFA and DFA.
5. (i) Define undecidable problems.
(ii) Give an example for an undecidable.problem.

6.. Write the turing machine code for M = ({q1' q2' q3}' {O,I}, {O,1, B}, (, q, B, {q2} ) with the

8
www.qpaper.in
following moves :-

(q1' 1) = (Q3' 0, R).

8 (Q3' 0) = (Q1' 1, R).


8 (Q3' 1) = (<]2' 1, R)'.

8 (Q3' B) = (Q2' 1, L).


7. Define n! by recursion.
8. Define partial recursive function. Explain with an example.
9. If g (n) = n (n + 1)/2, {(n) =n
3, prove thatg (n) = 0 (f(n)).
O. What is P and NP hard problem?

Part B

1. (i) Show that if 8 is a finite set, then, 1281 = 2181.

(ii) If s 1 and S2 are finite sets, show th'at IS1 * s21 h Ils21·
2 F
,.
12. Let binary alphabet L
1
= to, l} ternary alphabet L2 = to, 1, 2}. Write the resultant for the following:

(ii) L2·
(i) L*l·
(iv) L1 u L2•
(iii) L1• L2•
* (vi) Ll U L*2'
(v) (Ll U Lz) .

13. Consider G = ({E}, {+, *, id,} P, E), where P consists of E ~ E + E/E* E/id.
(i) Write right most and left most derivation for the string id + id * id.
(ii) Draw the derivation tree of id + id * id.
(iii) If G ambiguous? Justify your answer.

www.qpaper.in
14. Construct a minimal DFA for b (a/b)* a·
15. Design a turing machine for f(m, n) =m- n, m > n.
Or

16. Design a turing machine for L {an c 'b


n, n ~ O}.
17. Prove f(m, n) = m + n is a total recursive function.
Or
18. Give recursive definitions for a * b and explain briefly.

19. Show that L = {w wR w : w E {a, bf} is in D time (n).

Or
(12
20. Explain computationally intractable problems.
[5 x 12 = 60

Вам также может понравиться