2

I'm given the following language:

L = {w∈{0,1}* | w ends in 010 and contains 011}

The task is to find a regular expression R that describes this language and prove L = L(R).

I have found the regular expression : ^([011])[01]*010$.

But have no idea how to prove L=L(R)?

Raphael
  • 73,212
  • 30
  • 182
  • 400
ctotolin
  • 29
  • 1

1 Answers1

1

In the expression you propose it seems you require the string to start with 011 rather than have it as an arbitrary substring.

So in my dialect of RegEx the expression would be (0+1)*011(0+1)*010. By definition that would specify all strings of the form $u 011 v 010$ where $u,v$ are arbitrary. This means all those strings have 011 as subword and end in 010.

We also have to explain the converse. That every string with that subword and suffix is covered by the expression. For that it suffices to note that 011 and 010 cannot overlap. So, 010 must come before 011. Which means it is of the form $u 011 v 010$.

Hendrik Jan
  • 31,459
  • 1
  • 54
  • 109