Determine if a language is regular from the first sight Is there a way to guess if a language is regular from the first sight? I.e. in order to choose proof methods, I have to have some hypothesis at first. Do you know any hints/patterns?
I need this to reduce time consumption: for instance, in order not to spend time on pumping lemma/Myhill–Nerode theorem, when in fact the language IS regular and I need to construct DFA/grammar.
The language is expressed as a set of all its words possible. For example:
$$
 L = \left\{ {(0)^{2n}(10)^{3k+1}1^m }, n, k, m ≥ 0 \right\}, \Sigma = \left\{{0,1}\right\}
$$
 A: Imagine that you’re reading a word one symbol at a time. How much do you have to remember as you go along in order to decide whether the word is in the language? Is that amount bounded, or can it be arbitrarily large (as with the language of words of the form $0^n1^n$, for instance). If it’s bounded, you have a regular language. If it appears not to be bounded, you probably don’t have a regular language, though the impression that it’s unbounded may of course have been wrong.
A: One simple criterion that works in many cases is that if you see only linear functions in the exponents (like $2n$, $3k+1$, $m$ in your formula), and no variable appears more than once in the exponents, then the language is regular.  This is because a language like $\{ 0^{2n} : n \ge 0\}$ corresponds to the regular expression $(00)^*$.  A rigorous proof of this rule (which also needs to be stated more precisely before it can be proved) uses closure properties of regular languages, which you should also know.
A: Easiest Round-off Trick:

*

*Look at the exponents of the different alphabets. Is there any relation between the different exponents?

*

*No. The language is regular and context-free. eg: L= $a^m b^n$ with $m,n \geq 0$.

*Yes, one. For instance, $L=a^m b^n$, with a relation like $m>n$, $m \neq n$, or $m<n$. These languages are not regular, but are context-free and accepted by a PDA. For a language with the relation $m=n$, you would need one counter to keep a count, inrementing it by $1$ for n-times for a and compare with b by decrementing by $1$ for n-times, until you get a $0$ for a match.

*Yes, multiple. These languages are not regular and not context-free but they are context-sensitive and thus recursive. Note that not all recursive languages are context-sensitive. If you have more than one relation or need more than one counter, for instance, $L= a^m b^n c^k$ with $m=n=k$, you would need 2 such counters. First, you would count all a's and copy this count value to another counter. Then, compare with b by decrementing it n-times to get a $0$. Again, decrementing the other counter n-times to compare it with c and accept the language if both the counters are $0$.



A: The rules of a regular grammar are in the form :-
For Right regular form:-   For Left regular form:-            
(Terminal)->epsilon or (non-terminal)        |  (Terminal)->epsilon or (non-terminal) 

(Terminal)->(non-terminal)(Terminal)         |  (Terminal)->(Terminal)(non-terminal) 


A->phi                       |  A->phi
A->aA'|aA                    |  A->A'a|Aa
A'->a                        |  A->a

