Q. is not a regular language.
Solutions:
Initially, we always assume that it is regular language and the machine is DFA.
Let n is no. of state at DFA which accepts Language.
Now decompose it by xyz with two conditions.
Here,
Now we are going to check,
This time we check for .
So, we can say,
Also | x | + | y | + | z | < | x | + 2| y | + | z | hence, | y | > 0 (true) or | y | ≥ 1 and | xy | ≤ n satisfy.
Now we can say,
| xy | ≤ n, | y | > 0 or | y | ≥ 1 then we can say | y | ≤ n because | xy | ≤ n.
Then we can say,
Now we can add (n + 1) on left-hand side of then we can say,
Now looks at the given language from language it is clear that every string ω which belongs to the language is a length of (perfect square).
So if then next string here and is perfect square.
But length of string is between and i.e. .
So, it is clear that is not perfect square because between two perfect square no perfect square is possible like here and are both perfect squares so,
Like between 9 and 16 no perfect square is possible.
So, string violating pumping lemma, so, violet pumping lemma and it is not Regular Language.