I understand why L2 is not a regular language. We can use the pumping lemma to prove it
In the case of L2:
assume n = 1 and string = ab
We assume that L2 is regular, so it has "pumping length" property and it can be divided into 3 strings, x = empty string, y = a, z = b
Now we pump y, so after pumping once we get the string: aab. Now trivially the string aab is not present in the language L2
Now let's prove why L1 is regular language:
We cannot use the pumping lemma to prove that a language is regular. To prove that a language is regular we have to build either FA or Regular expression. Right?
But i don't understand why L1 would be regular, like there will be a case where n will be equal to m, which means it resembles the string from L2, and since we know any string of the form L2 is not regular. How could we come to the conclusion that L1 regular?
We def could build a regex for L1: a * b * which means it indeed is regular. But still for some reason i cannot grasp the concept intuitively. Can someone help me please?