- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Explain the relationship between Finite Automata and Regular Expression.

In order to understand the relationship between finite automata (FA) and regular expression (RE), we need to understand these terminologies. Let us begin by understanding what is a regular expression.

## Regular Expression

Regular expression is the language which is used to describe the language and is accepted by finite automata. Regular expressions are the most effective way to represent any language. Let Σ be an alphabet which denotes the input set.

The regular expression over Σ can be defined as follows −

- Φ is a regular expression which denotes the empty set.
- ε is a regular expression and denotes the set { ε} and it is called a null string.
- For each ‘a’ in Σ ‘a’ is a regular expression and denotes the set {a}.
- If r and s regular expressions denoting the language.
- L1 and l2 respectively then,
- r+s is equivalent to L1 U L2 union
- rs is equivalent to L1L2 concatenation
- r* is equivalent to L1* closure

The r* is known as Kleen closure or closure which indicates occurrence of r for an infinite number of times.

Now, let us learn about finite automata.

## Finite Automata

Finite automata is an abstract computing device. It is a mathematical model of a system with discrete inputs, outputs, states and a set of transitions from state to state that occurs on input symbols from the alphabet Σ.

## Formal definition of Finite Automata

Finite automata is defined as a 5-tuples

**M=(Q, Σ, δ,q0,F)**

Where,

- Q: Finite set called states.
- Σ: Finite set called alphabets.
- δ: Q × Σ → Q is the transition function.
- q0 ∈ Q is the start or initial state.
- F: Final or accept state.

Now that we have learnt about these terminologies, let us understand the relation between them.

## Relationship

The relationship between FA and RE is as follows −

The above figure explains that it is easy to convert

- RE to Non-deterministic finite automata (NFA) with epsilon moves.
- NFA with epsilon moves to without epsilon moves.
- NFA without epsilon moves to Deterministic Finite Automata (DFA).
- DFA can be converted easily to RE.

- Related Questions & Answers
- Design finite automata from a given regular expression.
- How to convert Regular expression to Finite Automata?
- How to generate regular expression from finite automata?
- Find out the Regular expression for the given finite automata
- Construct a Finite Automata for the regular expression ((a+b)(a+b))*.
- What is the conversion of a regular expression to finite Automata (NFA)?
- Find the regular expression for the given Finite automata with state elimination method
- What are the regular expressions to finite automata?
- Generate a Regular Expression for a Finite Automata with state elimination method
- Explain Deterministic Finite Automata in TOC.
- Distinguish between Finite Automata and Turing Machine
- How to convert the finite automata into regular expressions?
- Explain Non-Deterministic Finite Automata in TOC.
- Explain the method for constructing Minimum Finite State Automata.
- Explain the Star Height of Regular Expression and Regular Language