UGC-NET | UGC NET CS 2014 Dec – III | Question 23

Given two languages:
L1 = {(ab) n ak | n > k, k ≥ 0}
L2 = {an bm| n ≠ m}
Using pumping lemma for regular language, it can be shown that
(A) L1 is regular and L2 is not regular.
(B) L1 is not regular and L2 is regular.
(C) L1 is regular and L2 is regular.
(D) L1 is not regular and L2 is not regular.


Answer: (D)

Explanation: Given language L1 = {(ab) n ak | n > k, k ≥ 0} here there is comparison between n and k i.e. n should be greater than k so we need stack to perform any push and pop operation it can solve by PDA and as we know that comparison is not allowed in finite automata.
So it not regular language.

Similarly language L2 = {an bm| n ≠ m} here we need compare between n and m that is m should not be equal to n so again we need here a stack to solve this PDA.
And here is also comparison between n and m so it is not regular language.

Option (D) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up

Improved By : vivekkumarmth0077

Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.