Open In App

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

Like Article
Like
Save
Share
Report

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


Last Updated : 21 May, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads