State whether the string 010 belongs to the language denoted by each of the following regular expressions

44 Views Asked by At

(a) $(\epsilon + 1)0^{*}1^*0$

Solution that I cant read properly:

$(\epsilon + 1)0^{*}1^*0$

$= (\epsilon + 1)$ [by def of union]

$= 0 \epsilon 0^{*}$ [by def of star]

$1 \epsilon 1^*$

$\epsilon 010 = 010$ [def of concatenation]

I don't get it. Could someone explain this please. For instance I don't get how $(\epsilon + 1)0^* 1^* 0 \in (\epsilon + 1)$


My attempt without the solution was

$(\epsilon + 1)0^{*}1^*0$

$\equiv (\epsilon + 1)(1^{*})0^*0$ [Associativity of Concatenation]

$\equiv 1^{*}0^*0$ [Equivalence rule i.e $((\epsilon + R)R^{*}) \equiv R^{*}$]

$\equiv 0^{*}1^{*}0 \in 010$ [Associativity and equivalence rule]

Would that be right?

1

There are 1 best solutions below

0
On BEST ANSWER

The first solution (that you couldn't read) is wrong, sing all strings have to end in $0$.

What the problem asks is to show that $010$ can be generated by $(\epsilon + 1)0^{*}1^*0 $.

I would do this by stating $\epsilon \in \{\epsilon+1\}$, $0 \in \{0^*\}$, $1 \in \{1^*\}$, and $0 \in \{0\}$, and then concatenating these.