FOR FREE YEAR SOLVED

Regular expression for the machine M4

 

 

For this machine, we can calculate regular expression either by left-hand side loop resolve or right and loop resolve but both are equivalent.

 

Regular Expression by left-hand side loop resolve

Note:  If the final state is itself initial state or the final state is on the left-hand side then it is easier to calculate regular expression by left-hand side loop resolve.