QVIII

download QVIII

of 144

Transcript of QVIII

  • 8/13/2019 QVIII

    1/144

    MATCH ITEMS

  • 8/13/2019 QVIII

    2/144

    Match the following:-

    Q1.A (00)* 1 Set of all 0s

    B 0(00)* 2 Set of alleven numberof 0s

    C 00(00)*+0(00)* 3 Set of all oddnumber of0s

    D 0* 4 Set of all 0s

    excluding 5 Set of all 0s

    which aremultiples ofthree andfour

    6 Set of all 0swhich aremultiples ofthree

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6

  • 8/13/2019 QVIII

    3/144

    (iv) A->2,B->3,C->4,D->1

    Q2.

    A (00)*(11)* 1 Set of allstrings over{0,1} notcontaining a1

    B 0(00)*(11)* 2 Set of alleven numberof 0sfollowed byan evennumber of1s

    C 00(00)*+0(00)* 3 Set of all odd

    number of0s followedby an evnnumber of1s

    D 0* 4 Set of all 0s

    excluding 5 Set of all 0swhich are

    multiples ofthree andfour

    6 Set of all 0s

  • 8/13/2019 QVIII

    4/144

    which aremultiples ofthree

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q3.

    A (0+10)*(+1) 1 Set of allstrings over

    {0,1} notcontainingtwoconsecutive0s

    B 0(00)* 2 Set of allstrings over

    {0,1} notcontainingtwoconsecutive1s

    C 00(00)*+0(00)* 3 Set of all odd

  • 8/13/2019 QVIII

    5/144

    number of0s

    D (1+01)*(+0) 4 Set of all 0sexcluding

    5 Set of all 0swhich aremultiples ofthree andfour

    6 Set of all 0swhich aremultiples ofthree

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q4.A (0+10)*(+1) 1 Set of allstrings over{0,1} notcontainingtwo

  • 8/13/2019 QVIII

    6/144

    consecutive0s

    B (0+10+110)*(+1+11) 2 Set of allstrings over{0,1} notcontainingtwoconsecutive1s

    C (1+01+001)*(+0+00) 3 Set of allstrings over

    {0,1} notcontainingthreeconsecutive1s.

    D (1+01)*(+0) 4 Set of allstrings

    over{0,1}notcontainingthreeconsecutive0s.

    5 Set of all 0s

    which aremultiples ofthree andfour

    6 Set of all 0swhich are

  • 8/13/2019 QVIII

    7/144

    multiples ofthree

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6

    (iv) A->2,B->3,C->4,D->1

    Q5.

    A (0+10)*(+1) 1 Set of allstrings over{0,1} not

    containingtwoconsecutive0s

    B (0+10+110)*(+1+11) 2 Set of allstrings over{0,1} not

    containingtwoconsecutive1s

    C [00+11+(01+10)(00+11)*(01+10)]* 3 Set of allstrings over

  • 8/13/2019 QVIII

    8/144

    {0,1} notcontainingthree

    consecutive1s.

    D (1+01)*(+0) 4 Set of allstrings over{0,1}containingan evennumber of

    0s and anevennumber of1s.

    5 Set of all0s whichare

    multiples ofthree andfour

    6 Set of all0s whicharemultiples of

    three

    Answer:

  • 8/13/2019 QVIII

    9/144

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q6.

    A (11+0)*(00+1)* 1 Set of allstrings over{0,1} not

    containingtwoconsecutive0s

    B (0+10+110)*(+1+11) 2 Set of allstrings over{0,1}where

    in somehead of thestring the1s occur inconsecutivepairs andin the tail

    of thestring the0s occur inconsecutivepairs

    C [00+11+(01+10)(00+11)*(01+10)]* 3 Set of all

  • 8/13/2019 QVIII

    10/144

    strings over{0,1} notcontaining

    threeconsecutive1s.

    D (1+01)*(+0) 4 Set of allstrings over{0,1}containingan even

    number of0s and anevennumber of1s.

    5 Set of all0s which

    aremultiples ofthree andfour

    6 Set of all0s whichare

    multiples ofthree

  • 8/13/2019 QVIII

    11/144

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q7.

    A (11+0)*(00+1)* 1 Set of allstrings over

    {0,1} notcontaining twoconsecutive 0s

    B (01+10)* 2 Set of allstrings over{0,1}where insome head of

    the string the1s occur inconsecutivepairs and inthe tail of thestring the 0soccur in

    consecutivepairs

    C [00+11+(01+10)(00+11)*(01+10)]* 3 Set of allstrings over{0,1}containingan equal

  • 8/13/2019 QVIII

    12/144

    number of 0sand 1s whereevery prefix

    has at mostone more 0than 1s or atmost one more1 than 0s.

    D (1+01)*(+0) 4 Set of allstrings over{0,1}

    containing aneven numberof 0s and aneven numberof 1s.

    5 Set of all 0swhich are

    multiples ofthree and four

    6 Set of all 0swhich aremultiples ofthree

    Answer:

    (i) A1,B->2,C->3,D->4

  • 8/13/2019 QVIII

    13/144

    (ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q8.

    A (11+0)*(00+1)* 1 Set of allstrings over{0,1} ending in00.

    B (01+10)* 2 Set of allstrings over{0,1}where insome head ofthe string the1s occur inconsecutivepairs and in

    the tail of thestring the 0soccur inconsecutivepairs

    C [00+11+(01+10)(00+11)*(01+10)]* 3 Set of allstrings over

    {0,1}containingan equalnumber of 0sand 1s whereevery prefixhas at most

  • 8/13/2019 QVIII

    14/144

    one more 0than 1s or atmost one more

    1 than 0s.D (0+1)*00 4 Set of allstrings over{0,1}containing aneven numberof 0s and aneven number

    of 1s.5 Set of all 0s

    which aremultiples ofthree and four

    6 Set of all 0swhich are

    multiples ofthree

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

  • 8/13/2019 QVIII

    15/144

    Q9.

    A (11+0)*(00+1)* 1 Set of allstrings over{0,1} notcontaining twoconsecutive 0s

    B (01+10)* 2 Set of allstrings over

    {0,1}where insome head ofthe string the1s occur inconsecutivepairs and inthe tail of thestring the 0s

    occur inconsecutivepairs

    C (0+1)*000(0+1)* 3 Set of allstrings over{0,1}containingan equal

    number of 0sand 1s whereevery prefixhas at mostone more 0

  • 8/13/2019 QVIII

    16/144

    than 1s or atmost one more1 than 0s.

    D (1+01)*(+0) 4 Set of allstrings over{0,1}containingthreeconsecutive0s.

    5 Set of all 0s

    which aremultiples ofthree and four

    6 Set of all 0swhich aremultiples ofthree

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q10.

  • 8/13/2019 QVIII

    17/144

    A (11+0)*(00+1)* 1 Set of allstrings over{0,1} where

    every pair ofconsecutive 0soccurs beforeany pair ofadjacent 1s.

    B (01+10)* 2 Set of allstrings over{0,1}where in

    some head ofthe string the1s occur inconsecutivepairs and inthe tail of thestring the 0s

    occur inconsecutivepairs

    C (0+1)*000(0+1)* 3 Set of allstrings over{0,1}containingan equal

    number of 0sand 1s whereevery prefixhas at mostone more 0than 1s or at

  • 8/13/2019 QVIII

    18/144

    most one more1 than 0s.

    D (0+10)*(1+10)* 4 Set of all

    strings over{0,1}containingthreeconsecutive0s.

    5 Set of all 0swhich are

    multiples ofthree and four

    6 Set of all 0swhich aremultiples ofthree

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q11.

    A L=(0+1)*00(0+1)*00(0+1)* 1 Set of all

  • 8/13/2019 QVIII

    19/144

    Intersection(0+1)*11(0+1)*11(0+1)*consider the complement of

    L

    strings over{0,1} whereevery pair of

    consecutive 0soccurs beforeany pair ofadjacent 1s.

    B (01+10)* 2 Set of allstrings over{0,1}containingat most one

    pair ofconsecutive 0sand at mostone pair ofconsecutive1s.

    C (0+1)*000(0+1)* 3 Set of all

    strings over{0,1}containingan equalnumber of 0sand 1s whereevery prefixhas at most

    one more 0than 1s or atmost one more1 than 0s.

    D (0+10)*(1+10)* 4 Set of allstrings over

  • 8/13/2019 QVIII

    20/144

    {0,1}containingthree

    consecutive0s.

    5 Set of all 0swhich aremultiples ofthree and four

    6 Set of all 0swhich are

    multiples ofthree

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q12.

    A 0*(10*)* 1 Set of all strings over{0,1} where every pairof consecutive 0soccurs before any

  • 8/13/2019 QVIII

    21/144

    pair of adjacent 1s.

    B (01+10)* 2 1*(01*)*

    C The complement

    of(0+1)*000(0+1)*

    3 Set of all strings over

    {0,1}containing anequal number of 0sand 1s where everyprefix has at mostone more 0 than 1sor at most one more 1than 0s.

    D (0+10)*(1+10)* 4 (1+01+001)*(+0+00) 5 Set of all 0s which

    are multiples of threeand four

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q13.

    A 0*(10*)* 1 (Ra)* R

  • 8/13/2019 QVIII

    22/144

    B (01+10)* 2 1*(01*)*

    C The complementof

    (0+1)*000(0+1)*

    3 Set of all strings over{0,1}containing an

    equal number of 0sand 1s where everyprefix has at mostone more 0 than 1sor at most one more 1than 0s.

    D R (aR)* where aand R are some

    regularexpressions

    4 (1+01+001)*(+0+00)

    5 Set of all 0s whichare multiples of threeand four

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q14.

    A 0*(10*)* 1 (Ra)* R

  • 8/13/2019 QVIII

    23/144

    B (r*s*)**** 2 1*(01*)*

    C The complementof

    (0+1)*000(0+1)*

    3 (r+s)*

    D R (aR)* where aand R are someregularexpressions

    4 (1+01+001)*(+0+00)

    5 Set of all 0s whichare multiples of threeand four

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q15.A 0*(10*)* 1 (Ra)* R

    B (r*s*)**** 2 1*(01*)*

    C (+R)* 3 (r+s)*D R (aR)* 4 R*

  • 8/13/2019 QVIII

    24/144

    where a andR are someregular

    expressions 5 Set of all 0swhich aremultiples ofthree andfour

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q16.

    A (R*+S*)*RR 1 (Ra)* R

    B (r*s*)**** 2 (R+S)*RRC (+R)* 3 (r+s)*D R (aR)*

    where a andR are someregular

    4 R*

  • 8/13/2019 QVIII

    25/144

    expressions

    5 Set of all 0swhich are

    multiples ofthree andfour

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q17.

    A (R*+S*)*RR 1 (Ra)* R

    B (R+R+R+R)R 2 (R+S)*RR

    C (+R)* 3 RRD R (aR)*

    where a and

    R are someregularexpressions

    4 R

    5 Set of all 0swhich are

  • 8/13/2019 QVIII

    26/144

    multiples ofthree andfour

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q18.

    A R(S+T) 1 (Ra)* RB (R+R+R+R)R 2 (RS+RT)

    C (+R)* 3 RRD R (aR)*

    where a andR are someregular

    expressions

    4 R

    5 Set of all 0swhich aremultiples ofthree andfour

  • 8/13/2019 QVIII

    27/144

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q19.

    A R(S+T) 1 RT+ST

    B (R+R+R+R) 2 RS+RT

    C (+R)*R 3 RD (R+S)T 4 RR

    5 Set of all 0swhich aremultiples ofthree andfour

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4

  • 8/13/2019 QVIII

    28/144

    (ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q20.

    A R(S+T) 1 RT+ST

    B (R+R+R+R) 2 RS+RT

    C R+S 3 R

    D (R+S)T 4 S+R

    5 Set of all 0swhich aremultiples ofthree andfour

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6

    (iv) A->2,B->3,C->4,D->1

    Q21.

    A R(S+T)T 1 RT+ST

  • 8/13/2019 QVIII

    29/144

    B (R+S)+T 2 RST+RTT

    C R+S 3 (R+S)+T

    D (R+S)T 4 S+R

    5 Set of all 0swhich aremultiples ofthree andfour

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6

    (iv) A->2,B->3,C->4,D->1

    Q22.

    A R(S+T)T 1 RT+ST

    B (R+S)+T 2 RST+RTT

    C R+S 3 (R+S)+T

    D (R+S)T 4 S+R5 Set of all 0s

    which aremultiples ofthree and

  • 8/13/2019 QVIII

    30/144

  • 8/13/2019 QVIII

    31/144

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6

    (iv) A->2,B->3,C->4,D->1

    Q24.

    A * 1 RT+STB (R+S)+T 2 C (RS)T 3 (R+S)+T

    D (R+S)T 4 (RS)T

    5 Set of all 0swhich aremultiples ofthree andfour

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q25.

  • 8/13/2019 QVIII

    32/144

    A * 1 B (R+S)+T 2 C (RS)T 3 (R+S)+T

    D * 4 (RS)T5 Set of all 0s

    which aremultiples ofthree andfour

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q26.

    A * 1 B (R+S)+T 2 C R(ST) 3 (R+S)+TD * 4 (RS)T

    5 Set of all 0swhich aremultiples of

  • 8/13/2019 QVIII

    33/144

    three andfour

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q27.

    A * 1 B (R+S)+T 2 C (00)*(1+01) 3 (R+S)+TD * 4 0*1

    5 Set of all 0swhich aremultiples ofthree andfour

    6 (000)*

  • 8/13/2019 QVIII

    34/144

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q28.

    A * 1 B ((0+1)(0+1)(0+1))*+((0+1)(0+1)(0+1)(0+1))* 2 C (RS)T 3 Set of all

    stringsover{0,1}whicharemultiples

    of threeor four

    D * 4 (RS)T5 Set of all

    0swhichare

    multiplesof threeand four

    6 Set of allstrings

  • 8/13/2019 QVIII

    35/144

    over{0,1}which

    aremultiplesof threeand four

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q29.

    A * 1 B ((0+1)(0+1)(0+1))*+((0+1)(0+1)(0+1)(0+1))* 2 C

    Consider the set accepted by the finiteautomata

    3 Set of allstringsover

    {0,1}whicharemultiplesof threeor four

    a

  • 8/13/2019 QVIII

    36/144

    D

    Consider the set accepted by the finiteautomata

    4 +a

    5 Set of all

    0swhicharemultiplesof threeand four

    6 Set of all

    stringsover{0,1}whicharemultiplesof three

    and four

    Answer:

  • 8/13/2019 QVIII

    37/144

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q30.

    A Consider the setaccepted by thefinite automata,

    M=({q},{0,1},,{q})(q,0)=q,(q,1)=q

    1

    B Consider the setaccepted by thefinite automata,

    M=({q},{0,1},,{q})(q,0)=q,(q,1)=

    2 (0+1)*(0+1)*

    C Consider the setaccepted by thefinite automata,

    M=({q},{0,1},,{q})(q,0)=,(q,1)=q

    3 0*0*0*

    D (Consider the setaccepted by the

    finite automata,M=({q},{0,1},,{q})(q,0)=(q,1)=

    4 1*1*1*

    5 Set of all 0swhich are

  • 8/13/2019 QVIII

    38/144

    multiples ofthree andfour

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q31.

    A Consider the set acceptedby the finite automata,

    M=({a,b,c},{0,1},,{q})(a,0)=a,(a.1)=b,(b,1)=b,

    (b,0)=c,(c,0)=c,(c,1)=c

    1

    B Consider the set acceptedby the finite automata,

    M=({q},{0,1},,{q})(q,0)=q,(q,1)=

    2 0*0*1*1*

    C Consider the set acceptedby the finite automata,

    M=({q},{0,1},,{q})3 0*0*0*

  • 8/13/2019 QVIII

    39/144

    (q,0)=,(q,1)=qD (Consider the set accepted

    by the finite automata,

    M=({q},{0,1},,{q})(q,0)=(q,1)=

    4 1*1*1*

    5 Set of all0s whicharemultiplesof threeand four

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q32.

    A Consider the set accepted bythe finite automata,

    M=({q},{0,1},,{q})(q,0)=q,(q,1)=q

    1 (01+10)*

    B Consider the set accepted by 2 (0+1)*(0+1)*

  • 8/13/2019 QVIII

    40/144

    the finite automata,

    M=({q},{0,1},,{q})(q,0)=q,(q,1)=

    C Consider the set accepted bythe finite automata,

    M=({q},{0,1},,{q})(q,0)=,(q,1)=q

    3 0*0*0*

    D Consider the set accepted bythe finite automata,

    M=({q0,q1,q2,q3},{0,1},,{q})(q0,0)=q1,(q0,1)=q2,(q1,1)=q0,(q1,0)=q3,(q2,0)=q0,(q2,1)=q3,(q3,0)=q3,(q3,1)=q3

    4 1*1*1*

    5 Set of all 0swhich aremultiples of

    three andfour

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

  • 8/13/2019 QVIII

    41/144

    Q33.A Consider the set accepted bythe finite automata,

    M=({q},{0,1},,{q})(q,0)=q,(q,1)=q

    1 Set of allstringsover {0,1}with anequalnumber of0s and 1s

    whereeveryprefix hasat mostone more0 than 1 orat most

    one more1 than a 0.

    B Consider the set accepted bythe finite automata,

    M=({q},{0,1},,{q})(q,0)=q,(q,1)=

    2 The set ofall stringsover {0,1}

    C Consider the set accepted by

    the finite automata,M=({q},{0,1},,{q})

    (q,0)=,(q,1)=q

    3 The set of

    all 0s

    D Consider the set accepted bythe finite automata,

    4 The set ofall 1s

  • 8/13/2019 QVIII

    42/144

    M=({q0,q1,q2,q3},{0,1},,{q})(q0,0)=q1,(q0,1)=q2,(q1,1)=q0,(q1,0)=q3,(q2,0)=q0,(q2,1)=q3,(q3,0)=q3,(q3,1)=q3

    5 Set of all0s whicharemultiplesof three

    and four6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6

    (iv) A->2,B->3,C->4,D->1

    Q34.

    A Consider the regular setdenoted by

    (1+01+001)*(+0+00)1 Set of all

    stringsover {0,1}with anequal

  • 8/13/2019 QVIII

    43/144

    number of0s and 1swhere

    everyprefix hasat mostone more 0than 1 orat mostone more 1than a 0.

    B Consider the set denoted by(0+1)*(00+11)

    2 Theminimalfiniteautomatahas threestates

    C Consider the set accepted by

    the finite automata,M=({q},{0,1},,{q})

    (q,0)=,(q,1)=q

    3 The

    minimalfiniteautomatahas 5states

    D Consider the set accepted bythe finite automata,

    M=({q0,q1,q2,q3},{0,1},,{q})(q0,0)=q1,(q0,1)=q2,(q1,1)=q0,(q1,0)=q3,(q2,0)=q0,(q2,1)=q3,(q3,0)=q3,(q3,1)=q3

    4 The set ofall 1s

  • 8/13/2019 QVIII

    44/144

    5 Set of all0s whichare

    multiplesof threeand four

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q35.

    A Consider the regular setdenoted by

    (1+01+001)*(+0+00)1 The

    minimalfiniteautomatahas four

    statesB Consider the set denoted by(0+1)*(00+11)

    2 Theminimalfiniteautomatahas three

  • 8/13/2019 QVIII

    45/144

    states

    C Consider the set denoted bythe regular expression

    (00)*+(0000)*+(000000)*

    3 Theminimal

    finiteautomatahas 5states

    D Consider the set accepted bythe finite automata,

    M=({q0,q1,q2,q3},{0,1},,{q})(q0,0)=q1,(q0,1)=q2,(q1,1)=q0,(q1,0)=q3,(q2,0)=q0,(q2,1)=q3,(q3,0)=q3,(q3,1)=q3

    4 Theminimalfiniteautomata

    has twostates

    5 Set of all0s whicharemultiples

    of threeand four

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6

  • 8/13/2019 QVIII

    46/144

    (iv) A->2,B->3,C->4,D->1

    Q36.A Consider the regular setdenoted by(0+1)*1(0+1)(0+1)(0)

    1 Theminimalfiniteautomatahas fourstates

    B Consider the set denoted by(0+1)*(00+11)

    2 Theminimalfiniteautomatahas 8states

    C Consider the set denoted bythe regular expression

    (00)*+(0000)*+(000000)*

    3 Theminimal

    finiteautomatahas 5states

    D Consider the set accepted bythe finite automata,

    M=({q0,q1,q2,q3},{0,1},,{q})(q0,0)=q1,(q0,1)=q2,(q1,1)=q0,(q1,0)=q3,(q2,0)=q0,(q2,1)=q3,(q3,0)=q3,(q3,1)=q3

    4 Theminimalfinite

    automatahas twostates

    5 Set of all

  • 8/13/2019 QVIII

    47/144

    0s whicharemultiples

    of threeand four

    6 (000)*

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q37.A Consider the

    regular setthe set of allstrings over{0,1} notcontaining 1

    as asubstring

    1 The minimalfiniteautomatahas 5 states

    B Consider theregular setthe set of allstrings over

    2 The minimalfiniteautomatahas 2 states

  • 8/13/2019 QVIII

    48/144

    {0,1} notcontaining11 as a

    substringC Consider theregular setthe set of allstrings over{0,1} notcontaining111as a

    substring

    3 The minimalfiniteautomatahas 3 states

    D Consider theregular setthe set of allstrings over{0,1} notcontaining

    1111 as asubstring

    4 The minimalfiniteautomatahas 4 states

    5 Set of all 0swhich aremultiples ofthree andfour

    6 (000)*

    Answer:

  • 8/13/2019 QVIII

    49/144

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q38.

    A Consider theregular set theset of all

    strings over{0,1} notcontaining101 as asubstring

    1 The minimalfiniteautomata

    has 3 states

    B Consider theregular set the

    set of allstrings over{0,1} startingwith a 1 thatinterpreted asthe binaryrepresentation

    of an integerare congruentto 0 modulo 5

    2 The minimalfinite

    automatahas 4 states

    C Consider theregular set theset of all

    3 The minimalfiniteautomata

  • 8/13/2019 QVIII

    50/144

    strings over{0,1} wherethe 10th

    symbol fromthe right endis a 1

    has 7 states

    D Consider theregular set theset of allstrings over{0,1} ending

    in 00

    4 The minimalfiniteautomatahas 1024states

    5 Tsheminimalfiniteautomatahas 1000states

    6 No minimalfiniteautomataexists

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6

  • 8/13/2019 QVIII

    51/144

    (iv) A->2,B->3,C->4,D->1

    Q39.A Consider theregular setthe set of allstrings over{0,1} wherethe 1s aredivisible by

    10 and the0s aredivisible by11

    1 The minimalfiniteautomatahas 5 states

    B Consider theregular setthe set of all

    strings over{0,1} wherethe 0ss aredivisible the3 and the 1sby 2

    2 The minimalautomatahas 110

    states

    C Consider the

    regular setthe set of allstrings over{0,1} wherethe 0s aredivisible by 6

    3 The minimal

    finiteautomatahas 6 states

  • 8/13/2019 QVIII

    52/144

    and the 1sdivisible by 8

    D Consider the

    regular setthe set of allstrings over{0,1} notcontaining1111 as asubstring

    4 The minimal

    finiteautomatahas 48 states

    5 The minimal

    finiteautomatahas 89 states

    6 The minimalfiniteautomatahas 890

    states

    Answer:

    (i) A

    1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

  • 8/13/2019 QVIII

    53/144

    Q40.

    A Consider adeterministic

    finiteautomatawith inputalphabet{0,1} of10^1000states whichhas no final

    state

    1 The empty string isnot accepted

    B Consider adeterministicfiniteautomatawith inputalphabet

    {0,1} of10^1000states whereall the statesare finalstates

    2 The emptyset isaccepted

    C Consider a

    deterministicfiniteautomataover thealphabet{0,1} of

    3 (0+1)* is

    accepted

  • 8/13/2019 QVIII

    54/144

    10^1000states wherethe start state

    is the finalstate

    D Consider adeterministicfiniteautomata of10^1000states over

    the alphabet{0,1} wherethe start stateis not a finalstate

    4 The emptystring isacepted

    5 0 is accepted

    6 1 is accepted

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q41.

  • 8/13/2019 QVIII

    55/144

    A Consider anondeterministicfinite automata

    with inputalphabet {0,1} of10^1000 stateswhich has nofinal state

    1 The empty string isnot accepted

    B Consider anondeterministicfinite automata

    with inputalphabet {0,1} of10^1000 stateswhere all thestates are finalstates

    2 The emptyset isaccepted

    C Consider a

    nondeterministicfinite automataover thealphabet {0,1} of10^1000 stateswhere the startstate is the final

    state

    3 (0+1)* is

    accepted

    D Consider anondeterministicfinite automataof 10^1000states over the

    4 The emptystring isacepted

  • 8/13/2019 QVIII

    56/144

    alphabet {0,1}where the startstate is not a

    final state 5 0 is accepted

    6 1 is accepted

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q42.A Deterministic

    finite automata1 r.e. sets

    B Deterministicpush downautomata

    2 Regular sets

    C Nondeterministic

    linear boundedauotmata

    3 Deterministic

    context freelanguages

    D Deterministicturing machines

    4 Contextsensititvelanaugages

    5 Context free

  • 8/13/2019 QVIII

    57/144

    languages

    6 Recursivesets

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q43.

    A Nondeterministic

    finite automata

    1 r.e. sets

    B push downautomata

    2 Regular sets

    C Nondeterministiclinear boundedauotmata

    3 context freelanguages

    D Nondeterministic

    turing machines

    4 Context sensitive

    lanaugages5 Deterministiccontext freelanguageslanguages

    6 Recursive sets

  • 8/13/2019 QVIII

    58/144

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q44.

    A Two waydeterministicfinite automata

    1 r.e. sets

    B Deterministicpush down

    automata

    2 Regular sets

    C Nondeterministiclinear boundedauotmata

    3 Deterministiccontext freelanguages

    D Multitape turingmachines

    4 Contextsensitivelanaugages

    5 Context freelanguages

    6 Recursivesets

  • 8/13/2019 QVIII

    59/144

  • 8/13/2019 QVIII

    60/144

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q46.

    A Halting 100pushdown tapemachines

    1 r.e. sets

    B Deterministicpush down

    automata

    2 Recursivesets

    C Nondeterministiclinear boundedauotmata

    3 Deterministiccontext freelanguages

    D 10000 countermachines

    4 Contextsensitivelanaugages

    5 Context freelanguages

    6 Regular sets

  • 8/13/2019 QVIII

    61/144

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q47.

    A Turing machinesthat have no ink

    1 r.e. sets

    B Deterministicpush down

    automata

    2 Regular sets

    C Nondeterministiclinear boundedauotmata

    3 Deterministiccontext freelanguages

    D Deterministicturing machines

    4 Contextsensitivelanaugages

    5 Context freelanguages

    6 Recursivesets

  • 8/13/2019 QVIII

    62/144

  • 8/13/2019 QVIII

    63/144

  • 8/13/2019 QVIII

    64/144

    sets

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q50.

    A Multidimensional,multitape,multiheadedturing machines

    with 1098 pushdown tapes but noink

    1 r.e. sets

    B Deterministicpush downautomata

    2 Regular sets

    C Nondeterministic

    linear boundedauotmata

    3 Deterministic

    context freelanguages

    D Deterministicturing machines

    4 Contextsensitivelanaugages

    5 Context free

  • 8/13/2019 QVIII

    65/144

    languages

    6 Recursivesets

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q51.

    A Deterministicfinite automata

    1 Recursivesets

    B Deterministicpush downautomata

    2 Regular sets

    C Nondeterministiclinear boundedauotmata

    3 Deterministiccontext freelanguages

    D Deterministic

    halting turingmachines

    4 Context

    sensititvelanaugages

    5 Context freelanguages

    6 R.e. sets

  • 8/13/2019 QVIII

    66/144

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q52.

    A Type 3grammars

    1 r.e. sets

    B LR(k)grammars

    2 Regular sets

    C Type 1

    grammars

    3 Deterministic

    context freelanguages

    D Type 0grammars

    4 Contextsensititvelanaugages

    5 Context freelanguages

    6 Recursivesets

  • 8/13/2019 QVIII

    67/144

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q53.

    A Deterministicfinite automata

    1 Type 0languages

    B Deterministicpush downautomata

    2 Type 3languages

    C Nondeterministiclinear boundedauotmata

    3 Deterministiccontext freelanguages

    D Deterministic

    turing machines

    4 Type 1

    languages5 Type 2

    languages

    6 Recursivesets

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

  • 8/13/2019 QVIII

    68/144

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q54.

    A Deterministicfiniteautomata

    1 Proceduresthatare notnecessarilyalgorithms

    B Deterministicpush downautomata

    2 Regular sets

    C Halting twopushdowntapemachines

    3 Deterministiccontext freelanguages

    D Deterministicturing

    machines

    4 Algorithms

    5 Context freelanguages

    6 Recursive sets

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6

  • 8/13/2019 QVIII

    69/144

    (iv) A->2,B->3,C->4,D->1

    Q55.A The set of allstrings over{0,1} withany numberof 0s andany numberof 1s

    1 Recursive setthat is notcontextsensitive

    B The set of allstrings over{0,1} with anequalnumber of0s and 1s

    2 Regular setbut not a dcfl

    C The set of all

    strings over{0,1,2} withan equalnumber of0s, 1s and2s.

    3 Deterministic

    context freelanguage

    D The set of

    regularexpressionswhosecomplementis empty

    4 Context

    sensititvelanguagethat is notcontext free

    5 r.e but not

  • 8/13/2019 QVIII

    70/144

    recursive

    6 Finite set

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6

    (iv) A->2,B->3,C->4,D->1

    Q56.

    A The set of allstrings over{0,1} with

    any numberof 0s andany numberof 1s

    1 Recursive setthat is notcontext

    sensitive

    B The set of allpalidromesover {0,1}

    2 Regular setbut not a dcfl

    C The set of allstrings over{0,1,2} withan equalnumber of0s, 1s and

    3 context freelanguage

  • 8/13/2019 QVIII

    71/144

  • 8/13/2019 QVIII

    72/144

    strings over{0,1} with anequal

    number of0s and 1s

    but not a dcfl

    C The set of allstrings over{0,1,2}of theform wwwhere w is astring in

    {0,1,2}+

    3 Deterministiccontext freelanguage

    D The set ofregularexpressionswhosecomplementis empty

    4 Contextsensititvelanguagethat is notcontext free

    5 r.e but notrecursive

    6 Finite set

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

  • 8/13/2019 QVIII

    73/144

    Q58.

    A The set of allstrings over{0,1} withany numberof 0s andany numberof 1s

    1 Recursive set

    B The set of allstrings over{0,1} not ofthe form ww,w in {0,1}+

    2 Regular setbut not a dcfl

    C The set of allstrings over{0,1,2} with

    an equalnumber of0s, 1s and2s.

    3 context freelanguage

    D The set ofregularexpressions

    whoseintersectionis empty

    4 Contextsensititvelanguage

    that is notcontext free

    5 r.e but notrecursive

    6 Finite set

  • 8/13/2019 QVIII

    74/144

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q59.

    A The set of allstrings over{0,1} withany numberof 0s and

    any numberof 1s

    1 Recursive set

    B The set of allstrings over{0,1} with anunequalnumber of

    0s and 1s

    2 Regular setbut not a dcfl

    C The set of allstrings over{0,1,2} withan equalnumber of

    3 context freelanguage

  • 8/13/2019 QVIII

    75/144

    0s, 1s and2s.

    D The set of

    regularexpressionswhosecomplementis empty

    4 Context

    sensititvelanguagethat is notcontext free

    5 r.e but notrecursive

    6 Finite set

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q61.

    A The set of all

    strings over{0,1} notcontainingthreeconsecutive0s and not

    1 Recursive set

  • 8/13/2019 QVIII

    76/144

    containingthreeconsecutive

    1s.B The set of allstrings over{0,1,2} withan unequalnumber of0s and 1sor an

    unequalnumber of1s and 2s

    2 Regular setbut not a dcfl

    C The set of allstringsprimes inunary.

    3 context freelanguage

    D The set ofregularexpressionswhosecomplementis empty

    4 Contextsensititvelanguagethat is notcontext free

    5 r.e but not

    recursive6 Finite set

  • 8/13/2019 QVIII

    77/144

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6

    (iv) A->2,B->3,C->4,D->1

    Q62.

    A The set of allpowers of 2in binary

    1 Recursive set

    B The set of allstringspalidromesover a finite

    alphabet

    2 Regular setbut not a dcfl

    C The set of allstringsprimes inunary.

    3 context freelanguage

    D The set ofregular

    expressionswhosecomplementis empty

    4 Contextsensititve

    languagethat is notcontext free

    5 r.e but notrecursive

  • 8/13/2019 QVIII

    78/144

    6 Finite set

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q63.

    A The set of allpowers of 2in binary

    1 Recursive set

    B The set of all

    strings withan equalnumber of0s and 1sor with twiceas many 0sas 1s.

    2 Regular set

    but not a dcfl

    C The set of allstrings thatare notprimes inbinary.

    3 context freelanguage

    The set of 4 ContextD

  • 8/13/2019 QVIII

    79/144

  • 8/13/2019 QVIII

    80/144

    complement is empty languagethat is notcontext free

    5 r.e but notrecursive

    6 Finite set

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q65.A The set of all powers of

    20 in base 201 Recursive

    set

    B {0^m1^n0^(m+n)|m,n>1} 2 Regular setbut not adcfl

    C {wwRw|w in {0,1}+} 3 context

    freelanguage

    D The set of regularexpressions whosecomplement is empty

    4 Contextsensititvelanguagethat is not

  • 8/13/2019 QVIII

    81/144

    context free

    5 r.e but notrecursive

    6 Finite set

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q66.

    A The set of all powers of

    20 in base 20

    1 Recursive

    setB {0^m1^n0^(m+n)|m,n>1} 2 Regular set

    but not adcfl

    C {a^nb^n^2|n>1} 3 contextfreelanguage

    D The set of regularexpressions whosecomplement is empty

    4 Contextsensititvelanguagethat is notcontext free

    5 r.e but not

  • 8/13/2019 QVIII

    82/144

    recursive

    6 Finite set

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6

    (iv) A->2,B->3,C->4,D->1

    Q67.

    A The set of all powers of20 in base 20

    1 Recursiveset

    B {0^m1^n0^(m+n)|m,n>1} 2 Regular set

    but not adcfl

    C {a^Ib^j|gcd(I,j)=1} 3 contextfreelanguage

    D The set of regularexpressions whose

    complement is empty

    4 Contextsensititve

    languagethat is notcontext free

    5 r.e but notrecursive

    6 Finite set

  • 8/13/2019 QVIII

    83/144

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q68.

    A The set of all powers of200 in base 200

    1 Recursiveset

    B {0^m1^n0^(m+n)|m,n>1} 2 Regular setbut not adcfl

    C {a^Ib^jc^k|I not equal toj not equal to k}

    3 contextfreelanguage

    D The set of regularexpressions whosecomplement is empty

    4 Contextsensititvelanguagethat is not

    context free 5 r.e but notrecursive

    6 Finite set

  • 8/13/2019 QVIII

    84/144

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q69.

    A The set of all strings ovesr{0,1} not containing0000000001111111100000as a substring

    1 Finite set

    B {0^m1^n0^(m+n)|m,n>1} 2 Regular set

    but not adcfl

    C {a^Ib^jc^k|I not equal to jnot equal to k}

    3 contextfreelanguage

    D {0^n1^n| n

  • 8/13/2019 QVIII

    85/144

    set notnecessarilya context

    sensitivelanguage

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q70.

    A S-a|aS|b|bS 1 Finite setB SaSb|ab 2 Regular set

    but not a dcfl

    C {a^Ib^jc^k|Inot equal to jnot equal to

    k}

    3 context freelanguage

    D {0^n1^n|n

  • 8/13/2019 QVIII

    86/144

    5 r.e but notrecursive

    6 Recursive set

    notnecessarily acontextsensitivelanguage

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q71.

    A S-a|aS|b|bS 1 Finite setB SaSa|bSb|a|b 2 Regular set

    but not a

    dcflC {a^Ib^jc^k|Inot equal to jnot equal to k}

    3 context freelanguage

    D {0^n1^n|n

  • 8/13/2019 QVIII

    87/144

    lakh} languagethat is notcontext free

    5 r.e but notrecursive

    6 Recursive setnotnecessarily acontextsensitivelanguage

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6

    (iv) A->2,B->3,C->4,D->1

    Q72.

    A S-a|aS|b|bS 1 Finite setB S

    aSa|bSb|a|b 2 Regular setbut not a

    dcfl

    C SaSBC|aBCCBBCaBab

    3 context freelanguage

  • 8/13/2019 QVIII

    88/144

    bBbbbCbccCcc

    D S

    a|b|c|d 4 Contextsensititvelanguagethat is notcontext free

    5 r.e but notrecursive

    6 Recursive setnotnecessarily acontextsensitivelanguage

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6

    (iv) A->2,B->3,C->4,D->1

    Q73.

    A S-a|aS|b|bS 1 Finite setB SaSa|bSb|a|b 2 Regular set but not

  • 8/13/2019 QVIII

    89/144

  • 8/13/2019 QVIII

    90/144

    B SaSa|bSb|a|b 2 Regular set but nota dcfl

    C SaSBC|aBCCB

    BCaBabbBbbbCbccCcc

    3 context free

    language

    D SCWaDWaaaWWDEWaEEaCECWWDFWaFWFwaCFW

    4 The set{a^nb^nc^n|n>=1}

    5 r.e but notrecursive

    6 Recursive set notnecessarily acontext sensitivelanguage

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6

  • 8/13/2019 QVIII

    91/144

    (iv) A->2,B->3,C->4,D->1

    Q75.A S-a|aS|b|bS 1 Unrestrictedgrammar

    B SaSa|bSb|a|b 2 Regulargrammar

    C SaSBC|aBCCBBCaBabbBbbbCbccCcc

    3 Context freegrammar

    D SCWaDWaaaWWDEWaEEaCECWWDFWaFWFwaCFW

    4 Contextsensitivegrammar

    5 r.e but notrecursive

    6 Recursive set

    notnecessarily acontextsensitivelanguage

  • 8/13/2019 QVIII

    92/144

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q76.

    A S-a|aS|b|bS 1 Type 0B SaSa|bSb|a|b 2 Type 3C SaSBC|aBC

    CBBCaBabbBbbbCbccCcc

    3 Type 2

    D SCWaDWaaaWWDEWaEEaCE

    CWWDFWaFWFwaCFW

    4 Type 1

    5 r.e but notrecursive

  • 8/13/2019 QVIII

    93/144

    6 Type 4

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q77.

    A All C programs 1 Unrestrictedgrammar

    B SaSa|bSb|a|b 2 ProceduresC SaSBC|aBC

    CBBCaBabbBbbbCbccCcc

    3 Context free

    grammar

    D SCWaDWaaaWWD

    EWaEEaCECWWDFWaFWFwaCFW

    4 Contextsensitive

    grammar

  • 8/13/2019 QVIII

    94/144

    5 Not r.e.

    6 Recursive setnot

    necessarily acontextsensitivelanguage

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q78.

    A Halting C andJava programs

    1 Unrestrictedgrammar

    B SaSa|bSb|a|b 2 AlgorithmsC SaSBC|aBC

    CBBCaB

    abbBbbbCbccCcc

    3 Context freegrammar

    D SCWaDWaaaW

    4 Contextsensitive

  • 8/13/2019 QVIII

    95/144

    WDEWaEEaCECWWD

    FWaFWFwaCFW

    grammar

    5 r.e but notrecursive

    6 Recursive setnotnecessarily acontextsensitivelanguage

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q79.

    A r.e. sets 1 Closed undercomplementbut notunder union

  • 8/13/2019 QVIII

    96/144

    orintersection

    B Recursive

    sets

    2 Not closed

    undercomplementbut closedunder unionandintersection

    C Context freelanguages

    3 Closed underunion,

    intersectionandcomplement

    D Deterministiccontext freelanguages

    4 Closed underunion andintersectionbut not

    undercomplement

    5 Not closedunder unionbut closedunderintersection

    6 Not closedunder unionorcomplement

  • 8/13/2019 QVIII

    97/144

  • 8/13/2019 QVIII

    98/144

    D Deterministiccontext freelanguages

    4 Closed underunion andintersection

    but notundercomplement

    5 Not closedunder unionbut closedunderintersection

    6 Not closedunder unionorcomplement

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q81.

    A Finite sets 1 Closed undercomplementbut not

  • 8/13/2019 QVIII

    99/144

    under unionorintersection

    B Recursivesets 2 Not closedundercomplementbut closedunder unionandintersection

    C Context free

    languages

    3 Closed under

    union,intersectionandcomplement

    D Deterministiccontext freelanguages

    4 Closed underunion andintersection

    but notundercomplement

    5 Not closedunder unionbut closedunder

    intersection6 Not closedunder unionorcomplement

  • 8/13/2019 QVIII

    100/144

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q82.

    A The cliqueproblem

    1 Decidable

    B The 2-CNFproblem

    2 NP-complete

    C The

    equivalenceof context-freelanguages

    3 Is in P

    D Equivalenceof finiteautomata

    4 Undecidable

    5 Not closed

    under unionbut closedunderintersection

    6 Not closed

  • 8/13/2019 QVIII

    101/144

    under unionorcomplement

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q83.

    A TheHamiltonian

    circuitproblem

    1 Decidable

    B The 2-CNFproblem

    2 NP-complete

    C Theequivalenceof a context-

    free to *where isthe inputvocabulary.

    3 Is in P

    D The 4 Undecidable

  • 8/13/2019 QVIII

    102/144

    membershipproblem ofcontext

    sensitivelanguages

    5 Not closedunder unionbut closedunderintersection

    6 Not closed

    under unionorcomplement

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q84.

    A Theknapsackproblem

    1 Decidable

    B The 2-CNF 2 NP-complete

  • 8/13/2019 QVIII

    103/144

    problem

    C Theequivalence

    of twodeterministicturingmachines

    3 Is in P

    D Whether acontext freelanguage isfinite,

    infinite orempty

    4 Undecidable

    5 Not closedunder unionbut closedunderintersection

    6 Not closedunder unionorcomplement

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6

  • 8/13/2019 QVIII

    104/144

  • 8/13/2019 QVIII

    105/144

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q86

    A All formallanguages

    1 Decidable

    B The class ofregular sets

    2 Areuncountable

    C Whether aturingmachine willhalt on blanktape

    3 Countablyinfinite

    D Whether aturingmachine willever leave an

    input region

    4 Undecidable

    5 Not closedunder unionbut closedunderintersection

    6 Not closed

    under unionorcomplement

  • 8/13/2019 QVIII

    106/144

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q87.

    A {w$w| w in (0+1)*} 1 Finite set

    B {wwR|in (0+1)*} 2 Deterministiccontext freelanguage

    C {wwwwwwwwR|w

    in(0+1)+}

    3 Context free

    languagethat is notdeterministic

    D The set of all stringsnot containing0000000000001111000over {0,1} of length

    less than 10^100000

    4 Contextsensitivelanguagethat is not

    context free5 Not closedunder unionbut closedunderintersection

  • 8/13/2019 QVIII

    107/144

    6 Not closedunder unionor

    complement

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q88

    A {0^100n 1^1000n|n>=1} 1 Finite set

    B {0^n1^n|n>=1^n1^2n|n>=1 2 Deterministiccontext freelanguage

    C {wwwwwwwwR|w in(0+1)+} 3 Context freelanguagethat is notdeterministic

    D The set of all strings notcontaining0000000000001111000 over{0,1} of length less than10^100000

    4 Contextsensitivelanguagethat is notcontext free

    5 Not closed

  • 8/13/2019 QVIII

    108/144

    under unionbut closedunder

    intersection6 Not closedunder unionorcomplement

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q89

    A {ww| w in (0+1)*} 1 Thecomplementis not afinite set but

    the set isfinite

    B {wwR|in (0+1)*} 2 Thecomplementis a cfl

    C {w$w|n(0+1)+} 3 The

  • 8/13/2019 QVIII

    109/144

    complementis not a clf

    D The set of all strings

    not containing0000000000001111000over {0,1} of lengthless than 10^100000

    4 The

    complementis a dcfl

    5 Recursivebut not a csl

    6 r.e but notrecursive

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q90.

    A Sa 1 The langugegenerated isambiguouswith aninfinitenumber ofderivations

  • 8/13/2019 QVIII

    110/144

    for a

    B SaSAA

    a

    2 Thelanguage

    generated isunambiguous

    C SaSA|BAaBb

    3 Thelanguagegenerated isambiguouswith twoderivations

    for aD SSS|a| 4 The

    languagegenerated isambiguouswith threedistinct

    derivationsfor a

    5 Thelanguagegenerated isinherentlyambigugous

    6 Thelanguagegenerated isr.e but notrecursive

  • 8/13/2019 QVIII

    111/144

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q91.

    A EE+E|E*E|(E)|i 1 The langugegenerated isambiguouswith aninfinite

    number ofderivationsfor a

    B SaSAAa

    2 Thelanguagegenerated isambiguous

    and is the setof all Cexpressionsover + and *

    C SaSA|B

    3 Thelanguage

  • 8/13/2019 QVIII

    112/144

    AaBb

    generated isambiguouswith two

    derivationsfor a

    D SSS|a| 4 Thelanguagegenerated isambiguouswith threedistinct

    derivationsfor a

    5 Thelanguagegenerated isinherentlyambigugous

    6 Thelanguagegenerated isr.e but notrecursive

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

  • 8/13/2019 QVIII

    113/144

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q92.

    A EE+E|E*E|(E)|i 1 Thelanguagegenerated isambiguouswith aninfinite

    number ofderivationsfor a

    B EE+E|E.E|(E)|a|b|| 2 Thelanguagegenerated isambiguous

    and is theset of all Cexpressionsover + and *

    C SaSA|BAaB

    b

    3 Thelanguagegenerated is

    ambiguousand is theset of allregularexpressionsover {a,b}

  • 8/13/2019 QVIII

    114/144

    D SSS|a| 4 Thelanguagegenerated is

    ambiguouswith threedistinctderivationsfor a

    5 Thelanguagegenerated is

    inherentlyambigugous

    6 Thelanguagegenerated isr.e but notrecursive

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q93.

  • 8/13/2019 QVIII

    115/144

    A EE+E|E*E|(E)|i 1 Thelanguagegenerated is

    ambiguouswith aninfinitenumber ofderivationsfor a

    B EE+E|E.E|(E)|a|b|| 2 Thelanguage

    generated isambiguousand is the setof all Cexpressionsover + and *

    C EE+T|TTT*F|FF(E)|i

    3 The

    languagegenerated isanunambiguousgrammar forarithmeticexpressions

    D S

    SS|a| 4 Thelanguagegenerated isambiguouswith threedistinct

  • 8/13/2019 QVIII

    116/144

    derivationsfor a

    5 The

    languagegenerated isinherentlyambigugous

    6 Thelanguagegenerated isr.e but not

    recursive

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q94.

    A E

    E+E|E*E|(E)|i 1 Thelanguagegenerated isall stringsover {a,b} notof the form

  • 8/13/2019 QVIII

    117/144

  • 8/13/2019 QVIII

    118/144

    languagegenerated isr.e but not

    recursive

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q95.

    A EE+E|E*E|(E)|i 1 Thelanguagegenerated isambiguousand is the setof all stringsover {a,b}with an equal

    number ofas and bs.

    B EE+E|E.E|(E)|a|b|| 2 Thelanguagegenerated isambiguous

  • 8/13/2019 QVIII

    119/144

    and is the setof all Cexpressions

    over + and *C EE+T|TTT*F|FF(E)|i

    3 Thelanguagegenerated isanunambiguousgrammar forarithmetic

    expressionsD SaSbS|bSaS| 4 The

    languagegenerated isambiguouswith threedistinct

    derivationsfor a

    5 Thelanguagegenerated isinherentlyambigugous

    6 Thelanguagegenerated isr.e but notrecursive

  • 8/13/2019 QVIII

    120/144

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q96.

    A EE+E|E*E|(E)|i 1 Thelanguagegenerated isambiguousand is the set

    of all stringsover{a,b}with twice asmany as asbs.

    B EE+E|E.E|(E)|a|b|| 2 Thelanguage

    generated isambiguousand is the setof all Cexpressionsover + and *

  • 8/13/2019 QVIII

    121/144

    C EE+T|TTT*F|FF(E)|i

    3 Thelanguagegenerated is

    anunambiguousgrammar forarithmeticexpressions

    D SaSbSaS|aSaSbS|bSaSaS| 4 Thelanguagegenerated is

    ambiguouswith threedistinctderivationsfor a

    5 Thelanguage

    generated isinherentlyambigugous

    6 Thelanguagegenerated isr.e but not

    recursive

    Answer:

  • 8/13/2019 QVIII

    122/144

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q97.

    A AaAb|abA1a|a A1SA1|A1 S|

    1 Thelanguagegenerated is

    ambiguousand is the setof all stringsover{a,b}with twice asmany as asbs.

    B EE+E|E.E|(E)|a|b|| 2 Thelanguagegenerated isthe set of allstrings over{a,b} with theas greater

    than the bs.C EE+T|TTT*F|FF(E)|i

    3 Thelanguagegenerated isanunambiguous

  • 8/13/2019 QVIII

    123/144

  • 8/13/2019 QVIII

    124/144

  • 8/13/2019 QVIII

    125/144

    languagegenerated isambiguous

    with threedistinctderivationsfor a

    5 Thelanguagegenerated isinherently

    ambigugous6 The

    languagegenerated isr.e but notrecursive

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q99.

    A EE+E|E*E|(E)|i 1 The

  • 8/13/2019 QVIII

    126/144

    languagegenerated is{a^I b^J

    c^K|I notequal to J orJ not equal toK}

    B EE+E|E.E|(E)|a|b|| 2 Thelanguagegenerated isambiguous

    and is the setof all Cexpressionsover + and *

    C EE+T|TTT*F|FF(E)|i

    3 Thelanguagegenerated is

    anunambiguousgrammar forarithmeticexpressions

    D SA1|B1|C1|A1 C1SA1 A|A1 A C1S

    B C1| A1 B C1AaAb|abBaBb|abA1a| a A1B1b|b B1C1c|c C1

    4 Thelanguage

    generated isambiguouswith threedistinctderivationsfor a

  • 8/13/2019 QVIII

    127/144

    5 Thelanguagegenerated is

    inherentlyambigugous

    6 Thelanguagegenerated isr.e but notrecursive

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q100.

    A SaSa|bSb|cSc|dSd 1 Thelanguage

    generated isambiguousand is the setof all stringsover{a,b}with twice as

  • 8/13/2019 QVIII

    128/144

    many as asbs.

    B EE+E|E.E|(E)|a|b|| 2 Thelanguagegenerated isthe set of allpalidromesover {a,b,c,d}

    C EE+T|TTT*F|FF(E)|i

    3 Thelanguagegenerated is

    anunambiguousgrammar forarithmeticexpressions

    D SaSbSaS|aSaSbS|bSaSaS| 4 Thelanguage

    generated isambiguouswith threedistinctderivationsfor a

    5 The

    languagegenerated isinherentlyambigugous

    6 Thelanguage

  • 8/13/2019 QVIII

    129/144

    generated isr.e but notrecursive

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q101.

    A SaSa|bSb|cSc|dSd 1 Thelanguage

    generated isambiguousand is theset of allstringsover{a,b}with twice

    as many asas bs.

    B {a^I b^J c^K|I=max(J,K)} 2 Thelanguagegenerated isthe set of all

  • 8/13/2019 QVIII

    130/144

    palidromesover{a,b,c,d}

    C E

    E+T|TTT*F|FF(E)|i

    3 Thelanguagegenerated isa a csl andnot a cfl

    D SaSbSaS|aSaSbS|bSaSaS| 4 Thelanguagegenerated is

    ambiguouswith threedistinctderivationsfor a

    5 Thelanguage

    generated isinherentlyambigugous

    6 Thelanguagegenerated isr.e but not

    recursive

    Answer:

  • 8/13/2019 QVIII

    131/144

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q102.

    A SaSa|bSb|cSc|dSd 1 Thelanguage

    generated isambiguousand is theset of allstringsover{a,b}with twice

    as many asas bs.

    B {a^I b^J c^K|I=min(J,K} 2 Thelanguagegenerated isthe set of allpalidromes

    over{a,b,c,d}

    C EE+T|TTT*F|FF(E)|i

    3 Thelanguagegenerated isa csl which

  • 8/13/2019 QVIII

    132/144

    is not a cfl

    D SaSbSaS|aSaSbS|bSaSaS| 4 Thelanguage

    generated isambiguouswith threedistinctderivationsfor a

    5 Thelanguage

    generated isinherentlyambigugous

    6 Thelanguagegenerated isr.e but not

    recursive

    Answer:

    (i) A

    1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

  • 8/13/2019 QVIII

    133/144

    Q103.

    A SaSa|bSb|cSc|dSd 1 Thelanguagegenerated isambiguousand is theset of allstringsover{a,b}with twice

    as many asas bs.

    B {a^n B^n c^I|I not equal ton}

    2 Thelanguagegenerated isthe set of allpalidromes

    over{a,b,c,d}

    C EE+T|TTT*F|FF(E)|i

    3 Thelanguagegenerated isa csl whichis not a cfl

    D S

    aSbSaS|aSaSbS|bSaSaS| 4 Thelanguagegenerated isambiguouswith threedistinct

  • 8/13/2019 QVIII

    134/144

    derivationsfor a

    5 The

    languagegenerated isinherentlyambigugous

    6 Thelanguagegenerated isr.e but not

    recursive

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q104.

    A S

    aSa|bSb|cSc|dSd 1 Thelanguagegenerated isambiguousand is theset of all

  • 8/13/2019 QVIII

    135/144

    stringsover{a,b}with twice

    as many asas bs.

    B {a^m B^n c^I|n lies betweenm and 2I}

    2 Thelanguagegenerated isthe set of allpalidromesover

    {a,b,c,d}C EE+T|T

    TT*F|FF(E)|I

    3 Thelanguagegenerated isa csl whichis not a cfl

    D SaSbSaS|aSaSbS|bSaSaS| 4 Thelanguagegenerated isambiguouswith threedistinctderivationsfor a

    5 Thelanguagegenerated isinherentlyambigugous

    6 The

  • 8/13/2019 QVIII

    136/144

    languagegenerated isr.e but not

    recursive

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q105.

    A SaSa|bSb|cSc|dSd 1 Thelanguagegenerated isambiguousand is theset of allstrings

    over{a,b}with twiceas many asas bs.

    B {a^n B^n c^I|I not equal ton}

    2 Thelanguage

  • 8/13/2019 QVIII

    137/144

    generated isthe set of allpalidromes

    over{a,b,c,d}

    C {a^I b^J c^K|K=I+J} 3 Thelanguagegenerated isa csl whichis not a cfl

    D SaSbSaS|aSaSbS|bSaSaS| 4 Thelanguagegenerated isa dcfl whichis notregular

    5 Thelanguage

    generated isinherentlyambigugous

    6 Thelanguagegenerated isr.e but not

    recursive

    Answer:

  • 8/13/2019 QVIII

    138/144

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5

    (iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q106.

    A SaSa|bSb|cSc|dSd 1 Thelanguagegenerated is

    ambiguousand is theset of allstringsover{a,b}with twiceas many as

    as bs.B {a^n B^n c^I|I not equal to

    n}2 The

    languagegenerated isthe set of allpalidromesover

    {a,b,c,d}C {a^I b^J c^K|K

  • 8/13/2019 QVIII

    139/144

    D SaSbSaS|aSaSbS|bSaSaS| 4 Thelanguagegenerated is

    a cfl whichis not a dcfl

    5 Thelanguagegenerated isinherentlyambigugous

    6 The

    languagegenerated isr.e but notrecursive

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

    Q106.

    A {a^I b^J c^J d^2 e^3I} 1 Thelanguage

  • 8/13/2019 QVIII

    140/144

    generated isambiguousand is the

    set of allstringsover{a,b}with twiceas many asas bs.

    B {a^n B^n c^I|I not equal ton}

    2 Thelanguage is

    a cfl and ifwe take thefirst half ofthe stringswe ger alanguagewhich is not

    a cflC EE+T|T

    TT*F|FF(E)|i

    3 Thelanguagegenerated isa csl whichis not a cfl

    D SaSbSaS|aSaSbS|bSaSaS| 4 Thelanguagegenerated isambiguouswith threedistinctderivations

  • 8/13/2019 QVIII

    141/144

    for a

    5 Thelanguage

    generated isinherentlyambigugous

    6 Thelanguagegenerated isr.e but notrecursive

    Answer:

    (i) A1,B->2,C->3,D->4(ii) A->2,B->3,C->4,D->5(iii) A->3,B-4,C->5,D->6(iv) A->2,B->3,C->4,D->1

  • 8/13/2019 QVIII

    142/144

  • 8/13/2019 QVIII

    143/144

    NOTE:-The answer for all the above questions is choice(IV)

  • 8/13/2019 QVIII

    144/144