Link Search Menu Expand Document

Strings

An alphabet is any finite set, whose members are called symbols (equivalently: letters or characters). We typically use Σ to denote a generic alphabet and a,b,c,d to denote its letters.

A string (equivalently: word) over an alphabet Σ is a finite sequence of characters from Σ. The sequence may be empty, and we write the empty string as ϵ. We typically use u,v,w,x,y,z to denote a generic string.

The set of all strings over the alphabet Σ is written Σ.

We will refer to a set of strings as a language.

The length of a string w, written |w|, is just the number of characters in the string. That is, if x=a1ak then |x|=k.

A string w is said to be a substring of a string v just if w appears consecutively in v.

Given strings x and y, we write xy for the string obtained by concatenating y to the end of x. That is, if x=x1xk and y=y1ym then xy=x1xky1ym.

We write wk for the k-fold concatenation of w with itself, i.e. the word wwwk-times.