**Q. What is Regular Expression?**

**Ans.** A regular expression can be defined as a language or string accepted by a finite automata.

We know that a finite automata consists of five touples {Q, Σ, *δ*, q_{0}, *F*}. Among them a Regular Expression is a string on Σ, i.e. it will consist only with input alphabets.

In short a Regular Expression is written as RE.

**Q. Give some formal recursive definition of Regular Expression**

**Ans.**

(i) Any terminals, i.e. the symbols belong to **Σ** are Regular Expression. Null string**(Λ)** and Null set(Φ) are also Regular Expression.

(ii) If *P* and *Q* are two Regular Expressions then the union of the two Regular Expressions denoted by *P + Q* is also a Regular Expression.

(iii) If *P*

Start Free Trial

No credit card required