From ProofWiki
Jump to navigation Jump to search


A string $T$ is a prefix of a string $S$ if and only if $S$ can be formed by concatenating $T$ with another string $T'$:

$S = TT'$

Proper Prefix

A proper prefix of a string $S$ is a prefix of $S$ which does not equal the whole of $S$.

Also known as

A prefix is referred to by some sources as an initial part.


Arbitrary Example

Let $abc$ be a string.

Then the prefixes of $abc$ are:

$\epsilon$, $a$, $ab$ and $abc$

where $\epsilon$ is the null string.

Also see