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

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

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Previous
Next