0

How would I go about proving the following two regular expressions are equal to one another:

( a + b )* a ( a + b )* b( a + b )* = (a + b)* ab(a + b)*

I can "see" why they are equal to one another because the second ( a + b )* is a redundant term as the expression will always have an ab together. But how can I formalize this and show, in general, that this is true ?

Jenna Maiz
  • 255
  • 1
  • 3
  • 8

1 Answers1

4

Convert both regular expressions to a DFA, compute the symmetric difference of the two DFA's using a product construction, and then check whether the result accept the non-empty language. Each of those steps is described here on this site. See also Does this regular expression equal this automata? for a very similar question.

D.W.
  • 159,275
  • 20
  • 227
  • 470