Abstract
A Lyndon word is a primitive string which is lexicographically smallest among cyclic permutations of its characters. Lyndon words are used for constructing bases in free algebras, constructing de Bruijn sequences, finding the lexicographically smallest or largest substring in a string, and succinct suffix-prefix matching of highly periodic strings. In this paper, we extend the concept of the Lyndon word to two dimensions. We introduce the 2D Lyndon word and use it to capture 2D horizontal periodicity of a matrix in which each row is highly periodic, and to efficiently solve 2D horizontal suffix-prefix matching among a set of patterns. This yields a succinct and efficient algorithm for 2D dictionary matching. We present several algorithms that compute the 2D Lyndon word that represents a matrix. The final algorithm achieves linear time complexity even when the least common multiple of the periods of the rows is exponential in the matrix width.
The original version of this chapter was revised: The copyright line was incorrect. This has been corrected. The Erratum to this chapter is available at DOI: 10.1007/978-3-319-02432-5_33
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Amir, A., Benson, G.: Two-dimensional periodicity and its applications. In: ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 440–452 (1992)
Amir, A., Benson, G.: Two-dimensional periodicity in rectangular arrays. SIAM Journal on Computing 27(1), 90–106 (1998)
Amir, A., Benson, G., Farach, M.: An alphabet independent approach to two-dimensional pattern matching. SIAM Journal on Computing 23(2), 313–323 (1994)
Apostolico, A., Crochemore, M.: Fast parallel Lyndon factorization with applications. Mathematical Systems Theory 28(2), 89–108 (1995)
Chemillier, M.: Periodic musical sequences and Lyndon words. Soft Computing 8(9), 611–616 (2004)
Delgrange, O., Rivals, E.: Star: an algorithm to search for tandem approximate repeats. Bioinformatics 20(16), 2812–2820 (2004)
Farhi, B.: Nontrivial lower bounds for the least common multiple of some finite sequences of integers. Journal of Number Theory 125(2), 393–411 (2007)
Fredricksen, H., Maiorana, J.: Necklaces of beads in k colors and k-ary de Bruijn sequences. Discrete Mathematics 23(3), 207–210 (1978)
Gusfield, D., Landau, G.M., Schieber, B.: An efficient algorithm for the all pairs suffix-prefix problem. Information Processing Letters 41(4), 181–185 (1992)
Kedem, Z.M., Landau, G.M., Palem, K.V.: Parallel suffix-prefix-matching algorithm and applications. SIAM Journal on Computing 25(5), 998–1023 (1996)
Knuth, D.E.: The Art of Computer Programming, vol. 2. Addison Wesley (1998)
Koshy, T.: Elementary Number Theory with Applications, 2nd edn. Academic Press (2001)
Lothaire, M.: Applied Combinatorics on Words (Encyclopedia of Mathematics and its Applications). Cambridge University Press, New York (2005)
Lyndon, R.C.: On burnside’s problem. Transactions of the American Mathematical Society 77(2), 212–215 (1954)
Mucha, M.: Lyndon words and short superstrings. In: ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 958–972 (2013)
Neuburger, S., Sokol, D.: Succinct 2D dictionary matching. Algorithmica 65(3), 662–684 (2013)
Ohlebusch, E., Gog, S.: Efficient algorithms for the all-pairs suffix-prefix problem and the all-pairs substring-prefix problem. Information Processing Letters 110(3), 123–128 (2010)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Marcus, S., Sokol, D. (2013). On Two-Dimensional Lyndon Words. In: Kurland, O., Lewenstein, M., Porat, E. (eds) String Processing and Information Retrieval. SPIRE 2013. Lecture Notes in Computer Science, vol 8214. Springer, Cham. https://doi.org/10.1007/978-3-319-02432-5_24
Download citation
DOI: https://doi.org/10.1007/978-3-319-02432-5_24
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-02431-8
Online ISBN: 978-3-319-02432-5
eBook Packages: Computer ScienceComputer Science (R0)