$L = L\bigl((b \cup ab \cup aab)^*(\lambda \cup a \cup aa)\bigr)$ . how does $bbbbbbabaabaa$ belong to L?

89 Views Asked by At

Let $L$ be the language generated by the regular expression $(b \cup ab \cup aab)^*(\lambda \cup a \cup aa)$. how does bbbbbbabaabaa belong to L?

I know $(b \cup ab \cup aab)^*$ can be translated to $bbbbbb$

and $(\lambda \cup a \cup aa)$ can be translated to $aa$

then where does abaab come from? is it from $(b \cup ab \cup aab)^*$? if so, i thought $\cup$ was a "either or" statement, not a "both or all" statement.

so $(b \cup ab \cup aab)$ can be:

$b$ or $ab$ or $aab$. but not $babaab$ or definitely $bbbbbbabaab$.

I'm assuming i'm not fully understanding a minor concept.

Thank you.

1

There are 1 best solutions below

0
On BEST ANSWER

$L$ is generated by the regular expression $(b\cup ab\cup aab)^*(\lambda\cup a\cup aa)$. If $bbbbbbabaabaa\in L$, clearly we must match the final $aa$ with the $aa$ alternative of $\lambda\cup a\cup aa$, so the initial segement $bbbbbbabaab$ must match $(b\cup ab\cup aab)^*$. And it does:

$$bbbbbbabaab=(b)(b)(b)(b)(b)(b)(ab)(aab)\;,\tag{1}$$

where each expression in parentheses matches one of the alternatives of $b\cup ab\cup aab$. Since the star of this permits us to concatenate any finite number of instance of any of these three alternatives, $(1)$ is generated by $(b\cup ab\cup aab)^*$, and $bbbbbbabaabaa$ is generated by the original regular expression.