Abstract
Stepan Holub (Discr. Math., 2009) gave the first polynomial algorithm deciding whether a given word is a nontrivial fixed point of a morphism. His algorithm works in quadratic time for large alphabets. We improve the algorithm to work in linear time. Our improvement starts with a careful choice of a subset of rules used in Holub’s algorithm that is necessary to grant correctness of the algorithm.Afterwards we show how to choose the order of applying the rules that allows to avoid unnecessary operations on sets. We obtain linear time using efficient data structures for implementation of the rules. Holub’s algorithm maintains connected components of a graph corresponding to specially marked positions in a word. This graph is of quadratic size for large alphabet. In our algorithm only a linear number of edges of this conceptual graph is processed.
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
Crochemore, M., Hancart, C., Lecroq, T.: Algorithms on Strings. Cambridge University Press (2007)
Ehrenfeucht, A., Rozenberg, G.: Finding a homomorphism between two words is NP-complete. Inf. Process. Lett. 9(2), 86–88 (1979)
Gabow, H.N., Tarjan, R.E.: A linear-time algorithm for a special case of disjoint set union. In: Proceedings of the 15th Annual ACM Symposium on Theory of Computing (STOC), pp. 246–251 (1983)
Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestors. SIAM J. Comput. 13(2), 338–355 (1984)
Head, T.: Fixed languages and the adult languages of OL schemes. International Journal of Computer Mathematics 10(2), 103–107 (1981)
Head, T., Lando, B.: Fixed and stationary ω-words and ω-languages. In: Rozenberg, G., Salomaa, A. (eds.) The Book of L, pp. 147–156. Springer (1986)
Holub, S.: Algorithm for fixed points of morphisms — visualization, http://www.karlin.mff.cuni.cz/~holub/soubory/Vizual/stranka2.html
Holub, S.: Polynomial-time algorithm for fixed points of nontrivial morphisms. Discrete Mathematics 309(16), 5069–5076 (2009)
Ilie, L., Tinta, L.: Practical Algorithms for the Longest Common Extension Problem. In: Karlgren, J., Tarhio, J., Hyyrö, H. (eds.) SPIRE 2009. LNCS, vol. 5721, pp. 302–309. Springer, Heidelberg (2009)
Matocha, V., Holub, S.: Complexity of testing morphic primitivity. CoRR abs/1207.5690v1 (2012)
Reidenbach, D., Schneider, J.C.: Morphically primitive words. Theor. Comput. Sci. 410(21-23), 2148–2161 (2009), http://dx.doi.org/10.1016/j.tcs.2009.01.020
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
Kociumaka, T., Radoszewski, J., Rytter, W., Waleń, T. (2013). Linear-Time Version of Holub’s Algorithm for Morphic Imprimitivity Testing. In: Dediu, AH., Martín-Vide, C., Truthe, B. (eds) Language and Automata Theory and Applications. LATA 2013. Lecture Notes in Computer Science, vol 7810. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-37064-9_34
Download citation
DOI: https://doi.org/10.1007/978-3-642-37064-9_34
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-37063-2
Online ISBN: 978-3-642-37064-9
eBook Packages: Computer ScienceComputer Science (R0)