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.
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.
Copyright © 2021 JogjaFile Inc.
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.