You are on page 1of 2

Every regular language can be described by

(i)
Finite Automata (or) by
(ii)
Regular Expression (or) by
(iii)
Regular Grammar
Regular Expressions
A regular expression (re) is defined in the following way.
1.
is a regular expression for the language {}
2.
is a regular expression for the language { }
3.
is a regular expression for the language { } where
4. If r1 and r2 are two regular expressions then
4.1 r1+r2 is a regular expression for the language L(r1+r2)
4.2 r1.r2 is a regular expression for the language L(r1.r2)
4.3 r1* is a regular expression for the language L(r1*)
4.4 (r1) is a regular expression for the language L((r1))
5. Nothing else is regular expression.

Example: L1= {anbm / n,m>=0} represents the strings that contain zero or more number of as followed by
zero or more number of bs . We can represent this language with the regular expression a*b*. So, L 1 is a
regular language.
L2= {anbn / n>=0} represents the strings that contain zero or more number of as followed by
zero or more number of bs. Also, number of as must be equal to number of bs. But, this fact cannot be
represented by any regular expression. So, L2 is not a regular language.

Generally, there are an unlimited number of regular expressions for any given language. We say that the
two regular expressions are equivalent if they denote the same language.

You might also like