5,246 views
1 1 vote
(r + s)* = r* + s*

why this expression is false?

1 Answer

Best answer
3 3 votes
here value of * indicate the length of string...say *=2 now look at LHS (r+s)^2..

we can write it as (r+s)(r+s)...means from 1st bracket pick r or s and from 2nd one pick r or s ...say form first we have r and form 2nd one we have s .....and there is concatenation in them hence resultant string is "rs"..

coming to RHS we have r* + s* now put *=2 we get

(r)(r) + (s)(s) which is same as "rr+ss"....means no we we can have combination as "rs" or "sr"....only string of "r" or "s "...is possible hence they are not equivalent....
• selected by
Position:
Show:

Related questions

1 1 vote
1 1 answer
80
80 views
GO Classes asked Oct 1
80 views
Consider the following regular expressions over the alphabet$\Sigma=\{a,b\}$.$R_1=a(a\cup b)^*$$R_2=b(a\cup b)^*$If $L(R)$ denotes the language associated with regular ex...
3 3 votes
2 2 answers
299
299 views
GO Classes asked Oct 23, 2025
299 views
Consider the following three regular expressions over the alphabet $\Sigma=\{0,1\}$ :$p=\left(1^* 01^* 0\right)^* 1^*$ $q=\left(0^* 10^* 1\right)^* 0^*$ $r=((0+1)(0+1))^*...
3 3 votes
1 1 answer
322
322 views
GO Classes asked Oct 23, 2025
322 views
Let $\mathrm{p}, \mathrm{q}$, and r be three regular expressions over the alphabet $\Sigma=\{a, b\}$.$p=a(a+b)^* b$ $q=(a+b)^* a b(a+b)^*$ $r=a a^* b b^*$Which of the fol...