Alphabets and Strings
Σ, s ∈ Σ*, |s|
Before we can talk about languages in the formal sense, we need the alphabet
and the strings.
Definition 7.1.1 (notes p. 118): An alphabet is a finite set. Its
elements are called characters or symbols. An -tuple
is called a string (of length over ).
Definition 7.1.4: The length of string is .
Definition 7.1.2: , which is the unique 0-tuple.
We denote this string by and call it the empty string.
Sets vs strings: as sets, but
as strings. Order matters
for strings, but not for sets.
Concatenation (Definition 7.1.5): for :
We often write or simply for concatenation. Note
and (identity element).
A common shorthand (Definition 7.1.10): means the character repeated
times. So .
Strings are the atoms of formal languages — every program, every formula, every
sentence is a string over some alphabet.