Finite automata to regular expression conversion in theory of automata

How we convert the following Finite Automata into Regular expression?

Let’s start drawing the FSA.

FSA in theory of computation

we can see that we can move left or we can move right from start state, so we need to build two R.E and then to combine them.

Left part of FA:

StepStateR.E
1startb
23b*
33a
4end5a*
5end5Moving back by loop
Now, add all the R.E from step 1 to 4 and loop it again and again by step 5.

R.E = step1 + step2+ step3+ step4.

R.E = b b* a a* 

For moving back for getting more and more string we can have kleen star closure as mentioned in step 5.

So, 

R.E = (step1 + step2+ step3+ step4)*

R.E = ( b b* a a*  )*

The right part of FA

StepStateR.E
1starta
22a*
32b
4end4b*
5end4Moving back by loop
Now, add all the R.E from step 1 to 4 and loop it again and again by step 5.

R.E = step1 + step2+ step3+ step4

R.E = a a* b b*

For moving back for getting more and more string we can have kleen star closure as mentioned in step 5.

So, 

R.E = (step1 + step2+ step3+ step4)*

R.E = ( a a* b b* )*

 

Now we combine the left and right R.E by having an option. So the final R.E will be as follows.

R.E = Left part of R.E OR Right part of R.E

R.E = ( b b* a a*  )*  +   ( a a* b b* )*

 

Please Share This Article with Friends
Fazal Rehman Shamil
Welcome to all friends. The reason for our success is only your love for T4Tutorials. Our team is always available to answer your queries regarding any kind of confusions or discussion regarding your study and career matters. For discussion with us please join our facebook group "T4Tutorials.com". The link of the group is mentioned below. Thanks and love to all for connecting with us. We are nothing without you. Love you all.....
https://web.facebook.com/groups/2066136233601097/