What is the regular expression of the language accepted by the following NFA?

131 Views Asked by At

https://www.dropbox.com/s/dyy3m5m5bvhj1rt/NFA1.jpg?dl=0 This is the NFA.

RE = (aa + ab) a* ((ba+bb) a*) * This is the solution i came up with but i'm looking for an optimal solution.

1

There are 1 best solutions below

2
On BEST ANSWER

I don’t know whether it’s optimal in any reasonable sense, but $a(a+b)(a+ba+bb)^*$ works and is a bit more compact.