The Empty Word and the Empty Language
The empty word is one string of length zero. The empty language is a set containing no strings.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace two membership results
A language containing only the empty word has one member. Testing empty input succeeds there and fails for the empty language. See strings as formal language members.
Check concatenation behavior
Appending the empty word to a string leaves the string unchanged. Concatenating any language with the empty language gives no possible pairs. Cartesian products explain that absence of pairs.[1]
Count words and letters separately
The empty word \(\varepsilon\) has length zero. The language \(\{\varepsilon\}\) contains one word. The empty language has no words. Concatenating any word with \(\varepsilon\) preserves the word, while combining with an empty language offers no word to concatenate. See language concatenation.
Word length: |\varepsilon| = 0
Language cardinality: {ε} has one element
∅ has zero elements
{ab}{ε} = {ab}, whereas {ab}∅ = ∅
Test both cases whenever a rule allows absence
A recognizer for the empty language rejects even empty input. A recognizer for the singleton empty-word language accepts exactly empty input. Compare the two as distinct specifications.