An alphabet is a collection of symbols that are used to form strings. An alphabet may possess an underlying order of its symbols, in which case it may be encoded as a permutation. For example, the English alphabet may be represented by the permutation $(\textrm{A}, \textrm{B}, \ldots, \textrm{Z})$.

In other alphabets, like the alphabet {A, C, G, T} from which DNA strings are constructed, symbols are not ordered. We will model such an alphabet with a set.