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

MATCH ITEMS

Match the following:Q1. A B C D

(00)* 0(00)*

1 2

00(00)*+0(00)* 3 0* 4 5

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) 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

Q2. A

(00)*(11)*

0(00)*(11)*

00(00)*+0(00)* 3

0*

4 5

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

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)

0(00)*

00(00)*+0(00)* 3

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

(1+01)*(+0)

4 5

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) 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)

Set of all strings over {0,1} not containing two

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

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

(1+01)*(+0)

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 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) 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

Q5. A (0+10)*(+1)

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

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

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

(1+01)*(+0)

{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 multiples of three

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

Q6. A (11+0)*(00+1)*

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

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

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

(1+01)*(+0)

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 multiples of three

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

Q7. A (11+0)*(00+1)*

1 Set of all strings over {0,1} not containing two consecutive 0s B (01+10)* 2 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 C [00+11+(01+10)(00+11)*(01+10)]* 3 Set of all strings over {0,1}containing an equal

D (1+01)*(+0)

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

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 Q8. A (11+0)*(00+1)*

1 Set of all strings over {0,1} ending in 00. B (01+10)* 2 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 C [00+11+(01+10)(00+11)*(01+10)]* 3 Set of all strings over {0,1}containing an equal number of 0s and 1s where every prefix has at most

D (0+1)*00

one more 0 than 1s or at most one more 1 than 0s. 4 Set of all strings over {0,1} containing an even number of 0s and an even number of 1s. 5 Set of all 0s which are multiples of three and four 6 Set of all 0s which are multiples of three

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

Q9. A

(11+0)*(00+1)*

(01+10)*

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

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

(1+01)*(+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) Q10. 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)*

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

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 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

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

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) 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

Q11. A L=(0+1)*00(0+1)*00(0+1)* 1

Set of all

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

(01+10)*

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

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

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 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) 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

Q12. A

0*(10*)*

Set of all strings over {0,1} where every pair of consecutive 0s occurs before any

B C

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

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

4 5 6

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)*

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

Q13. A

0*(10*)*

(Ra)* R

B C

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

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

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)*

Answer: (i) (ii) (iii) (iv) Q14. 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*)*

(Ra)* R

B C D

(r*s*)**** 2 The complement 3 of (0+1)*000(0+1)* R (aR)* where a 4 and R are some regular expressions 5 6

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

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

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

Q15. A B C D

0*(10*)* (r*s*)**** (+R)* R (aR)*

1 2 3 4

(Ra)* R 1*(01*)* (r+s)* R*

where a and R are some regular expressions 5 Set of all 0s which are multiples of three and four (000)*

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

Q16. A B C D

(R*+S*)*RR (r*s*)**** (+R)* R (aR)* where a and R are some regular

1 2 3 4

(Ra)* R (R+S)*RR (r+s)* R*

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

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

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

Set of all 0s which are

multiples of three and four (000)*

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

Q18. A B C D

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

1 2 3 4

(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

RT+ST RS+RT R RR Set of all 0s which are multiples of three and four (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 Q20. A B C D

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 (000)*

Answer: (i) (ii) (iii) (iv) Q21. 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(S+T)T

RT+ST

B C D

(R+S)+T R+S (R+S)T

2 3 4 5

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

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

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

four (000)*

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

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

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

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

1 2 3 4 5

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. 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

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

1 2 3 4 5


(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

three and four (000)*

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

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

1 2 3 4 5


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

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

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 strings over {0,1} which are multiples of three or four D * 4 (RS)T 5 Set of all 0s which are multiples of three and four 6 Set of all strings

over {0,1} which are multiples of three and four

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

Q29. A * 1 B ((0+1)(0+1)(0+1))*+((0+1)(0+1)(0+1)(0+1))* 2 3 Set of all C a strings over {0,1} which are multiples Consider the set accepted by the finite of three automata or four

4 +a

Consider the set accepted by the finite automata 5 Set of all 0s which are multiples of three and four 6 Set of all strings over {0,1} which are multiples of three and 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 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*

Set of all 0s which are

multiples of three and four (000)*

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

Q31. A

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

0*0*1*1*

0*0*0*

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

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

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

(01+10)*

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

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

0*0*0*

1*1*1*

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

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

Q33. A

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

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

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

The set of all 1s

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 all 0s which are multiples of three and four (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 set denoted by (1+01+001)*(+0+00)

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

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

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

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 minimal finite automata has three states The minimal finite automata has 5 states The set of all 1s

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

Answer: (i) (ii) (iii) (iv) Q35. 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 denoted by (1+01+001)*(+0+00)

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

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

Consider the set denoted by the regular expression (00)*+(0000)*+(000000)*

Consider the set accepted by 4 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 5

states The minimal finite automata has 5 states The minimal finite automata has two states Set of all 0s which are multiples of three and four (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 Q36. A

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 4 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 5

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 Set of all

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

Answer: (i) (ii) (iii) (iv) Q37. 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 1 regular set the set of all strings over {0,1} not containing 1 as a substring Consider the 2 regular set the set of all strings over

The minimal finite automata has 5 states

The minimal finite automata has 2 states

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

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)*

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 1 regular set the set of all strings over {0,1} not containing 101 as a substring Consider the 2 regular set the set of all strings over {0,1} starting with a 1 that interpreted as the binary representation of an integer are congruent to 0 modulo 5 Consider the 3 regular set the set of all

The minimal finite automata has 3 states

The minimal finite automata has 4 states

The minimal finite automata

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

has 7 states

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

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 Q39. A

Consider the 1 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 2 regular set the set of all strings over {0,1} where the 0ss are divisible the 3 and the 1s by 2 Consider the 3 regular set the set of all strings over {0,1} where the 0s are divisible by 6

The minimal finite automata has 5 states

The minimal automata has 110 states

The minimal finite automata has 6 states

and the 1s divisible by 8 Consider the 4 regular set the set of all strings over {0,1} not containing 1111 as a substring 5

The minimal finite automata has 48 states

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

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

Q40. A

1 Consider a deterministic finite automata with input alphabet {0,1} of 10^1000 states which has no final state 2 Consider a deterministic finite automata with input alphabet {0,1} of 10^1000 states where all the states are final states Consider a 3 deterministic finite automata over the alphabet {0,1} of

The empty string is not accepted

The empty set is accepted

(0+1)* is accepted

10^1000 states where the start state is the final state 4 Consider a deterministic finite automata of 10^1000 states over the alphabet {0,1} where the start state is not a final state 5 6

The empty string is acepted

0 is accepted 1 is accepted

Answer: (i) (ii) (iii) (iv) Q41. 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

The empty string is not accepted

The empty set is accepted

(0+1)* is accepted

The empty string is acepted

alphabet {0,1} where the start state is not a final state 5 6 0 is accepted 1 is accepted

Answer: (i) (ii) (iii) (iv) Q42. 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 Nondeterministic linear bounded auotmata Deterministic turing machines

1 2 3 4 5

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

languages Recursive sets

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

Q43. A B C D

Nondeterministic finite automata push down automata Nondeterministic linear bounded auotmata Nondeterministic turing machines

1 2 3 4 5 6

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

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 finite automata Deterministic push down automata Nondeterministic linear bounded auotmata Multitape turing machines

1 2 3 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) 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

Two way nondeterministic finite automata Deterministic push down automata Nondeterministic linear bounded auotmata Multiheaded turing machines

1 2 3 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) 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 tape machines Deterministic push down automata Nondeterministic linear bounded auotmata 10000 counter machines

1 2 3 4 5 6

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

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

Q47. A B C D

Turing machines that have no ink Deterministic push down automata Nondeterministic linear bounded auotmata Deterministic turing machines

1 2 3 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

Linear bounded automata that have no ink Deterministic push down automata Nondeterministic linear bounded auotmata Deterministic turing machines

1 2 3 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) Q49. 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

B C D

Push down automata where the stack cannot grow more than some N symbols, N fixed Deterministic push down automata Nondeterministic linear bounded auotmata Deterministic turing machines

r.e. sets

2 3 4 5 6

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

B C D

Multidimensional, multitape, multiheaded turing machines with 1098 push down tapes but no ink Deterministic push down automata Nondeterministic linear bounded auotmata Deterministic turing machines

r.e. sets

2 3 4 5

Regular sets Deterministic context free languages Context sensitive lanaugages Context free

languages Recursive sets

Answer: (i) (ii) (iii) (iv) Q51. 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 Nondeterministic linear bounded auotmata Deterministic halting turing machines

1 2 3 4 5 6

Recursive sets Regular sets 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

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

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 automata Deterministic push down automata Nondeterministic linear bounded auotmata Deterministic turing machines

1 2 3 4 5 6

Type 0 languages Type 3 languages Deterministic context free languages Type 1 languages Type 2 languages 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 (iv) A->2,B->3,C->4,D->1 Q54. A

Deterministic 1 finite automata Deterministic 2 push down automata Halting two 3 pushdown tape machines Deterministic 4 turing machines 5 6

B C

Proceduresthat are not necessarily algorithms Regular sets Deterministic context free languages Algorithms Context free languages 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

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

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

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 r.e but not

recursive Finite set

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

B C

The set of all 1 strings over {0,1} with any number of 0s and any number of 1s The set of all 2 palidromes over {0,1} The set of all 3 strings over {0,1,2} with an equal number of 0s, 1s and

Recursive set that is not context sensitive

Regular set but not a dcfl context free language

2s. The set of regular expressions whose complement is empty

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

5 6

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 Q57. A

The set of all 1 strings over {0,1} with any number of 0s and any number of 1s The set of all 2

Recursive set

Regular set

strings over {0,1} with an equal number of 0s and 1s The set of all 3 strings over {0,1,2}of the form ww where w is a string in {0,1,2}+ 4 The set of regular expressions whose complement is empty 5 6

but not a dcfl

Deterministic context free language

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

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

Q58. A

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

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) Q59. 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 1 strings over {0,1} with any number of 0s and any number of 1s The set of all 2 strings over {0,1} with an unequal number of 0s and 1s The set of all 3 strings over {0,1,2} with an equal number of

Recursive set

Regular set but not a dcfl

context free language

0s, 1s and 2s. The set of regular expressions whose complement is empty

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 1 strings over {0,1} not containing three consecutive 0s and not

Recursive set

containing three consecutive 1s. The set of all 2 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 3 strings primes in unary. 4 The set of regular expressions whose complement is empty 5 6

Regular set but not a dcfl

context free language Context sensititve language that is not context free r.e but not recursive 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

Q62. A B

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

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 strings with an equal number of 0s and 1s or with twice as many 0s as 1s. The set of all strings that are not primes in binary. The set of

1 2

Recursive set Regular set but not a dcfl

context free language

Context

regular expressions whose complement is empty 5 6

sensititve language that is not context free r.e but not recursive 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 Q64. A B C D

The set of all powers of 1 20 in base 20 {0^m1^n0^(m+n)|m,n>1} 2 The set of all strings primes in unary. The set of regular expressions whose 3 4

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

complement is empty 5 6

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

Answer: (i) (ii) (iii) (iv) Q65. 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 1 20 in base 20 {0^m1^n0^(m+n)|m,n>1} 2 {wwRw|w in {0,1}+} The set of regular expressions whose complement is empty 3 4

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

5 6

context free r.e but not recursive Finite set

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 1 20 in base 20 {0^m1^n0^(m+n)|m,n>1} 2 {a^nb^n^2|n>1} The set of regular expressions whose complement is empty 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

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 1 20 in base 20 {0^m1^n0^(m+n)|m,n>1} 2 {a^Ib^j|gcd(I,j)=1} The set of regular expressions whose complement is empty 3 4

5 6

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

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 1 200 in base 200 {0^m1^n0^(m+n)|m,n>1} 2 {a^Ib^jc^k|I not equal to 3 j not equal to k} The set of regular expressions whose complement is empty 4

5 6

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

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

B C D

The set of all strings ovesr 1 {0,1} not containing 0000000001111111100000 as a substring {0^m1^n0^(m+n)|m,n>1} 2 {a^Ib^jc^k|I not equal to j 3 not equal to k} {0^n1^n| n<20 lakh} 4

Finite set

5 6

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) Q70. 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

a|aS|b|bS SaSb|ab

S-

1 2

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

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

5 6

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

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

Q71. A B C D

S-a|aS|b|bS 1 SaSa|bSb|a|b 2 {a^Ib^jc^k|I not equal to j not equal to k} {0^n1^n| n<2000000 3 4

Finite set Regular set but not a dcfl context free language Context sensititve

lakh} 5 6

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

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 B C

S-a|aS|b|bS 1 SaSa|bSb|a|b 2 SaSBC|aBC CBBC aBab 3

Finite set Regular set but not a dcfl context free language

bBbb bCbc cCcc Sa|b|c|d

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 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 SaSa|bSb|a|b 2

Finite set Regular set but not

SaSBC|aBC CBBC aBab bBbb bCbc cCcc Sa|b|c|d

a dcfl context free language

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 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

The set of all powers of two unary

B C

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

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) 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 Q75. A B C

S-a|aS|b|bS

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

Unrestricted grammar 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 recursive

Type 4

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 1 SaSa|bSb|a|b 2 SaSBC|aBC 3 CBBC aBab bBbb bCbc cCcc SCWaD 4 WaaaW WDEW aEEa CECW WDFW aFWFwa CFW

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 bBbb bCbc cCcc SCWaD WaaaW

1 2 3

Unrestricted grammar Algorithms Context free grammar

Context sensitive

WDEW aEEa CECW WDFW aFWFwa CFW 5 6

grammar

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

Closed under complement but not under union

Recursive sets

Context free languages

Deterministic 4 context free languages

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

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

Regular sets

Context free languages

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

Deterministic 4 context free languages

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) 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

Closed under complement but not

Recursive sets

Context free languages

Deterministic 4 context free languages

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

Answer: (i) (ii) (iii) (iv) Q82. 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 clique problem The 2-CNF problem The equivalence of contextfree languages Equivalence of finite automata

1 2 3

Decidable NP-complete Is in P

4 5

Undecidable Not closed under union but closed under intersection Not closed

under union or complement

Answer: (i) (ii) (iii) (iv) Q83. 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

B C

The Hamiltonian circuit problem The 2-CNF problem The equivalence of a contextfree to * where is the input vocabulary. The

Decidable

2 3

NP-complete Is in P

Undecidable

membership problem of context sensitive languages 5 Not closed under union but closed under intersection Not closed under union or complement

Answer: (i) (ii) (iii) (iv) Q84. 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 knapsack problem The 2-CNF

1 2

Decidable NP-complete

problem 3 The equivalence of two deterministic turing machines 4 Whether a context free language is finite, infinite or empty 5

Is in P

Undecidable

Not closed under union but closed under intersection Not closed under union or 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 Q85. A B C D

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

1 2 3 4 5

Decidable NP-complete Is in P Undecidable Not closed under union but closed under intersection Not closed under union or 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 Q86 A B C

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

Decidable Are uncountable Countably infinite

Undecidable

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

Answer: (i) (ii) (iii) (iv) Q87. 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

{w$w| w in (0+1)*} {wwR|in (0+1)*} {wwwwwwwwR|w in(0+1)+}

1 2 3

4 The set of all strings not containing 0000000000001111000 over {0,1} of length less than 10^100000 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) Q88 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^100n 1^1000n|n>=1} 1 {0^n1^n|n>=1^n1^2n|n>=1 2 {wwwwwwwwR|w in(0+1)+} 3

4 The set of all strings not containing 0000000000001111000 over {0,1} of length less than 10^100000 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)*}

B C

{wwR|in (0+1)*} {w$w|n(0+1)+}

2 3

The complement is not a finite set but the set is finite The complement is a cfl The

4 The set of all strings not containing 0000000000001111000 over {0,1} of length less than 10^100000 5 6

complement is not a clf The complement is a dcfl Recursive but not a csl r.e but not recursive

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

S a

The languge generated is ambiguous with an infinite number of derivations

S a S A Aa S a SA|B Aa Bb

SSS|a|

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

S a S A Aa

S a SA|B

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

Aa Bb

SSS|a|

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) 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 Q92. A

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

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

S a SA|B Aa Bb

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}

SSS|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) 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|| 2

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) 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

Q94. A EE+E|E*E|(E)|i

The language generated is all strings over {a,b} not of the form

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

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

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

ww 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) 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

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

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

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

SaSbS|bSaS|

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) 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

Q96. A EE+E|E*E|(E)|i

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

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 *

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

SaSbSaS|aSaSbS|bSaSaS| 4

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)

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

Q97. A AaAb|ab A1a|a A1 SA1|A1 S|

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

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

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

SaSbSaS|aSaSbS|bSaSaS| 4

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) 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

Q98. A SA1 A| A B1||A1 |B1 AaAb|ab A1a | a A1 B1b | b B1

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

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

SaSbSaS|aSaSbS|bSaSaS| 4

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

Answer: (i) (ii) (iii) (iv) Q99. 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

The

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

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

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

The language 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

Q100. A SaSa|bSb|cSc|dSd

The language generated is ambiguous and is the set of all strings over{a,b} with twice as

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

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

SaSbSaS|aSaSbS|bSaSaS| 4

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) 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

Q101. A SaSa|bSb|cSc|dSd

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

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

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

SaSbSaS|aSaSbS|bSaSaS| 4

palidromes over {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)

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

Q102. A SaSa|bSb|cSc|dSd

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

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

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

SaSbSaS|aSaSbS|bSaSaS| 4

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

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

Q103. A SaSa|bSb|cSc|dSd

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

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

SaSbSaS|aSaSbS|bSaSaS| 4

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

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

Q104. A SaSa|bSb|cSc|dSd

The language generated is ambiguous and is the set of all

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

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

SaSbSaS|aSaSbS|bSaSaS| 4

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

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

Q105. A SaSa|bSb|cSc|dSd

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

The language generated is ambiguous and is the set of all strings over{a,b} with twice as many as as bs. The language

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

SaSbSaS|aSaSbS|bSaSaS| 4

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)

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

Q106. A SaSa|bSb|cSc|dSd

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

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

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

SaSbSaS|aSaSbS|bSaSaS| 4

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) 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

Q106. A {a^I b^J c^J d^2 e^3I}

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| 4

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 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)

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