Determining whether two languages ​​are equal [Regular Expression]

exam preparation and this problem:

Determine if the rowset represented by R1 is a subset of R2?

R1 = (01 +10)*      R2 = ((01)* + (10)*)

My attempt: Since the same expression exists, I tried to prove that they are the same R1 ⊆ R2

I tried to show that R2 matches R1: so I tried this using the regex equivalence theorem:

((01 + ε) * + (10 + ε)) = (01 + ε) + (10 + ε) *

now I'm stuck, I'm thinking of applying the associativity rule here and showing that (01 + ε) * + (10 + ε) * = (01 + 10) * + (ε + ε) * = (01 + 10) * / / I think this step may be wrong

thus R2 = R1

Step: (01 + ε) * + (10 + ε) * = (01 + 10) * + (ε + ε) * = (01 + 10) *

I think it’s wrong, I think that I’m applying the law of associativity incorrectly, I don’t know how to use it when it has it. Any help on this would be greatly appreciated. You are welcome:)

+4
source share
2 answers

I did not make evidence after a while, but I would have thought that simple proof of a counterexample is enough.

Begin by stating that R1 is a subset of R2 (strict or shouldn't matter).

Note that R1 can create the following line (provided that it +means OR, so R1 can produce either 01, or 10in any pattern, endlessly):

10 01

, R2, R2 , 01 10.

, R1 R2, , R1 , , R2.

+1

, R1 ⊆ R2. , s, R1 R2. s = "1001", R1; s R2. = > < =

R1 R2, , , .

+2

All Articles