I have a question about method that I saw on internet and method that my professor showed me. I have this finite state machine:


My professor using a method


and he start from (1,3,3). He get r(1,3,3)=a*ba*b|(a|b)*, I understand that method but if a finite state machine is more complicated then it takes to much time, so I saw on internet and I saw here a method where I start like this

q1=epsilon+q1a, q1=a*
q2=q1b+q2a, q2=a*ba*
q3=q2b+q3a+q3b, q3=a*ba*b(a+b)*,q3=a*ba*b(a|b)*

Both regular expression look similar but I do not know is that the same? Can you tell me where is difference if difference exist?

  • $\begingroup$ There are several algorithms for checking regular expression equivalence. One of them is to convert the regular expressions to DFAs (via NFAs), compute the symmetric difference automaton, and check whether it accepts the empty language. $\endgroup$ Commented Feb 2, 2019 at 9:46

1 Answer 1


There is a reference question on methods to convert a finite automaton into a regular expression. Personally I am very fond of the "State removal method" which is equivalent to the "Transitive closure method" you seem to be using. The reason is that the administration you do in the state removal seems to be less, and is more easily kept as labels to edges, rather than keeping track of many $R[i,j,k]$ sets.

Nevertheless, basically all methods use the same recursion, and one gets equivalent results. I say equivalent here, because there is no way to uniquely denote regular languages. Even when using the same method, when applying the reductions in a different order one gets a different result. But again, this is always the same language, only written in a different way.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.