17.1. Strings

An alphabet is a finite, nonempty set. You can choose any such set as an alphabet. By convention, though, we typically use small alphabets of letters and symbols, such as {a, b, c}.

A string over alphabet A is a finite sequence of members of A.

A string can be empty. To make the empty string visible, we write ε.

Strings serve as a universal data type. Almost any kind of data can be written down as a string, including