# Why is {w | no prefix of w starts with b} = {w | the first character of w is a} ∪ {e}?

\begin{align} L &= \{ w \in \{a, b\}^* \mid \text{ no prefix of w starts with b}\} \\ &= \{w \in \{a, b\}^* \mid \text{ the first character of w is a} \} \cup \{e\} \end{align}

Why is it in union with an empty string? If an empty string from $$b$$ can also be a prefix.

The unique prefix of the empty word $$e$$ is $$e$$, and it does not start with $$b$$. Therefore $$e$$ satisfies the condition "no prefix of $$e$$ starts with $$b$$" and hence $$e$$ belongs to $$L$$.
• Take any word $w$. Then $e$ is a prefix of $w$, right? And $e$ does not start with $b$, right? Thus it is not true that every prefix of $w$ starts with $b$, since you just found one prefix, namely $e$, that does not start with $b$. Thus no word $w$ satisfies the condition defining $L_3$ and hence $L_3$ is the empty language. Sep 27 '19 at 16:50