|
This article is about definition of a substring. For the computer function which performs this operation, see String functions (programming).
A subsequence, substring, prefix or suffix of a string is a subset of the symbols in a string, where the order of the elements is preserved. In this context, the terms string and sequence have the same meaning.
Subsequence
A subsequence of a string Example: The string banana || || an na SubstringA substring (or factor) of a string Example: The string banana ||||| ana|| ||| ana In the mathematical literature, substrings are also called subwords (in America) or factors (in Europe). PrefixA prefix of a string Example: The string banana ||| ban The square subset symbol is sometimes used to indicate a prefix, so that In formal language theory, the term prefix of a string is also commonly understood to be the set of all prefixes of a string, with respect to that language. See the article on string functions (mathematics) for more details. SuffixA suffix of a string Example: The string banana |||| nana SuperstringDefinition: Given a set of k strings P = {s1,s2,s3,---sk}, a superstring of the set P is single string that contains every string in P as a substring. For example, a concatenation of the strings of P in any order gives a trivial superstring of P. For a more interesting example, let P = {abcc, efab, bccla}. Then bcclabccefab is a superstring of P, and efabccla is another, shorter superstring of P. Generally, we are interested in finding superstrings whose length is small. References
|
This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License.
Mercedes Car
This site monitored by SitePinger.net