Theory of Automata: Regular Expression
Theory of Automata: Regular Expression
Regular Expression
An important example
Definition:
Two regular expressions are said to be equivalent if they
generate the same language.
Example:
Consider the following regular expressions
r1= (a + b)* (aa + bb)
r2= (a + b)*aa + ( a + b)*bb then
both regular expressions define the language of strings ending
in aa or bb.
Note
Definition:
The language generated by any regular expression is called a
regular language.
It is to be noted that if r1, r2 are regular expressions,
corresponding to the languages L1 and L2 then the languages
generated by r1+ r2, r1r2( or r2r1) and r1*( or r2*) are also regular
languages.
Note
Example:
Consider the language L, defined over Σ={a,b}, of strings of
length 2, starting with a, then
L={aa, ab}, may be expressed by the regular expression aa+ab.
Hence L, by definition, is a regular language.
Note