Alphabets, Strings and Languages | ||
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. 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. |
||