- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Find out the Regular expression for the given finite automata
Problem
Construct a regular expression for the given finite automata.
Solution
Step 1 − Let us write down the equation.
q1=q1a+ ε
q1 is the start state and ε will be added as the input a which is coming to q1 from q1.
Hence, we write
State=source state of input * input coming to it
Step 2 − Similarly,
q2=q1b+q2b
q3=q2a
Step 3 − Let us simplify q1 first.
q1=q1a+ ε
we can re-write it as follows−
q1= ε +q1a
Which is similar to R=Q+RP which has a solution as follows−
R=QP*
Step 4 − Assuming R=q1, Q= ε, P=a
We get q1 = ε.a* since ε.R=R
q1=a*
Step 5 − Substituting values of q1 in q2 we get,
q2= q1a+q2b
=a*b+q2b
Step 6 − We compare this equation with R=Q+RP
Assuming R=q2, Q=a*b, P=b
We get, q2=a*b.b* as RR*=R+
We will get q2=a*.b+
Step 7 − From the given finite automata, if we want to find out the regular expression, we normally calculate the equation for the final state.
Since in the given finite automata, q2 is a final state and q2=a*b+
- Related Articles
- Find the regular expression for the given Finite automata with state elimination method
- Design finite automata from a given regular expression.
- Explain the relationship between Finite Automata and Regular Expression.
- Construct a Finite Automata for the regular expression ((a+b)(a+b))*.
- How to convert Regular expression to Finite Automata?
- How to generate regular expression from finite automata?
- 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 are the regular expressions to finite automata?
- Construct the minimum DFA for any given finite automata.
- How to convert the finite automata into regular expressions?
- Construct RE for given finite automata with Arden’s theorem
- Construct the Regular expression for the given languages.
- Explain the method for constructing Minimum Finite State Automata.
- C++ program for Finite Automata algorithm for Pattern Searching
