The first thing you should try is writing out a few simple strings in each language. If you find one that's in the language of one RE but not the other, you can check to make sure and, if so, you're done. Here's what that looks like for these:
(a)
- (ab)*: e, ab, abab, ababab, ...
- a*b* : e, a, b, aa, ab, bb, ...
guess: a is in L(a*b*) but not (ab)*.
check: (ab)* only generates strings with the same number of a's as b's.
L((ab)*) != L(a*b*)
(b)
- r(rr)*: r, rrr, rrrrr, rrrrrrr, ...
- (rr)*r: r, rrr, rrrrr, rrrrrrr, ...
guess: these look the same.
proof: the first generates all and only strings of r's of odd length.
the second generates all and only strings of r's of odd length.
these languages are the same.
alternatives:
- derive DFAs L and R and show DFAs for L \ R and R \ L accept
the empty language.
(c)
- r+ : r, rr, rrr, rrrr, ...
- r*r: r, rr, rrr, rrrr, ...
guess: these look the same.
proof: the first generates all and only non-empty strings of r's.
the second generates all and only non-empty strings of r's.
these languages are the same.
alternatives:
- derive DFAs L and R and show DFAs for L \ R and R \ L accept
the empty language
Based on the above, the most correct answer would appear to be (d).