retagged by
428 views

1 Answer

Best answer
3 votes
3 votes
(a) $R_1=(0^*1 + 1^*0)^*0 + 11^*0^*$

Here, $(0^*1+1^*0)$ can generate $1,0 \implies (0^*1+1^*0)^*$ can generate all strings ie it is equivalent to $(0+1)^*$.

$R_1 \equiv (0+1)^*0+ 1^+0^*$

Here, $(0+1)^*0$ covers every string ending with $0$, so we can say every string that belongs to $1^+0^*$ and ends with $0$ is already accounted for. So, we can reduce it to $1^+$.

$R_1 \equiv (0+1)^*0 + 1^+ = R_2$

Therefore, both regular expressions are equivalent in (a).

(b) $((0+1)(0+1))^*$ can generate $1101$ but the other regular expression cannot.

Therefore, both regular expressions are not equivalent in (b).

(c) $(10+001+0^*1^*)^+$ can generate $\epsilon$ but the other regular expression cannot.

Therefore, both regular expressions are not equivalent in (c).

(d) $R_2 = (0+1)^*(\phi^+ +\epsilon) \equiv (0+1)^*$

$R_1 = (00^*1^* + 1^*10^*)^*(\phi ^* + \phi) \equiv (00^*1^*+1^*10^*)^*(\epsilon + \phi)$

Here, $(00^*1^* + 1^*10^*)$ can generate $0,1 \implies (00^*1^*+1^*10^*)^*$ can generate all strings ie it is equivalent to $(0+1)^*$.

$R_1 \equiv (0+1)^*(\epsilon + \phi) \equiv (0+1)^*$

Therefore, both regular expressions are equivalent in (d).
selected by

Related questions

2 votes
2 votes
3 answers
1
SKMAKM asked Jul 14, 2022
513 views
please explain it how to solve such question in examAns: 22
1 votes
1 votes
1 answer
2
SKMAKM asked Sep 24, 2022
360 views
Please Explainans is 8
5 votes
5 votes
2 answers
3
saurabh0709 asked Aug 1, 2023
1,194 views
What will be the output of the following code? _______ #include <stdio.h int main(){ char val=250; int ans; ans= val+ !val + ~val + ++val; printf("%d", ans); return 0; }
2 votes
2 votes
2 answers
4
Psy Duck asked Jun 24, 2023
960 views
Can anyone help in solving the question 105 to 109.I don't have answer key I want to confirm my answer ...i will update my answer in the comments.