I try to implement the Brzozowski algebraic method using Java, to generate the regular expression of the langage accepted by a given DFA, The expression generated is correct but not simplified.
For example :
E|(E)e(e)|(A|(E)e(A))(A|e|(B)e(A))*(B|(B)e(e))|(B|(E)e(B)|(A|(E)e(A))(A|e|(B)e(A))*(E|(B)e(B)))(B|e|(E)e(B)|(A|(E)e(A))(A|e|(B)e(A))*(E|(B)e(B)))*(E|(E)e(e)|(A|(E)e(A))(A|e|(B)e(A))*(B|(B)e(e)))
(e = epsilon, E = the empty set)
instead of : (A|B)*AB
The "Transitive closure method" returns nearly the same result.
One of the solutions consists of minimizing the automaton, but i think it's too heavy to generate a simplified regular expression.
also, using Java regular expressions methods to simplify a regular expression is not pretty at all :) .
So, it would be nice to try helping me to find a solution.