- 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

# Design finite automata from a given regular expression.

Finite automata (FA) is an abstract computing device. It can be represented in the following −

- Graphical (Transition diagrams)
- Tabular (Transition table)
- Mathematical (Transition function)

The formal definition of FA is that it is a five 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

## Regular expression

The regular expression can be used to describe a sequence of patterns that defines a string. It is used to match character combinations in strings.

The language accepted by some regular expression are referred to as regular language

Now let’s consider **RE 10+(0+11)0***,

Construct finite automata for this regular expression −

### Step 1

Initially consider two states q0 and qf. Also, consider the initial and final states, q0 to qf and the given regular expression 10+(0+11)0*1

### Step 2

Now applying the union operation, q0 on 10 goes to qf and q0 on (0+11)0*1 goes to qf.

### Step 3

Now, divide the expression by applying concatenation i.e. let L1=0, L2=1. Concatenate both and we get L= L1.L2.

Applying this formula on regular expression, so q0 on 1 goes to q1 and q1 on 0 goes to qf. Similarly, q0 on (0+1) goes to q2 and q2 on 0*1 goes to qf.

### Step 4

q0 on 1 goe to q1 and q1 on 0 goes to qf, q0 on (0+1) goes to q2, q2 on 0 goes to q2 itself and on 1 goes to qf.

### Step 5

The final finite automata for the given regular expression is as follows −

- Related Questions & Answers
- How to generate regular expression from finite automata?
- Find out the Regular expression for the given finite automata
- How to convert Regular expression to Finite Automata?
- Explain the relationship between Finite Automata and Regular Expression.
- Find the regular expression for the given Finite automata with state elimination method
- Construct a Finite Automata for the regular expression ((a+b)(a+b))*.
- Generate a Regular Expression for a Finite Automata with state elimination method
- What is the conversion of a regular expression to finite Automata (NFA)?
- What is Finite Automata in Compiler Design?
- What are the regular expressions to finite automata?
- How to convert the finite automata into regular expressions?
- Can we convert a non-deterministic finite automata into a deterministic finite Automata?
- What is finite automata?
- Construct the minimum DFA for any given finite automata.
- Efficient Construction of Finite Automata