Let L ⊆ ∑* where ∑ = {a, b}. Which of the following is true ?

**(A)** L = { x | x has an equal number of *a*‘s and *b*‘s } is regular

**(B)** L = { *a ^{n}b^{n}* | n ≥ 1 } is regular

**(C)**L = { x | x has more

*a*‘s than

*b*‘s } is regular

**(D)**L = {

*a*| m ? 1, n ? 1 } is regular

^{m}b^{n}**Answer:**

**(D)**

**Explanation:**For option (A) :-

L = { x | x has an equal number of

*a*‘s and

*b*‘s } is regular for equal number of a’s and b’s we need s stack for to store the number of a’s and we push all a’s into the stack and pop all b’s for each a’s hence, a cannot be regular language.

For option (B) :-

L = { *a ^{n}b^{n}* | n ≥ 1 } is regular is also not regular , it is same as above language. This language also says that equal number of a’s followed by equal number of b’s so it also need a stack to push all a’s and pop all b’s for each a’s.

For option (C) :-

L= { x | x has more *a*‘s than *b*‘s } is also not regular it is also CFL we need stack here for a should be greater than b.

For option (D) :-

L = {*a ^{m}b^{n}* | m ≥ 1, n ≥ 1 } is regular language because there is no restriction that equal number of a’s and b’s this language only says that a should be followed by b therefore we can draw a DFA for it.

Option (D) is correct.

Quiz of this Question

## Recommended Posts:

- GATE | GATE CS 1996 | Question 41
- GATE | GATE CS 1996 | Question 42
- GATE | GATE CS 1996 | Question 43
- GATE | GATE CS 1996 | Question 44
- GATE | GATE CS 1996 | Question 45
- GATE | GATE CS 1996 | Question 1
- GATE | GATE CS 1996 | Question 2
- GATE | GATE CS 1996 | Question 3
- GATE | GATE CS 1996 | Question 4
- GATE | GATE CS 1996 | Question 5
- GATE | GATE CS 1996 | Question 6
- GATE | GATE CS 1996 | Question 7
- GATE | GATE CS 1996 | Question 8
- GATE | GATE CS 1996 | Question 9
- GATE | GATE CS 1996 | Question 11
- GATE | GATE CS 1996 | Question 12
- GATE | GATE CS 1996 | Question 13
- GATE | GATE CS 1996 | Question 14
- GATE | GATE CS 1996 | Question 15
- GATE | GATE CS 1996 | Question 16