- 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

Convert the given finite automata (FA) into regular expression (RE).

There are two popular methods for converting a DFA to its regular expression −

- Arden’s Method
- State elimination method

Let’s consider the state elimination method to convert FA to RE.

The rules for state elimination method are as follows −

The initial state of DFA must not have any incoming edge.

If there is any incoming edge to the initial edge, then create a new initial state having no incoming edge to it.

There must exist only one final state in DFA.

If there exist multiple final states, then convert all the final states into non-final states and create a new single final state.

The final state of DFA must not have any outgoing edge.

If this exists, then create a new final state having no outgoing edge from it.

Eliminate all intermediate states one by one.

Now, apply these rules to convert the FA to RE easily.

The given FA is as follows −

Initial state q1 has an incoming edge so create a new initial state qi.

Final state q2 has an outgoing edge. So, create a new final state qf.

Start eliminating intermediate states

There is a path going from qi to q2 via q1. So, after eliminating q1 we can connect a direct path from qi to q2 having cost.

εc*a=c*a

There is a loop on q2 using state qi. So, after eliminating q1 we put a direct loop to q2 having cost.

b.c*.a=bc*a

After eliminating q1, the FA looks like following −

There is a direct path from qi to qf so, we can directly eliminate q2 having cost −

C*a(d+bc*a)* ε = c*a(d+bc*a)*

Which is our final regular expression for given finite automata.

- Related Questions & Answers
- What are the regular expressions to finite automata?
- How to convert Regular expression to Finite Automata?
- How to generate regular expression from finite automata?
- Explain the relationship between Finite Automata and Regular Expression.
- Find out the Regular expression for the given finite automata
- Design finite automata from a given regular expression.
- How to Convert Perl Compatible Regular Expressions (PCRE) into Lua
- What is finite automata?
- Construct a Finite Automata for the regular expression ((a+b)(a+b))*.
- Find the regular expression for the given Finite automata with state elimination method
- Efficient Construction of Finite Automata
- Generate a Regular Expression for a Finite Automata with state elimination method
- Explain Deterministic Finite Automata in TOC.
- What is Non deterministic finite automata?
- C program to simulate Nondeterministic Finite Automata (NFA)

Advertisements