Abstract
We investigate the problem of the maximum number of cubic subwords (of the form www) in a given word. We also consider square subwords (of the form ww). The problem of the maximum number of squares in a word is not well understood. Several new results related to this problem are produced in the paper. We consider two simple problems related to the maximum number of subwords which are squares or which are highly repetitive; then we provide a nontrivial estimation for the number of cubes. We show that the maximum number of squares xx such that x is not a primitive word (nonprimitive squares) in a word of length n is exactly \(\left\lfloor \frac{n}{2}\right\rfloor - 1\), and the maximum number of subwords of the form x k, for k ≥ 3, is exactly n − 2. In particular, the maximum number of cubes in a word is not greater than n − 2 either. Using very technical properties of occurrences of cubes, we improve this bound significantly. We show that the maximum number of cubes in a word of length n is between \(\frac{45}{100}\;n\) and \(\frac{4}{5}\;n\).
Supported by grant N206 004 32/0806 of the Polish Ministry of Science and Higher Education.
Access provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
References
Apostolico, A., Preparata, F.P.: Optimal off-line detection of repetitions in a string. Theor. Comput. Sci. 22, 297–315 (1983)
Baturo, P., Piątkowski, M., Rytter, W.: The number of runs in sturmian words. In: Ibarra, O.H., Ravikumar, B. (eds.) CIAA 2008. LNCS, vol. 5148, pp. 252–261. Springer, Heidelberg (2008)
Crochemore, M.: An optimal algorithm for computing the repetitions in a word. Inf. Process. Lett. 12(5), 244–250 (1981)
Crochemore, M., Fazekas, S.Z., Iliopoulos, C.S., Jayasekera, I.: Bounds on powers in strings. In: Ito, M., Toyama, M. (eds.) DLT 2008. LNCS, vol. 5257, pp. 206–215. Springer, Heidelberg (2008)
Crochemore, M., Ilie, L.: Maximal repetitions in strings. J. Comput. Syst. Sci. 74(5), 796–807 (2008)
Crochemore, M., Ilie, L., Tinta, L.: Towards a solution to the “Runs” conjecture. In: Ferragina, P., Landau, G.M. (eds.) CPM 2008. LNCS, vol. 5029, pp. 290–302. Springer, Heidelberg (2008)
Crochemore, M., Rytter, W.: Squares, cubes, and time-space efficient string searching. Algorithmica 13(5), 405–425 (1995)
Crochemore, M., Rytter, W.: Jewels of Stringology. World Scientific, Singapore (2003)
Damanik, D., Lenz, D.: Powers in sturmian sequences. Eur. J. Comb. 24(4), 377–390 (2003)
Fine, N.J., Wilf, H.S.: Uniqueness theorems for periodic functions. Proceedings of the American Mathematical Society 16, 109–114 (1965)
Freankel, A.S., Simpson, J.: How many squares can a string contain? J. of Combinatorial Theory Series A 82, 112–120 (1998)
Giraud, M.: Not so many runs in strings. In: Martín-Vide, C., Otto, F., Fernau, H. (eds.) LATA 2008. LNCS, vol. 5196, pp. 232–239. Springer, Heidelberg (2008)
Ilie, L.: A simple proof that a word of length n has at most 2n distinct squares. J. of Combinatorial Theory Series A 112, 163–164 (2005)
Ilie, L.: A note on the number of squares in a word. Theoretical Computer Science 380, 373–376 (2007)
Iliopoulos, C.S., Moore, D., Smyth, W.F.: A characterization of the squares in a fibonacci string. Theor. Comput. Sci. 172(1-2), 281–291 (1997)
Karhumaki, J.: Combinatorics on words. Notes in pdf
Kolpakov, R.M., Kucherov, G.: Finding maximal repetitions in a word in linear time. In: FOCS, pp. 596–604 (1999)
Kolpakov, R.M., Kucherov, G.: On maximal repetitions in words. In: Ciobanu, G., Păun, G. (eds.) FCT 1999. LNCS, vol. 1684, pp. 374–385. Springer, Heidelberg (1999)
Lothaire, M.: Applied Combinatorics on Words. Cambridge University Press, Cambridge (2005)
Main, M.G.: Detecting leftmost maximal periodicities. Discrete Applied Mathematics 25(1-2), 145–153 (1989)
Main, M.G., Lorentz, R.J.: An o(n log n) algorithm for finding all repetitions in a string. J. Algorithms 5(3), 422–432 (1984)
Puglisi, S.J., Simpson, J., Smyth, W.F.: How many runs can a string contain? Theor. Comput. Sci. 401(1-3), 165–171 (2008)
Rytter, W.: The number of runs in a string: Improved analysis of the linear upper bound. In: Durand, B., Thomas, W. (eds.) STACS 2006. LNCS, vol. 3884, pp. 184–195. Springer, Heidelberg (2006)
Rytter, W.: The number of runs in a string. Inf. Comput. 205(9), 1459–1469 (2007)
Thue, A.: Uber unendliche zeichenreihen. Norske Vid. Selsk. Skr. I Math-Nat. 7, 1–22 (1906)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kubica, M., Radoszewski, J., Rytter, W., Waleń, T. (2009). On the Maximal Number of Cubic Subwords in a String. In: Fiala, J., Kratochvíl, J., Miller, M. (eds) Combinatorial Algorithms. IWOCA 2009. Lecture Notes in Computer Science, vol 5874. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-10217-2_34
Download citation
DOI: https://doi.org/10.1007/978-3-642-10217-2_34
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-10216-5
Online ISBN: 978-3-642-10217-2
eBook Packages: Computer ScienceComputer Science (R0)