Maximal pair
In computer science, a maximal pair is a tuple , such that, given a string of length , , but and . A maximal repeat is a string represented by such tuple. A supermaximal repeat is a maximal repeat never occurring as a proper substring of another maximal repeat. Both maximal pairs, maximal repeats and supermaximal repeats can be found in time using a suffix tree,[1] if there are such structures.
Example
Index | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
Character | x | a | b | c | y | a | b | c | w | a | b | c | y | z |
and are maximal pairs as the referenced substrings do not share identical characters to the left or the right.
is not, as the character y
follows both substrings.
abc
and abcy
are maximal repeats, but only abcy
is a supermaximal repeat.
gollark: I think it's more about the actual construction process.
gollark: I do not.
gollark: Because you shouldn't. Those are different.
gollark: Do you mean octaplex?
gollark: Wait, evil base?
References
- Gusfield, Dan (1999) [1997]. Algorithms on Strings, Trees and Sequences: Computer Science and Computational Biology. USA: Cambridge University Press. p. 143. ISBN 0-521-58519-8.
External links
- Project for the computation of all maximal repeats in one ore more strings in Python, using suffix array.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.