Here we show that the set of strings that represent perfect squares is not regular by using the pumping lemma for regular languages. The "trick" here is to look at the resulting string length and show that it can only be between two consecutive perfect squares, and not equal to either of them.
Easy Theory Website: https://www.easytheory.org
Discord: / discord
If you like this content, please consider subscribing to my channel: / @easytheory
▶SEND ME THEORY QUESTIONS◀
[email protected]
▶ABOUT ME◀
I am a professor of Computer Science, and am passionate about CS theory. I have taught many courses at several different universities, including several sections of undergraduate and graduate theory-level classes.