### Tuesday, December 4, 2012

# Regular Language Examples

Regular Language is a formal language which is accepted by a Finite State Machine (or Finite State Automata).

'or'

Regular Language is a formal language which can be generated by a regular expression.

'or'

Regular Language is a formal language which can be generated by a regular grammar.

Note:-

'or'

Regular Language is a formal language which can be generated by a regular expression.

'or'

Regular Language is a formal language which can be generated by a regular grammar.

Note:-

- The language which is not accepted by Finite Automata is known as non-regular language.
- Every formal language must be regular or non-regular.
- Every finite language is a regular language.
- Every infinite language can be regular or non-regular.
- Every non-regular language is infinite language.

Examples of Regular Language:

1. L = {0

^{n}| n= 2 or n=4}
2. L = {0

^{m}1^{n}| m=2n, m=n= 1, 2, 3}
3. L = {w Є ∑* | w=w

^{R}, |w|=3}
4. L = {a

^{n}| n≥1}
- Even if it is an infinite language it is a regular language because it
does not depend on any conditions.

5. L = {0

^{m}1^{n}| m+n=even no.}
- We can construct the FA for the above

Examples of Non-Regular Language:

1. L = {a

^{m}b^{n}| m = n, m and n ≥ 1}
2. L = {a

^{m}b^{n}| m > n, m and n ≥ 1}
3. L = {a

^{m}b^{n}| m < n, m and n ≥ 1}
4. L = {w Є ∑* | |w|

_{a}=|w|_{b}}
5. L = {w Є ∑* | w= w

^{R}}
6. 5. L = {0

^{m}1^{n}| m.n=even no.}
Subscribe to:
Post Comments (Atom)

## No comments:

## Post a Comment