A string over an Alphabet is a finite sequence of symbols in .
Example
If , then includes , which is the empty string (of length zero). We can also have , , .
Note
is not included in any alphabet (unless you explicitly specify it, of course). It is however a string over any alphabet. That is, , but .
is the set of all strings over .
- This set is infinite, because it encompasses strings of all lengths.
- If has number of symbols, then there are number of strings of length .
operations on strings
given strings and , denotes their concatenation.
a string is a prefix of string if there exists a string such that . for example, prefixes of the string include , , , and . similarly, a string is a suffix of string if there exists a string such that .
notice that string can be , the empty string. this means a string of length has possible suffixes and prefixes.
a string is a substring of if there exist strings and such that .
Distinguishable strings
Two strings and are distinguishable with respect to a Language if there exists a string such that only one of and is in .
Example
and
two distinguishable strings are and . if we add, for example, to both strings, will be in , but will not be.
and are indistinguishable, because concatenating either rejects both, or accepts both. for all , is in if and only if is in .
this definition depends on the language , but not any specific Automata for .