Difference between $\phi$ anf $\epsilon$ in regular language.

3.7k Views Asked by At

What is the interpretation of both $\emptyset$ and $\epsilon$ in a regular language?

Do they both mean empty sets?

If so then why is

$\emptyset^*=\epsilon$ , $\emptyset^+=\emptyset$

and $\epsilon^*=\epsilon$, $\epsilon^+=\epsilon$ ?

1

There are 1 best solutions below

5
On BEST ANSWER

The two are not actually same kind of items.

$\epsilon$ is a word while $\emptyset$ is a set of words (a.k.a. a language).

$\{\epsilon\}$ is the language containing only the empty word (i.e. $|\{\epsilon\}|=1$ and it is different from $\emptyset$ which doesn't contain any word ($|\emptyset|=0$).

For a language $L$, $L^*$ stands for the concatenation of 0 or more words from $L$, therefore $$\emptyset^*=\{\epsilon\}$$

$L^+$ on the other hand is the concatenation of 1 or more words from $L$. Since there are no words in $\emptyset$, $\emptyset^+=\emptyset$, while for $\{\epsilon\}$ you could pick the empty word $\{\epsilon\}$ and thus $\{\epsilon\}^+=\{\epsilon\}$.