Is there a fast way to know whether a language is regular or not?

40 Views Asked by At

Or at least have an idea?

Because I can't see whether a language is regular before I can disprove it by pumping lemma and it takes me like a hour to try to disprove.

2

There are 2 best solutions below

0
On BEST ANSWER

The defining characteristic of finite automata is that their memory is finite. If you can't think of a way of writing a program to recognize the language without keeping an unlimited count or some form of unlimited data structure, the language is probably not regular.

Learn about closure properties, they help in getting a feel. Take a look at the strings, see if selecting a particular one makes it likely that pumping will fail.

There really is no foolproof way to tell for sure. Go with your hunch, if it fails, the work done might be of help to prove the opposite.

0
On

See http://en.wikipedia.org/wiki/Myhill-Nerode_theorem for an if-and-only-if condition for determining whether a language is regular. It's not always as easy to use as the pumping lemma, but it is an if-and-only-if condition for a language to be regular so in theory the theorem will always determine whether a language is regular or not.