(b+a(b+aa)*ab)(ab*a)*b)*a(b+aa)*+(b+a(b+aa)*ab)(ab*a)*ab*
where+ indicates alternation (sometimes denoted by|)
Explanation:
XXXXX there's more than one XXXXX XXXXX, the first thing XX're XXXXX XX do XX XX replace XXX final XXXXXX with a XXXXXX final state, using epsilon XXXXXXXXXXX.
Images Not Shown
XXXX XXX on, XX'll XXXXXX this XXX XX a XXXX of XXX, XXXXXX XX'll allow XXX edges to XX XXXXXXX XX XXXXXXX XXXXXXXXXXX.
One by XXX, XX can XXXXXX the XXXXXXXX states, XX inserting XXXXX XXXXXXXXXXX XX XXXXXXX for XXX the paths that could have come XXXX some XXXXX XXXXX, used XXX XXXX-XXXXXXXXXX XXXX or XXXX XXXXX (XX XXXXX is XXX), and gone to XXXX XXXXX XXXXX. XXXX all XXX nonfinal XXXXXX have XXXX eliminated, XX'll XXXX it very XXXX XX XXXX XXX XXX regular XXXXXXXXXX XXXX's equivalent to XXX FSA.
We'll start by removing state X. XXX only XXXXXXXX XXXXXXXXXX XX from D, XXX XXXXX are XXX outgoing XXXXXXXXXXX, XX X XXX XX D. That XXXXX XXXX XXXXXXXX E XXXXXXX in a XXX XXXX from X to B XXXXXXXXX "ab", XXX a new XXXX-XXXXXXXXXX XXX X XXXX takes "XX". XXXXX X XXXXXXX XXX a XXXX-XXXXXXXXXX "b", XX just add to XXXX XXX, XXX make it "b+XX", where + XX XXX XXXXXXX expression XX.
Images Not Shown
XX'll XXXXXXXXX states X and X next. XXXX XXX one XXXXXXXX XXXXXXXXXX XXX XXX outgoing transitions. XXXX we XXXXXX XXX XXXXX, XXX these XXXXX XXXX be XXXXXXXXX. Eliminating C creates a XXX path ab* XXXX X to X, and ab*a XXXX B to itself. XXXXXXXXXXX X XXXXXX a XXX path a(b+aa)* from A XX F, XXX a(b+aa)*ab from A XX X, XXXXX will XXXXXXX XXXX the A→X transition XXXX XXXXXXX XXXXXX. Though XXX expressions are getting more complex, the idea is XXX same. Any XXXX XXXXXXX the XXXXXXXXXX state goes into it, makes zero or XXXX XXXX-transitions, XXX XXXX XXXX out of it.
Images Not Shown
XXX we'll eliminate state B, which XXXX XXXXXX a self-XXXXXXXXXX at A, XXX add to the existing A→F XXXXXXXXXX.
Images Not Shown
Now it's clear XXXX the strings that are XXXXXXXX are XXX XXXX consisting of XXXX or XXXX XXXXXXXXXXX of
(b+a(b+XX)*ab)(ab*a)*b
followed XX
a(b+aa)*+(b+a(b+XX)*ab)(ab*a)*ab*
XXXXX XXX XX expressed in one XXX regular expression XX
((b+a(b+XX)*ab)(ab*a)*b)*a(b+aa)*+(b+a(b+aa)*ab)(ab*a)*ab*
">