Does {a} \ {a} give an Ɛ in formal languages and automata?

104 Views Asked by At

I have a language L = {a}, alphabet Σ = {a} and I'm wondering, does the different of the same language give a language with an empty word?

Is it true that {a} \ {a} = {Ɛ}?

If not, how can I "generate" a language with an empty word using the language L and operations like iterations, concatenation and set operations?

2

There are 2 best solutions below

0
On BEST ANSWER

No, the empty language and the language containing only the empty word are two distinct languages, not to be confused.

The language $\{a\} \smallsetminus \{a\} = \emptyset$ is the empty language, which does not contain any word, not even the empty word. It is recognized by a deterministic finite automaton with only $1$ state, which is (starting and) not accepting; reading whatever symbol in the input word stays in such a state.

The language $\{\varepsilon\}$ is not empty because it contains a word, the empty word $\varepsilon$. It is recognized by a deterministic finite automaton with $2$ states $s_0$ and $s_1$; the starting one is $s_0$, which is the only accepting one; reading whatever symbol in the input word sends to (or stays in) $s_1$.

I'm not sure to understand what do you mean by "generating". The language $\{\varepsilon\}$ over any alphabet $\Sigma$ can be generated by... $\{\varepsilon\}$ itself, or equivalently--if you want to complicate a bit the definition--by $(\Sigma^* \smallsetminus \{\varepsilon\})^c$, where $(\cdot)^c$ denotes the complement set. If you use the notation $\Sigma^+$ for the set of non-empty words over $\Sigma$, then $\Sigma^* \smallsetminus \Sigma^+ = \{\varepsilon\}$.

0
On

The language $L \setminus L$ is empty and hence does not contain the empty word.

Your second question is not very precise, but here are a few solutions. Let $1$ be the empty word and let $L = \{a\}$. Then

  1. $L^* \setminus L^+ = \{1\}$,
  2. $L^0 = \{1\}$,
  3. $a^{-1}L = \{1\}$,
  4. $La^{-1} = \{1\}$.