Alphabets, Strings and Languages
Print this page
First   |   Last   |   Prev   |   Next
Example :  Consider the string 011 over the binary alphabet. All the prefixes, suffixes and substrings of this string are listed below.

Prefixes: e, 0, 01, 011.
Suffixes: e, 1, 11, 011.
Substrings: e, 0, 1, 01, 11, 011.

Note that x is a prefix (suffix or substring) to x, for any string x and e is a prefix (suffix or substring) to any string.

A string x is a proper prefix (suffix) of string y if x is a prefix (suffix) of y and x ¹ y.

In the above example, all prefixes except 011 are proper prefixes.

First   |   Last   |   Prev   |   Next