In: Computer Science
L = {a r b s | r, s ≥ 0 and s = r 2}. Show that L is not regular using the pumping lemma
In order to achieve this language we need to keep count of how many 'a' do we have then only we can count the number of 'b', but we know that final state machine cannot keep count of anything, so this cannot be designed using final state machines and all languages that cannot be designed using final state machines are said to be non-regular.
LET US PROVE THIS USING PUMPING LEMMA
CONDITIONS MUST BE TRUE TO PROVE REGULAR
2. |Y|>0
Assume that language L is regular
let pumping length = P
let p = 3
therefore string is = aaabbbbbbbbb
let's divide the string into three parts X, Y and Z
(I've divided the string using different colours)
and then we will check whether
or not by considering all ways to divide string into X, Y and Z,
if it will not follow this then due to contradiction, the language
will not be regular.
to check this we are going to assume i =2.
So we have showed that none of these can satisfy all the 3
pumping conditions at the same time
let us consider the third condition
In case 1, |XY| = 2 (i.e length of XY is 2) and p is 3, therefore |XY| < P (CONDITION SATISFIED)
In case 2, |XY| = 9, and p is 3, therefore |XY| > P (CONDITION NOT SATISFIED)
In case 3, |XY| = 6, and p is 3, therefore |XY| > P (CONDITION NOT SATISFIED)
SO LANGUAGE L CANNOT BE PUMPED, AS IT CONTRADICTED OUR ASSUMPTION THAT LANGUAGE L IS REGULAR.
Hence, we have proved that language L is not regular using pumping lemma.