Sei sulla pagina 1di 66

MATCH ITEMS Match the following:Q1.

A B C D (00)* 0(00)* 00(00)*+0(00)* 0* 1 2 3 4 5 6 Set of all 0s Set of all even number of 0s Set of all odd number of 0s Set of all 0s excluding Set of all 0s which are multiples of three and four Set of all 0s which are multiples of three

Answer: (i) (ii) (iii) (iv) Q2. A B A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 (00)*(11)* 0(00)*(11)* 1 2 Set of all strings over {0,1} not containing a 1 Set of all even number of 0s followed by an even number of 1s Set of all odd number of 0s followed by an evn number of 1s Set of all 0s excluding Set of all 0s which are multiples of three and four Set of all 0s which are multiples of three

00(00)*+0(00)*

0*

4 5 6

Answer: (i) (ii) (iii) (iv) Q3. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 (0+10)*(+1) 1 Set of all strings over {0,1} not containing two consecutive 0s Set of all strings over {0,1} not containing two consecutive 1s Set of all odd number of 0s Set of all 0s excluding Set of all 0s which are multiples of three and four Set of all 0s which are multiples of three

0(00)*

C D

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

3 4 5 6

Answer: (i) (ii) (iii) (iv) Q4. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 (0+10)*(+1) 1 Set of all strings over {0,1} not containing two consecutive 0s Set of all strings over {0,1} not containing two consecutive 1s Set of all strings over {0,1} not containing three consecutive 1s. Set of all strings over{0,1} not

(0+10+110)*(+1+11)

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

(1+01)*(+0)

containing three consecutive 0s. Set of all 0s which are multiples of three and four Set of all 0s which are multiples of three

Answer: (i) (ii) (iii) (iv) Q5. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 (0+10)*(+1) 1 Set of all strings over {0,1} not containing two consecutive 0s Set of all strings over {0,1} not containing two consecutive 1s Set of all strings over {0,1} not containing three consecutive 1s. Set of all strings over {0,1} containing an even number of 0s and an even number of 1s. Set of all 0s which are multiples of three and four Set of all 0s which are

(0+10+110)*(+1+11)

[00+11+(01+10)(00+11)*(01+10)]*

(1+01)*(+0)

multiples of three Answer: (i) (ii) (iii) (iv) Q6. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 (11+0)*(00+1)* 1 Set of all strings over {0,1} not containing two consecutive 0s Set of all strings over {0,1}where in some head of the string the 1s occur in consecutive pairs and in the tail of the string the 0s occur in consecutive pairs Set of all strings over {0,1} not containing three consecutive 1s. Set of all strings over {0,1} containing an even number of 0s and an even number of 1s. Set of all 0s which are multiples of three and four Set of all 0s which are

(0+10+110)*(+1+11)

[00+11+(01+10)(00+11)*(01+10)]*

(1+01)*(+0)

multiples of three Answer: (i) (ii) (iii) (iv) Q7. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 (11+0)*(00+1)* 1 Set of all strings over {0,1} not containing two consecutive 0s Set of all strings over {0,1}where in some head of the string the 1s occur in consecutive pairs and in the tail of the string the 0s occur in consecutive pairs Set of all strings over {0,1}containing an equal number of 0s and 1s where every prefix has at most one more 0 than 1s or at most one more 1 than 0s. Set of all strings over {0,1} containing an even number of 0s and an even number of 1s. Set of all 0s which are multiples of three and four Set of all 0s which are multiples of three

(01+10)*

[00+11+(01+10)(00+11)*(01+10)]*

(1+01)*(+0)

5 6

Answer: (i) (ii) (iii) (iv) Q8. A B A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 (11+0)*(00+1)* (01+10)* 1 2 Set of all strings over {0,1} ending in 00. Set of all strings over {0,1}where in some head of the string the 1s occur in consecutive pairs and in the tail of the string the 0s occur in consecutive pairs Set of all strings over {0,1}containing an equal number of 0s and 1s where every prefix has at most one more 0 than 1s or at most one more 1 than 0s. Set of all strings over {0,1} containing an even number of 0s and an even number of 1s. Set of all 0s which are multiples of three and four Set of all 0s which are multiples of three

[00+11+(01+10)(00+11)*(01+10)]*

(0+1)*00

5 6

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

(iii) (iv) Q9. A B

A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 (11+0)*(00+1)* (01+10)* 1 2 Set of all strings over {0,1} not containing two consecutive 0s Set of all strings over {0,1}where in some head of the string the 1s occur in consecutive pairs and in the tail of the string the 0s occur in consecutive pairs Set of all strings over {0,1}containing an equal number of 0s and 1s where every prefix has at most one more 0 than 1s or at most one more 1 than 0s. Set of all strings over {0,1} containing three consecutive 0s. Set of all 0s which are multiples of three and four Set of all 0s which are multiples of three

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

(1+01)*(+0)

4 5 6

Answer: (i) (ii) (iii) (iv) Q10. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 (11+0)*(00+1)* 1 Set of all strings over {0,1} where every pair of consecutive 0s occurs before any pair of adjacent 1s. Set of all strings over {0,1}where in some

(01+10)*

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

(0+10)*(1+10)*

4 5 6

head of the string the 1s occur in consecutive pairs and in the tail of the string the 0s occur in consecutive pairs Set of all strings over {0,1}containing an equal number of 0s and 1s where every prefix has at most one more 0 than 1s or at most one more 1 than 0s. Set of all strings over {0,1} containing three consecutive 0s. Set of all 0s which are multiples of three and four Set of all 0s which are multiples of three

Answer: (i) (ii) (iii) (iv) Q11. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 L=(0+1)*00(0+1)*00(0+1)* Intersection (0+1)*11(0+1)*11(0+1)* consider the complement of L (01+10)* 1 Set of all strings over {0,1} where every pair of consecutive 0s occurs before any pair of adjacent 1s. Set of all strings over {0,1}containing at most one pair of consecutive 0s and at most one pair of consecutive 1s. Set of all strings over {0,1}containing an

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

(0+10)*(1+10)*

5 6

equal number of 0s and 1s where every prefix has at most one more 0 than 1s or at most one more 1 than 0s. Set of all strings over {0,1} containing three consecutive 0s. Set of all 0s which are multiples of three and four Set of all 0s which are multiples of three

Answer: (i) (ii) (iii) (iv) Q12. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 0*(10*)* 1 Set of all strings over {0,1} where every pair of consecutive 0s occurs before any pair of adjacent 1s. 1*(01*)* Set of all strings over {0,1}containing an equal number of 0s and 1s where every prefix has at most one more 0 than 1s or at most one more 1 than 0s. (1+01+001)*(+0+00) Set of all 0s which are multiples of three and four (000)*

B C

(01+10)* The complement of (0+1)*000(0+1)*

2 3

(0+10)*(1+10)*

4 5 6

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

(iv) Q13. A B C

A->2,B->3,C->4,D->1 0*(10*)* (01+10)* The complement of (0+1)*000(0+1)* 1 2 3 (Ra)* R 1*(01*)* Set of all strings over {0,1}containing an equal number of 0s and 1s where every prefix has at most one more 0 than 1s or at most one more 1 than 0s. (1+01+001)*(+0+00) Set of all 0s which are multiples of three and four (000)*

R (aR)* where a and R are some regular expressions

4 5 6

Answer: (i) (ii) (iii) (iv) Q14. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 0*(10*)* (r*s*)**** The complement of (0+1)*000(0+1)* R (aR)* where a and R are some regular expressions 1 2 3 4 5 6 Answer: (i) (ii) (iii) (iv) Q15. A B C A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 0*(10*)* (r*s*)**** (+R)* 1 2 3 (Ra)* R 1*(01*)* (r+s)* (Ra)* R 1*(01*)* (r+s)* (1+01+001)*(+0+00) Set of all 0s which are multiples of three and four (000)*

R (aR)* where a and R are some regular expressions

4 5 6

R* Set of all 0s which are multiples of three and four (000)*

Answer: (i) (ii) (iii) (iv) Q16. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 (R*+S*)*RR (r*s*)**** (+R)* R (aR)* where a and R are some regular expressions 1 2 3 4 5 6 Answer: (i) (ii) (iii) (iv) Q17. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 (R*+S*)*RR (R+R+R+R)R (+R)* R (aR)* where a and R are some regular expressions 1 2 3 4 5 6 Answer: (i) A1,B->2,C->3,D->4 (Ra)* R (R+S)*RR RR R Set of all 0s which are multiples of three and four (000)* (Ra)* R (R+S)*RR (r+s)* R* Set of all 0s which are multiples of three and four (000)*

(ii) (iii) (iv) Q18. A B C D

A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 R(S+T) (R+R+R+R)R (+R)* R (aR)* where a and R are some regular expressions 1 2 3 4 5 6 (Ra)* R (RS+RT) RR R Set of all 0s which are multiples of three and four (000)*

Answer: (i) (ii) (iii) (iv) Q19. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 R(S+T) (R+R+R+R) (+R)*R (R+S)T 1 2 3 4 5 6 Answer: (i) (ii) (iii) (iv) Q20. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 R(S+T) (R+R+R+R) R+S (R+S)T 1 2 3 4 5 RT+ST RS+RT R S+R Set of all 0s which are multiples of three and four RT+ST RS+RT R RR Set of all 0s which are multiples of three and four (000)*

6 Answer: (i) (ii) (iii) (iv) Q21. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 R(S+T)T (R+S)+T R+S (R+S)T 1 2 3 4 5 6 Answer: (i) (ii) (iii) (iv) Q22. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 R(S+T)T (R+S)+T R+S (R+S)T 1 2 3 4 5 6 Answer: (i) (ii) (iii) (iv) Q23. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 R(S+T)T (R+S)+T (RS)T (R+S)T 1 2 3 4 5

(000)*

RT+ST RST+RTT (R+S)+T S+R Set of all 0s which are multiples of three and four (000)*

RT+ST RST+RTT (R+S)+T S+R Set of all 0s which are multiples of three and four (000)*

RT+ST RST+RTT (R+S)+T (RS)T Set of all 0s which are multiples of

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

three and four (000)*

*
(R+S)+T (RS)T (R+S)T

1 2 3 4 5 6

RT+ST

(R+S)+T (RS)T Set of all 0s which are multiples of three and four (000)*

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

*
(R+S)+T (RS)T *

1 2 3 4 5 6


(R+S)+T (RS)T Set of all 0s which are multiples of three and four (000)*

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

*
(R+S)+T R(ST) *

1 2 3 4 5


(R+S)+T (RS)T Set of all 0s which are multiples of

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

three and four (000)*

*
(R+S)+T (00)*(1+01) *

1 2 3 4 5 6


(R+S)+T 0*1 Set of all 0s which are multiples of three and four (000)*

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

*
((0+1)(0+1)(0+1))*+((0+1)(0+1)(0+1)(0+1))* (RS)T

1 2 3


Set of all strings over {0,1} which are multiples of three or four (RS)T Set of all 0s which are multiples of three and four Set of all strings over {0,1} which are multiples of three and

4 5

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

*
((0+1)(0+1)(0+1))*+((0+1)(0+1)(0+1)(0+1))* a

1 2 3


Set of all strings over {0,1} which are multiples of three or four

Consider the set accepted by the finite automata D 4

+a

Consider the set accepted by the finite automata 5 Set of all 0s which are multiples of three and four Set of all strings over {0,1} which are multiples of three and four

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

Q30. A

Consider the set accepted by the finite automata, M=({q},{0,1},,{q}) (q,0)=q,(q,1)=q Consider the set accepted by the finite automata, M=({q},{0,1},,{q}) (q,0)=q,(q,1)= Consider the set accepted by the finite automata, M=({q},{0,1},,{q}) (q,0)=,(q,1)=q (Consider the set accepted by the finite automata, M=({q},{0,1},,{q}) (q,0)=(q,1)=

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

0*0*0*

1*1*1*

5 6 Answer: (i) (ii) (iii) (iv) Q31. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Consider the set accepted by 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 Consider the set accepted by the finite automata, M=({q},{0,1},,{q}) (q,0)=q,(q,1)= Consider the set accepted by the finite automata, M=({q},{0,1},,{q}) (q,0)=,(q,1)=q (Consider the set accepted by the finite automata, 1

Set of all 0s which are multiples of three and four (000)*

0*0*1*1*

0*0*0*

1*1*1*

M=({q},{0,1},,{q}) (q,0)=(q,1)= 5 Set of all 0s which are multiples of three and four (000)*

6 Answer: (i) (ii) (iii) (iv) Q32. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Consider the set accepted by the finite automata, M=({q},{0,1},,{q}) (q,0)=q,(q,1)=q Consider the set accepted by the finite automata, M=({q},{0,1},,{q}) (q,0)=q,(q,1)= Consider the set accepted by the finite automata, M=({q},{0,1},,{q}) (q,0)=,(q,1)=q Consider the set accepted by the 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 1

(01+10)*

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

0*0*0*

1*1*1*

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

Set of all 0s which are multiples of three and four (000)*

(iv) Q33. A

A->2,B->3,C->4,D->1 Consider the set accepted by the finite automata, M=({q},{0,1},,{q}) (q,0)=q,(q,1)=q 1 Set of all strings over {0,1} with an equal number of 0s and 1s where every prefix has at most one more 0 than 1 or at most one more 1 than a 0. The set of all strings over {0,1} The set of all 0s

Consider the set accepted by the finite automata, M=({q},{0,1},,{q}) (q,0)=q,(q,1)= Consider the set accepted by the finite automata, M=({q},{0,1},,{q}) (q,0)=,(q,1)=q Consider the set accepted by the 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

The set of all 1s

6 Answer: (i) (ii) (iii) A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 (iv) A->2,B->3,C->4,D->1 Q34. A Consider the regular set denoted by (1+01+001)*(+0+00)

Set of all 0s which are multiples of three and four (000)*

Set of all strings over {0,1} with an equal number

B C

Consider the set denoted by (0+1)*(00+11) Consider the set accepted by the finite automata, M=({q},{0,1},,{q}) (q,0)=,(q,1)=q Consider the set accepted by the 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

2 3

of 0s and 1s where every prefix has at most one more 0 than 1 or at most one more 1 than a 0. The minimal finite automata has three states The minimal finite automata has 5 states The set of all 1s

6 Answer: (i) (ii) (iii) (iv) Q35. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Consider the regular set denoted by (1+01+001)*(+0+00) Consider the set denoted by (0+1)*(00+11) Consider the set denoted by the regular expression (00)*+(0000)*+(000000)* Consider the set accepted by the finite automata, M=({q0,q1,q2,q3},{0,1},,{q}) 1 2 3 4

Set of all 0s which are multiples of three and four (000)*

The minimal finite automata has four states The minimal finite automata has three states The minimal finite automata has 5 states The minimal finite automata has two states

(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 all 0s which are multiples of three and four (000)*

6 Answer: (i) (ii) (iii) (iv) Q36. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Consider the regular set denoted by (0+1)*1(0+1)(0+1)(0) Consider the set denoted by (0+1)*(00+11) Consider the set denoted by the regular expression (00)*+(0000)*+(000000)* Consider the set accepted by the 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 1 2 3 4

The minimal finite automata has four states The minimal finite automata has 8 states The minimal finite automata has 5 states The minimal finite automata has two states

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

Set of all 0s which are multiples of three and four (000)*

Q37. A

Consider the regular set the set of all strings over {0,1} not containing 1 as a substring Consider the regular set the set of all strings over {0,1} not containing 11 as a substring Consider the regular set the set of all strings over {0,1} not containing 111as a substring Consider the regular set the set of all strings over {0,1} not containing 1111 as a substring

The minimal finite automata has 5 states The minimal finite automata has 2 states The minimal finite automata has 3 states The minimal finite automata has 4 states Set of all 0s which are multiples of three and four (000)*

5 6 Answer: (i) (ii) (iii) (iv) Q38. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Consider the regular set the set of all strings over {0,1} not containing 101 as a substring Consider the regular set the set of all strings over {0,1} starting with a 1 that interpreted as the binary representation of an integer are 1

The minimal finite automata has 3 states The minimal finite automata has 4 states

congruent to 0 modulo 5 Consider the regular set the set of all strings over {0,1} where the 10th symbol from the right end is a 1 Consider the regular set the set of all strings over {0,1} ending in 00

The minimal finite automata has 7 states

The minimal finite automata has 1024 states Tshe minimal finite automata has 1000 states No minimal finite automata exists

5 6 Answer: (i) (ii) (iii) (iv) Q39. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Consider the regular set the set of all strings over {0,1} where the 1s are divisible by 10 and the 0s are divisible by 11 Consider the regular set the set of all strings over {0,1} where the 0ss are divisible the 3 and the 1s by 2 Consider the regular set the set of all strings over {0,1} where the 0s are divisible by 6 and the 1s divisible by 8 Consider the 1

The minimal finite automata has 5 states

The minimal automata has 110 states

The minimal finite automata has 6 states

The minimal finite

regular set the set of all strings over {0,1} not containing 1111 as a substring 5 6

automata has 48 states The minimal finite automata has 89 states The minimal finite automata has 890 states

Answer: (i) (ii) (iii) (iv) Q40. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Consider a deterministic finite automata with input alphabet {0,1} of 10^1000 states which has no final state Consider a deterministic finite automata with input alphabet {0,1} of 10^1000 states where all the states are final states Consider a deterministic finite automata over the alphabet {0,1} of 10^1000 states where the start state is the final state Consider a deterministic finite automata of 10^1000 states over the alphabet {0,1} where the start state is not a final state 1
The empty string is not accepted

The empty set is accepted

(0+1)* is accepted

The empty string is acepted

5 6 Answer: (i) (ii) (iii) (iv) Q41. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Consider a nondeterministic finite automata with input alphabet {0,1} of 10^1000 states which has no final state Consider a nondeterministic finite automata with input alphabet {0,1} of 10^1000 states where all the states are final states Consider a nondeterministic finite automata over the alphabet {0,1} of 10^1000 states where the start state is the final state Consider a nondeterministic finite automata of 10^1000 states over the alphabet {0,1} where the start state is not a final state 1

0 is accepted 1 is accepted

The empty string is not accepted

The empty set is accepted

(0+1)* is accepted

The empty string is acepted

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

0 is accepted 1 is accepted

A B C D

Deterministic finite 1 automata Deterministic push down 2 automata Nondeterministic linear 3 bounded auotmata Deterministic turing machines 4 5 6

r.e. sets Regular sets Deterministic context free languages Context sensititve lanaugages Context free languages Recursive sets

Answer: (i) (ii) (iii) (iv) Q43. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Nondeterministic finite automata push down automata Nondeterministic linear bounded auotmata Nondeterministic turing machines 1 2 3 4 5 6 Answer: (i) (ii) (iii) (iv) Q44. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Two way deterministic 1 finite automata Deterministic push down 2 automata Nondeterministic linear 3 bounded auotmata Multitape turing 4 r.e. sets Regular sets Deterministic context free languages Context sensitive r.e. sets Regular sets context free languages Context sensitive lanaugages Deterministic context free languageslanguages Recursive sets

machines 5 6 Answer: (i) (ii) (iii) (iv) Q45. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 1 Two way nondeterministic finite automata Deterministic push down 2 automata Nondeterministic linear 3 bounded auotmata Multiheaded turing machines 4 5 6 Answer: (i) (ii) (iii) (iv) Q46. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Halting 100 pushdown 1 tape machines Deterministic push down 2 automata Nondeterministic linear 3 bounded auotmata 10000 counter machines 4 5 6 Answer:

lanaugages Context free languages Recursive sets

r.e. sets Regular sets Deterministic context free languages Context sensitive lanaugages Context free languages Recursive sets

r.e. sets Recursive sets Deterministic context free languages Context sensitive lanaugages Context free languages Regular sets

(i) (ii) (iii) (iv) Q47. A B C D

A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Turing machines that 1 have no ink Deterministic push down 2 automata Nondeterministic linear 3 bounded auotmata Deterministic turing machines 4 5 6 r.e. sets Regular sets Deterministic context free languages Context sensitive lanaugages Context free languages Recursive sets

Answer: (i) (ii) (iii) (iv) Q48. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 1 Linear bounded automata that have no ink Deterministic push down 2 automata Nondeterministic linear 3 bounded auotmata Deterministic turing machines 4 5 6 Answer: (i) (ii) (iii) (iv) Q49. A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 r.e. sets Regular sets Deterministic context free languages Context sensitive lanaugages Context free languages Recursive sets

B C D

1 Push down automata where the stack cannot grow more than some N symbols, N fixed Deterministic push down 2 automata Nondeterministic linear 3 bounded auotmata Deterministic turing machines 4 5 6

r.e. sets

Regular sets Deterministic context free languages Context sensitive lanaugages Context free languages Recursive sets

Answer: (i) (ii) (iii) (iv) Q50. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Multidimensional, multitape, multiheaded turing machines with 1098 push down tapes but no ink Deterministic push down automata Nondeterministic linear bounded auotmata Deterministic turing machines 1 r.e. sets

B C D

2 3 4 5 6

Regular sets Deterministic context free languages Context sensitive lanaugages Context free languages Recursive sets

Answer: (i) (ii) (iii) (iv) Q51. A B A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Deterministic finite 1 automata Deterministic push down 2 Recursive sets Regular sets

C D

automata Nondeterministic linear bounded auotmata Deterministic halting turing machines

3 4 5 6

Deterministic context free languages Context sensititve lanaugages Context free languages R.e. sets

Answer: (i) (ii) (iii) (iv) Q52. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Type 3 grammars LR(k) grammars Type 1 grammars Type 0 grammars 1 2 3 4 5 6 Answer: (i) (ii) (iii) (iv) Q53. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Deterministic finite 1 automata Deterministic push down 2 automata Nondeterministic linear 3 bounded auotmata Deterministic turing machines 4 5 6 Answer: Type 0 languages Type 3 languages Deterministic context free languages Type 1 languages Type 2 languages Recursive sets r.e. sets Regular sets Deterministic context free languages Context sensititve lanaugages Context free languages Recursive sets

(i) (ii) (iii) (iv) Q54. A B C D

A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Deterministic finite automata Deterministic push down automata Halting two pushdown tape machines Deterministic turing machines 1 2 3 4 5 6 Proceduresthat are not necessarily algorithms Regular sets Deterministic context free languages Algorithms Context free languages Recursive sets

Answer: (i) (ii) (iii) (iv) Q55. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 The set of all strings over {0,1} with any number of 0s and any number of 1s The set of all strings over {0,1} with an equal number of 0s and 1s The set of all strings over {0,1,2} with an equal number of 0s, 1s and 2s. The set of regular expressions whose complement is empty 1 Recursive set that is not context sensitive

Regular set but not a dcfl

Deterministic context free language Context sensititve language that is not context free

5 6 Answer: (i) (ii) (iii) (iv) Q56. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 The set of all strings over {0,1} with any number of 0s and any number of 1s The set of all palidromes over {0,1} The set of all strings over {0,1,2} with an equal number of 0s, 1s and 2s. The set of regular expressions whose complement is empty 1

r.e but not recursive Finite set

Recursive set that is not context sensitive Regular set but not a dcfl context free language

B C

2 3

Context sensititve language that is not context free r.e but not recursive Finite set

5 6 Answer: A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 (iv) A->2,B->3,C->4,D->1 Q57. 1 A The set of all strings over {0,1} with any number of 0s and any number of 1s 2 B The set of all strings over {0,1} with an equal number of 0s and (i) (ii) (iii)

Recursive set

Regular set but not a dcfl

1s The set of all strings over {0,1,2}of the form ww where w is a string in {0,1,2}+ The set of regular expressions whose complement is empty

Deterministic context free language Context sensititve language that is not context free r.e but not recursive Finite set

5 6 Answer: (i) (ii) (iii) (iv) Q58. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 The set of all strings over {0,1} with any number of 0s and any number of 1s The set of all strings over {0,1} not of the form ww, w in {0,1}+ The set of all strings over {0,1,2} with an equal number of 0s, 1s and 2s. The set of regular expressions whose intersection is empty 1

Recursive set

Regular set but not a dcfl context free language

Context sensititve language that is not context free r.e but not recursive Finite set

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

(iv) Q59. A

A->2,B->3,C->4,D->1 The set of all strings over {0,1} with any number of 0s and any number of 1s The set of all strings over {0,1} with an unequal number of 0s and 1s The set of all strings over {0,1,2} with an equal number of 0s, 1s and 2s. The set of regular expressions whose complement is empty 1 Recursive set

Regular set but not a dcfl

context free language

Context sensititve language that is not context free r.e but not recursive Finite set

5 6 Answer: (i) (ii) (iii) (iv) Q61. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 The set of all strings over {0,1} not containing three consecutive 0s and not containing three consecutive 1s. The set of all strings over {0,1,2} with an unequal number of 0s and 1s or an unequal number of 1s and 2s The set of all 1

Recursive set

Regular set but not a dcfl

context free

strings primes in unary. The set of regular expressions whose complement is empty

language 4 Context sensititve language that is not context free r.e but not recursive Finite set

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

Q62. A B

C D

The set of all powers of 2 in binary The set of all strings palidromes over a finite alphabet The set of all strings primes in unary. The set of regular expressions whose complement is empty

1 2

Recursive set Regular set but not a dcfl context free language Context sensititve language that is not context free r.e but not recursive Finite set

3 4

5 6 Answer: (i) (ii) (iii) (iv) Q63. A B A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 The set of all powers of 2 in binary The set of all 1 2

Recursive set Regular set but not

C D

strings with an equal number of 0s and 1s or with twice as many 0s as 1s. 3 The set of all strings that are not primes in binary. 4 The set of regular expressions whose complement is empty 5 6

a dcfl

context free language Context sensititve language that is not context free r.e but not recursive Finite set

Answer: A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 (iv) A->2,B->3,C->4,D->1 Q64. A The set of all powers of 20 in base 20 B {0^m1^n0^(m+n)|m,n>1} (i) (ii) (iii) C D The set of all strings primes in unary. The set of regular expressions whose complement is empty

1 2 3 4

Recursive set Regular set but not a dcfl context free language Context sensititve language that is not context free r.e but not recursive Finite set

5 6 Answer: (i) (ii) (iii) (iv) Q65. A B A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 The set of all powers of 20 in base 20 {0^m1^n0^(m+n)|m,n>1} 1 2

Recursive set Regular set but

C D

{wwRw|w in {0,1}+} The set of regular expressions whose complement is empty

3 4

5 6 Answer: (i) (ii) (iii) (iv) Q66. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 The set of all powers of 20 in base 20 {0^m1^n0^(m+n)|m,n>1} {a^nb^n^2|n>1} The set of regular expressions whose complement is empty 1 2 3 4

not a dcfl context free language Context sensititve language that is not context free r.e but not recursive Finite set

Recursive set Regular set but not a dcfl context free language Context sensititve language that is not context free r.e but not recursive Finite set

5 6 Answer: (i) (ii) (iii) (iv) Q67. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 The set of all powers of 20 in base 20 {0^m1^n0^(m+n)|m,n>1} {a^Ib^j|gcd(I,j)=1} The set of regular expressions 1 2 3 4

Recursive set Regular set but not a dcfl context free language Context

whose complement is empty 5 6 Answer: (i) (ii) (iii) (iv) Q68. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 The set of all powers of 200 in base 200 {0^m1^n0^(m+n)|m,n>1} {a^Ib^jc^k|I not equal to j not equal to k} The set of regular expressions whose complement is empty 1 2 3 4

sensititve language that is not context free r.e but not recursive Finite set

Recursive set Regular set but not a dcfl context free language Context sensititve language that is not context free r.e but not recursive Finite set

5 6 Answer: (i) (ii) (iii) (iv) Q69. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 The set of all strings ovesr {0,1} not 1 containing 0000000001111111100000 as a substring {0^m1^n0^(m+n)|m,n>1} 2 {a^Ib^jc^k|I not equal to j not equal to k} {0^n1^n| n<20 lakh} 3 4

Finite set

B C D

Regular set but not a dcfl context free language Context sensititve language that is

5 6

not context free r.e but not recursive Recursive set not necessarily a context sensitive language

Answer: (i) (ii) (iii) (iv) Q70. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 S-a|aS|b|bS SaSb|ab {a^Ib^jc^k|I not equal to j not equal to k} {0^n1^n| n<2000000 lakh} 1 2 3 4 5 6 Finite set Regular set but not a dcfl context free language Context sensititve language that is not context free r.e but not recursive Recursive set not necessarily a context sensitive language

Answer: (i) (ii) (iii) (iv) Q71. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 S-a|aS|b|bS SaSa|bSb|a|b 1 2 Finite set Regular set but not a dcfl context free language Context sensititve language that is not context free r.e but not

{a^Ib^jc^k|I not equal 3 to j not equal to k} {0^n1^n| n<2000000 4 lakh} 5

recursive Recursive set not necessarily a context sensitive language

Answer: A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 (iv) A->2,B->3,C->4,D->1 Q72. A S-a|aS|b|bS B SaSa|bSb|a|b (i) (ii) (iii) C SaSBC|aBC CBBC aBab bBbb bCbc cCcc Sa|b|c|d

1 2 3

Finite set Regular set but not a dcfl context free language

4 5 6

Context sensititve language that is not context free r.e but not recursive Recursive set not necessarily a context sensitive language

Answer: (i) (ii) (iii) (iv) Q73. A B C A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 S-a|aS|b|bS SaSa|bSb|a|b SaSBC|aBC CBBC aBab bBbb bCbc 1 2 3 Finite set Regular set but not a dcfl context free language

cCcc Sa|b|c|d

4 5 6

The set {a^nb^nc^n|n>=1} r.e but not recursive Recursive set not necessarily a context sensitive language

Answer: (i) (ii) (iii) (iv) Q74. A B C A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 S-a|aS|b|bS SaSa|bSb|a|b SaSBC|aBC CBBC aBab bBbb bCbc cCcc SCWaD WaaaW WDEW aEEa CECW WDFW aFWFwa CFW 1 2 3 The set of all powers of two unary Regular set but not a dcfl context free language

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

5 6

r.e but not recursive Recursive set not necessarily a context sensitive language

Answer: (i) (ii) (iii) (iv) Q75. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 S-a|aS|b|bS 1 Unrestricted grammar

B C

SaSa|bSb|a|b SaSBC|aBC CBBC aBab bBbb bCbc cCcc SCWaD WaaaW WDEW aEEa CECW WDFW aFWFwa CFW

2 3

Regular grammar Context free grammar

Context sensitive grammar

5 6

r.e but not recursive Recursive set not necessarily a context sensitive language

Answer: (i) (ii) (iii) (iv) Q76. A B C A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 S-a|aS|b|bS SaSa|bSb|a|b SaSBC|aBC CBBC aBab bBbb bCbc cCcc SCWaD WaaaW WDEW aEEa CECW WDFW aFWFwa CFW 1 2 3 Type 0 Type 3 Type 2

Type 1

r.e but not

6 Answer: (i) (ii) (iii) (iv) Q77. A B C A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 All C programs SaSa|bSb|a|b SaSBC|aBC CBBC aBab bBbb bCbc cCcc SCWaD WaaaW WDEW aEEa CECW WDFW aFWFwa CFW 1 2 3

recursive Type 4

Unrestricted grammar Procedures Context free grammar

Context sensitive grammar

5 6

Not r.e. Recursive set not necessarily a context sensitive language

Answer: (i) (ii) (iii) (iv) Q78. A B C A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Halting C and Java programs SaSa|bSb|a|b SaSBC|aBC CBBC aBab 1 2 3 Unrestricted grammar Algorithms Context free grammar

bBbb bCbc cCcc SCWaD WaaaW WDEW aEEa CECW WDFW aFWFwa CFW

Context sensitive grammar

5 6

r.e but not recursive Recursive set not necessarily a context sensitive language

Answer: (i) (ii) (iii) (iv) Q79. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 r.e. sets 1 Closed under complement but not under union or intersection Not closed under complement but closed under union and intersection Closed under union, intersection and complement Closed under union and intersection but not under complement Not closed under union but closed under intersection Not closed under union or complement

Recursive sets

C D

Context free languages Deterministic context free languages

3 4

5 6

Answer: (i) (ii) (iii) (iv) Q80. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 r.e. sets 1 Closed under complement but not under union or intersection Not closed under complement but closed under union and intersection Closed under union, intersection and complement Closed under union and intersection but not under complement Not closed under union but closed under intersection Not closed under union or complement

Regular sets

C D

Context free languages Deterministic context free languages

3 4

5 6

Answer: (i) (ii) (iii) (iv) Q81. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 Finite sets 1 Closed under complement but not under union or intersection Not closed under complement but closed under union and intersection Closed under union, intersection

Recursive sets

Context free languages

Deterministic context free languages

5 6

and complement Closed under union and intersection but not under complement Not closed under union but closed under intersection Not closed under union or complement

Answer: (i) (ii) (iii) (iv) Q82. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 The clique problem The 2-CNF problem The equivalence of context-free languages Equivalence of finite automata 1 2 3 4 5 6 Decidable NP-complete Is in P Undecidable Not closed under union but closed under intersection Not closed under union or complement

Answer: (i) (ii) (iii) (iv) Q83. A B C A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 The Hamiltonian circuit problem The 2-CNF problem The equivalence of 1 2 3 Decidable NP-complete Is in P

a context-free to * where is the input vocabulary. The membership problem of context sensitive languages

4 5 6

Undecidable Not closed under union but closed under intersection Not closed under union or complement

Answer: (i) (ii) (iii) (iv) Q84. A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 The knapsack problem The 2-CNF problem The equivalence of two deterministic turing machines Whether a context free language is finite, infinite or empty 1 2 3 4 Decidable NP-complete Is in P Undecidable

5 6

Not closed under union but closed under intersection Not closed under union or complement

Answer: (i) (ii) (iii) (iv) Q85. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 The graph coloring 1 Decidable

B C D

problem The 2-CNF problem The Post Correspondence problem PCP over a single alphabet

2 3 4 5 6

NP-complete Is in P Undecidable Not closed under union but closed under intersection Not closed under union or complement

Answer: (i) (ii) (iii) (iv) Q86 A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 All formal languages The class of regular sets Whether a turing machine will halt on blank tape Whether a turing machine will ever leave an input region 1 2 3 4 Decidable Are uncountable Countably infinite Undecidable

5 6

Not closed under union but closed under intersection Not closed under union or complement

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

A B C D

{w$w| w in (0+1)*} {wwR|in (0+1)*} {wwwwwwwwR|w in(0+1)+} The set of all strings not containing 0000000000001111000 over {0,1} of length less than 10^100000

1 2 3 4

Finite set Deterministic context free language Context free language that is not deterministic Context sensitive language that is not context free Not closed under union but closed under intersection Not closed under union or complement

5 6

Answer: (i) (ii) (iii) (iv) Q88 A B C D A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 {0^100n 1^1000n|n>=1} {0^n1^n|n>=1^n1^2n|n>=1 {wwwwwwwwR|w in(0+1)+} The set of all strings not containing 0000000000001111000 over {0,1} of length less than 10^100000 1 2 3 4 5 Finite set Deterministic context free language Context free language that is not deterministic Context sensitive language that is not context free Not closed under union but closed under intersection Not closed under union or complement

Answer:

(i) (ii) (iii) (iv) Q89 A

A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 {ww| w in (0+1)*} 1 The complement is not a finite set but the set is finite The complement is a cfl The complement is not a clf The complement is a dcfl

B C D

{wwR|in (0+1)*} {w$w|n(0+1)+} The set of all strings not containing 0000000000001111000 over {0,1} of length less than 10^100000

2 3 4

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

Recursive but not a csl r.e but not recursive

B C

Sa SA Aa Sa SA|B Aa Bb SSS|a|

2 3

The languge generated is ambiguous with an infinite number of derivations for a The language generated is unambiguous The language generated is ambiguous with two derivations for a The language generated is ambiguous with three distinct

derivations for a The language generated is inherently ambigugous The language generated is r.e but not recursive

Answer: (i) (ii) (iii) (iv) Q91. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 EE+E|E*E|(E)|i 1 The languge generated is ambiguous with an infinite number of derivations for a The language generated is ambiguous and is the set of all C expressions over + and * The language generated is ambiguous with two derivations for a The language generated is ambiguous with three distinct derivations for a The language generated is inherently ambigugous The language generated is r.e but not recursive

Sa SA Aa

Sa SA|B Aa Bb SSS|a|

Answer: (i) (ii) (iii) (iv) Q92. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 EE+E|E*E|(E)|i 1 The language generated is ambiguous with an infinite number of derivations for a The language generated is ambiguous and is the set of all C expressions over + and * The language generated is ambiguous and is the set of all regular expressions over {a,b} The language generated is ambiguous with three distinct derivations for a The language generated is inherently ambigugous The language generated is r.e but not recursive

EE+E|E.E|(E)|a|b||

Sa SA|B Aa Bb

SSS|a|

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

EE+E|E*E|(E)|i

EE+E|E.E|(E)|a|b||

EE+T|T TT*F|F F(E)|i

SSS|a|

The language generated is ambiguous with an infinite number of derivations for a The language generated is ambiguous and is the set of all C expressions over + and * The language generated is an unambiguous grammar for arithmetic expressions The language generated is ambiguous with three distinct derivations for a The language generated is inherently ambigugous The language generated is r.e but not recursive

Answer: (i) (ii) (iii) (iv) Q94. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 EE+E|E*E|(E)|i 1 The language generated is all strings over {a,b} not of the form ww The language generated is ambiguous and

EE+E|E.E|(E)|a|b||

EE+T|T TT*F|F F(E)|i

SAB|BA AaAa|aAb|bAa|bAb|a BaBa|aBb|bBa|bBb|b SS1 S1aaS1|abS1|baS1|bbS1|a|b

is the set of all C expressions over + and * The language generated is an unambiguous grammar for arithmetic expressions The language generated is ambiguous with three distinct derivations for a The language generated is inherently ambigugous The language generated is r.e but not recursive

Answer: (i) (ii) (iii) (iv) Q95. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 EE+E|E*E|(E)|i 1 The language generated is ambiguous and is the set of all strings over {a,b} with an equal number of as and bs. The language generated is ambiguous and is the set of all C expressions over + and * The language generated is an

EE+E|E.E|(E)|a|b||

EE+T|T TT*F|F

F(E)|i

SaSbS|bSaS|

unambiguous grammar for arithmetic expressions The language generated is ambiguous with three distinct derivations for a The language generated is inherently ambigugous The language generated is r.e but not recursive

Answer: (i) (ii) (iii) (iv) Q96. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 EE+E|E*E|(E)|i 1 The language generated is ambiguous and is the set of all strings over{a,b} with twice as many as as bs. The language generated is ambiguous and is the set of all C expressions over + and * The language generated is an unambiguous grammar for arithmetic expressions The language generated is ambiguous with

EE+E|E.E|(E)|a|b||

EE+T|T TT*F|F F(E)|i

SaSbSaS|aSaSbS|bSaSaS|

three distinct derivations for a The language generated is inherently ambigugous The language generated is r.e but not recursive

Answer: (i) (ii) (iii) (iv) Q97. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 AaAb|ab A1a|a A1 SA1|A1 S| 1 The language generated is ambiguous and is the set of all strings over{a,b} with twice as many as as bs. The language generated is the set of all strings over {a,b} with the as greater than the bs. The language generated is an unambiguous grammar for arithmetic expressions The language generated is ambiguous with three distinct derivations for a The language generated is inherently ambigugous The language

EE+E|E.E|(E)|a|b||

EE+T|T TT*F|F F(E)|i

SaSbSaS|aSaSbS|bSaSaS|

generated is r.e but not recursive Answer: (i) (ii) (iii) (iv) Q98. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 SA1 A| A B1||A1 |B1 AaAb|ab A1a | a A1 B1b | b B1 1 The language generated is ambiguous and is the set of all strings over{a,b} with twice as many as as bs. The language generated is set of all strings over {a.b} with an unequal number of as and bs The language generated is an unambiguous grammar for arithmetic expressions The language generated is ambiguous with three distinct derivations for a The language generated is inherently ambigugous The language generated is r.e but not recursive

EE+E|E.E|(E)|a|b||

EE+T|T TT*F|F F(E)|i

SaSbSaS|aSaSbS|bSaSaS|

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

(iii) (iv) Q99. A

A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 EE+E|E*E|(E)|i 1 The language generated is {a^I b^J c^K|I not equal to J or J not equal to K} The language generated is ambiguous and is the set of all C expressions over + and * The language generated is an unambiguous grammar for arithmetic expressions The language generated is ambiguous with three distinct derivations for a

EE+E|E.E|(E)|a|b||

EE+T|T TT*F|F F(E)|i

SA1|B1|C1|A1 C1 SA1 A|A1 A C1 SB C1| A1 B C1 AaAb|ab BaBb|ab A1a| a A1 B1b|b B1 C1c|c C1

The language generated is inherently ambigugous The language generated is r.e but not recursive

Answer: (i) (ii) (iii) (iv) Q100. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 SaSa|bSb|cSc|dSd 1 The language generated is ambiguous and

EE+E|E.E|(E)|a|b||

EE+T|T TT*F|F F(E)|i

SaSbSaS|aSaSbS|bSaSaS|

is the set of all strings over{a,b} with twice as many as as bs. The language generated is the set of all palidromes over {a,b,c,d} The language generated is an unambiguous grammar for arithmetic expressions The language generated is ambiguous with three distinct derivations for a The language generated is inherently ambigugous The language generated is r.e but not recursive

Answer: (i) (ii) (iii) (iv) Q101. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 SaSa|bSb|cSc|dSd 1 The language generated is ambiguous and is the set of all strings over{a,b} with twice as many as as bs. The language generated is the set of all palidromes over

{a^I b^J c^K|I=max(J,K)}

C D

EE+T|T TT*F|F F(E)|i SaSbSaS|aSaSbS|bSaSaS|

3 4

{a,b,c,d} The language generated is a a csl and not a cfl The language generated is ambiguous with three distinct derivations for a The language generated is inherently ambigugous The language generated is r.e but not recursive

Answer: (i) (ii) (iii) (iv) Q102. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 SaSa|bSb|cSc|dSd 1 The language generated is ambiguous and is the set of all strings over{a,b} with twice as many as as bs. The language generated is the set of all palidromes over {a,b,c,d} The language generated is a csl which is not a cfl The language generated is ambiguous with three distinct derivations for a

{a^I b^J c^K|I=min(J,K}

EE+T|T TT*F|F F(E)|i SaSbSaS|aSaSbS|bSaSaS|

The language generated is inherently ambigugous The language generated is r.e but not recursive

Answer: (i) (ii) (iii) (iv) Q103. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 SaSa|bSb|cSc|dSd 1 The language generated is ambiguous and is the set of all strings over{a,b} with twice as many as as bs. The language generated is the set of all palidromes over {a,b,c,d} The language generated is a csl which is not a cfl The language generated is ambiguous with three distinct derivations for a The language generated is inherently ambigugous The language generated is r.e but not recursive

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

EE+T|T TT*F|F F(E)|i SaSbSaS|aSaSbS|bSaSaS|

Answer:

(i) (ii) (iii) (iv) Q104. A

A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 SaSa|bSb|cSc|dSd 1 The language generated is ambiguous and is the set of all strings over{a,b} with twice as many as as bs. The language generated is the set of all palidromes over {a,b,c,d} The language generated is a csl which is not a cfl The language generated is ambiguous with three distinct derivations for a The language generated is inherently ambigugous The language generated is r.e but not recursive

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

EE+T|T TT*F|F F(E)|I SaSbSaS|aSaSbS|bSaSaS|

Answer: (i) (ii) (iii) (iv) Q105. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 SaSa|bSb|cSc|dSd 1 The language generated is ambiguous and

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

{a^I b^J c^K|K=I+J}

SaSbSaS|aSaSbS|bSaSaS|

is the set of all strings over{a,b} with twice as many as as bs. The language generated is the set of all palidromes over {a,b,c,d} The language generated is a csl which is not a cfl The language generated is a dcfl which is not regular The language generated is inherently ambigugous The language generated is r.e but not recursive

Answer: (i) (ii) (iii) (iv) Q106. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 SaSa|bSb|cSc|dSd 1 The language generated is ambiguous and is the set of all strings over{a,b} with twice as many as as bs. The language generated is the set of all palidromes over {a,b,c,d} The language generated is a

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

{a^I b^J c^K|K<I, K<J}

SaSbSaS|aSaSbS|bSaSaS|

csl which is not a cfl The language generated is a cfl which is not a dcfl The language generated is inherently ambigugous The language generated is r.e but not recursive

Answer: (i) (ii) (iii) (iv) Q106. A A1,B->2,C->3,D->4 A->2,B->3,C->4,D->5 A->3,B-4,C->5,D->6 A->2,B->3,C->4,D->1 {a^I b^J c^J d^2 e^3I} 1 The language generated is ambiguous and is the set of all strings over{a,b} with twice as many as as bs. The language is a cfl and if we take the first half of the strings we ger a language which is not a cfl The language generated is a csl which is not a cfl The language generated is ambiguous with three distinct derivations for a The language

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

EE+T|T TT*F|F F(E)|i SaSbSaS|aSaSbS|bSaSaS|

generated is inherently ambigugous The language generated is r.e but not recursive

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

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

Potrebbero piacerti anche