GATE | GATE CS Mock 2018 | Question 43

Consider the following languages :

(I) {anbm | n > m ∨ n < m }  
(II) {anbm | n ≥ m ∨ n ≤ m }  
(III) {anbm | n > m ∧ n < m } 
(IV) {anbm | n ≥ m ∧ n ≤ m } 

Which of the following languages are regular?
(A) Only (I) and (IV)
(B) Only (II) and (III)
(C) Only (II), (III) and (IV)
(D) None of the above

Answer: (B)

Explanation: (I) Not regular. It is the same language as {anbm | n ≠ m} which is the complement to {anbm | n = m} which is not regular. Since regularity is closed under complementation, the considered language can not be regular (since it would imply that {anbm | n = m} is regular).
(II) Regular. The language can be described by the regular expression a*b*.
(III) Regular. This language is empty so finite and regular.
(IV) Not regular. Its {anbm | n≥m ∧ n≤m } = {anbm | n = m} which is not regular.

Therefore, option (B) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up

Article Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.