
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
Generate Regular Expression for Finite Automata Using State Elimination Method
Problem
Given a Finite Automata, we need to convert the Finite Automata into equivalent Regular Expression using the State Elimination Method.
Step 1 − Initial state q1 has incoming edge. So, create a new initial state qi.
Step 2 − Final state q2 has outgoing edge. So, create a new final state.
Step 3 − Start eliminating intermediate states one after another.
- If there is path going to 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 state q1 we can draw a direct loop on state q2 having cost
b.c*.a=b.c*.a
Step 4
Now eliminate q2.
After eliminating q2 direct path from state qi to qf having cost.
c*a(d+bc*a) * ε=c*a(d+bc*a)*
Advertisements