Skip to main content
Logo image

Section 9.6 Alphabets and words

alphabet
any set can be considered an alphabet
letters
the elements of an alphabet set
word
a finite-length, ordered list of letters
\(\words{\Sigma}\)
the set of words using alphabet set \(\Sigma\)

Remark 9.6.1.

Even if the alphabet set \(\Sigma\) is the usual English-language alphabet, we do not restrict ourselves to actual English-language words — nonsense words are allowed.

Example 9.6.2. English is not a full set of words.

Using \(\Sigma = \EngAlphabet\text{,}\) words
\begin{equation*} \mathrm{math}, \; \mathrm{qwerty}, \; \mathrm{aabbccddijzuuu} \end{equation*}
are examples of elements in \(\words{\Sigma}\text{.}\) So, ignoring punctuation, hyphenation, and capitalization, the English language is a proper subset of \(\words{\Sigma}\text{.}\)

Example 9.6.3. If digits are letters then numbers are words.

Using alphabet \(\Sigma = \{ 0,\, 1,\, 2,\, \dotsc,\, 9 \}\text{,}\) then \(\N \subsetneqq \words{\Sigma}\text{.}\)

Checkpoint 9.6.4.

Why is \(\N \neq \words{\Sigma}\) in Example 9.6.3?
In computing science, a certain set of words is of particular importance.
binary word
a word using alphabet \(\{0,1\}\)
binary string
synonym for binary word

Warning 9.6.5.

Order matters! For example, using the alphabet
\begin{equation*} \Sigma = \EngAlphabet\text{,} \end{equation*}
the words \(\mathrm{ab}\) and \(\mathrm{ba}\) are different words in \(\words{\Sigma}\text{.}\)
length (of a word)
given \(w \in \words{\Sigma}\text{,}\) the length of \(w\) is the number of elements from \(\Sigma\) used to form \(w\text{,}\) counting repetition
\(\length{w}\)
length of the word \(w \in \words{\Sigma}\)

Example 9.6.6.

Using alphabet \(\Sigma = \EngAlphabet\text{,}\) we have
\begin{align*} \length{\mathrm{qwerty}} \amp = 6 \text{,} \amp \length{\mathrm{aabab}} \amp = 5 \text{.} \end{align*}
The concept of length allows us to identify some special subsets and a special element of \(\words{\Sigma}\text{.}\)
\(\words{\Sigma}_n\)
for \(n \in \N\text{,}\) the subset of \(\words{\Sigma}\) consisting of all words of length \(n\)
empty word
given an alphabet \(\Sigma\text{,}\) we always consider \(\words{\Sigma}\) to contain a unique word of length \(0\)
\(\emptyword\)
the empty word