Skip to main content

The Maximum Number of Squares in a Tree

  • Conference paper
Combinatorial Pattern Matching (CPM 2012)

Abstract

We show that the maximum number of different square substrings in unrooted labelled trees behaves much differently than in words. A substring in a tree corresponds (as its value) to a simple path. Let \(\textsf{sq}(n)\) be the maximum number of different square substrings in a tree of size n. We show that asymptotically \(\textsf{sq}(n)\) is strictly between linear and quadratic orders, for some constants c 1,c 2 > 0 we obtain:

$$c_1n^{4/3} \le \textsf{sq}(n) \le c_2n^{4/3}.$$

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Alon, N., Grytczuk, J.: Breaking the rhythm on graphs. Discrete Mathematics 308(8), 1375–1380 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  2. Alon, N., Grytczuk, J., Haluszczak, M., Riordan, O.: Nonrepetitive colorings of graphs. Random Struct. Algorithms 21(3-4), 336–346 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  3. Blanchet-Sadri, F., Mercas, R., Scott, G.: Counting distinct squares in partial words. Acta Cybern. 19(2), 465–477 (2009)

    MathSciNet  MATH  Google Scholar 

  4. Bresar, B., Grytczuk, J., Klavzar, S., Niwczyk, S., Peterin, I.: Nonrepetitive colorings of trees. Discrete Mathematics 307(2), 163–172 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  5. Crochemore, M., Hancart, C., Lecroq, T.: Algorithms on Strings. Cambridge University Press (2007)

    Google Scholar 

  6. Crochemore, M., Rytter, W.: Jewels of Stringology. World Scientific (2003)

    Google Scholar 

  7. Fraenkel, A.S., Simpson, J.: How many squares can a string contain? J. of Combinatorial Theory Series A 82, 112–120 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  8. Grytczuk, J., Przybylo, J., Zhu, X.: Nonrepetitive list colourings of paths. Random Struct. Algorithms 38(1-2), 162–173 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  9. Ilie, L.: A simple proof that a word of length n has at most 2n distinct squares. J. Comb. Theory, Ser. A 112(1), 163–164 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  10. Ilie, L.: A note on the number of squares in a word. Theor. Comput. Sci. 380(3), 373–376 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  11. Lothaire, M.: Combinatorics on Words. Addison-Wesley, Reading (1983)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Crochemore, M. et al. (2012). The Maximum Number of Squares in a Tree. In: Kärkkäinen, J., Stoye, J. (eds) Combinatorial Pattern Matching. CPM 2012. Lecture Notes in Computer Science, vol 7354. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-31265-6_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-31265-6_3

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-31264-9

  • Online ISBN: 978-3-642-31265-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics