How To Exam?

a knowledge trading engine...


Gujarat Technological University 2010 M.C.A Theory of computation - Question Paper

Monday, 22 July 2013 10:50Web



GUJARAT TECHNOLOGICAL UNIVERSITY

MCA Sem-II Examination July 2010

Seat No.    Enrolment No.

Subject code: 620007

Subject Name: Theory of Computation Date: 09 / 07 /2010    Time: 11.00 am - 01.30 pm

Total Marks: 70

Instructions:

1.    Attempt all questions.

2.    Make suitable assumptions wherever necessary.

3.    Figures to the right indicate full marks.

4.

Q.1 (a) Define surjection , injection and bijection.    05

(b)    Explain : p q and pq.    05

(i)    Only two 0 and 1 in any order.

(ii)    String doesnt end with 11.

Q.2 (a) Give recursive definition for    04

Set of all strings in {0,1}* containing substring 00 .

( i ) (0+1)*(110)

( ii ) Language containing string of exactly two zeros.

OR

(i)    S aSa | bSb | A

(ii)    S aS | bS | a

(iii)    S aSb | bSa | a

Q.3 (a) Given that L1 = {x e (0,1)* | x ends with 01}    07

L2 = {x e (0,1)* | x ends with 11}

Give FA for L1 , L2 and L1 U L2.

OR

Q.3 (a) Find minimal FA for following FA.    07

Q={1,2,3,4,5,6} A= {3,6} and q0 =1 State input - a input -b

1

2

6

2

1

3

3

2

4

4

4

2

5

4

5

6

5

4

(b) Explain NFA - a . What are different kind of non-determinism possible in 07 NFA - a ? Also define a closure.

1

Q.4 (a) Let M = (Q, X, q0 , 6, A) where Q= {a,b,c,d}, q0 = a and A={d} and 6 is given as follows.

State input - 0    input -1

07


{b,d}

{b}

{d}

O


{c,d}

{d}

{c}

O


a

b

c

d


Give transition diagram for above NFA & find whether string 100101 will be accepted by it or not.

(b) Give transition table for deterministic PDA recognizing following languages. 07 {x e (a,b)* | Na(x) > Nb(x)}

OR

07


6 is given as follows.

State

input - 0

input -1

A

a

{d}

{c,d}

{b}

b

{b}

{d}

{c}

c

{d}

{c}

{a}

d

O

O

O

Find equivalent NFA and FA for above NFA - A.

(b) Draw Turing machine to accept palindromes over {a , b}.    07

Q.5 (a) Consider CFG with production    05

S S+S | S-S | S*S | S/S | (S) |a Draw derivation trees corresponding to two different left most derivation of a + ( a * a ) / a - a.

OR

Q.5 (a) Convert following grammar into Chomsky normal form.    05

S AACD A aAb | a C aC | a D aDa | bDb | a

010* + 0(01+10)*11

2







Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Gujarat Technological University 2010 M.C.A Theory of computation - Question Paper