I understand that regular languages are languages which can be computed by Finite Automata however i am having some trouble understanding how one can identify a regular from non-regular.
I know that 0*1*
is regular because the machine just needs to make sure the 0s and 1s are in order
I know that 0^n 1^n
is non regular because the machine needs to keep count to make sure there is an equal number of 0s and 1s
But why is (01)^n
considered regular? Doesn't the machine have to keep track to make sure that there are n
amount of 01
?
How about {0^m 1^n | n>m}
?
What is the general rule for quickly figuring out if something is regular or not in layman terms?