Subquadratic-Time Algorithms for Abelian Stringology Problems

  • Tomasz Kociumaka
  • Jakub Radoszewski
  • Bartłomiej Wiśniewski
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9582)

Abstract

We propose the first subquadratic-time algorithms to a number of natural problems in abelian pattern matching (also called jumbled pattern matching) for strings over a constant-sized alphabet. Two strings are considered equivalent in this model if the numbers of occurrences of respective symbols in both of them, specified by their so-called Parikh vectors, are the same. We propose the following algorithms for a string of length n:
  • Counting and finding longest/shortest abelian squares in \(O(n^2/\log ^2n)\) time. Abelian squares were first considered by Erdös (1961); Cummings and Smyth (1997) proposed an \(O(n^2)\)-time algorithm for computing them.

  • Computing all shortest (general) abelian periods in \(O(n^2/\sqrt{\log n})\) time. Abelian periods were introduced by Constantinescu and Ilie (2006) and the previous, quadratic-time algorithms for their computation were given by Fici et al. (2011) for a constant-sized alphabet and by Crochemore et al. (2012) for a general alphabet.

  • Finding all abelian covers in \(O(n^2/\log n)\) time. Abelian covers were defined by Matsuda et al. (2014).

  • Computing abelian border array in \(O(n^2/\log ^2n)\) time.

This work can be viewed as a continuation of a recent very active line of research on subquadratic space and time jumbled indexing for binary and constant-sized alphabets (e.g., Moosa and Rahman, 2012). All our algorithms work in linear space.

Keywords

Jumbled pattern matching Jumbled indexing Abelian period Abelian square 

References

  1. 1.
    Amir, A., Chan, T.M., Lewenstein, M., Lewenstein, N.: On hardness of jumbled indexing. In: Esparza, J., Fraigniaud, P., Husfeldt, T., Koutsoupias, E. (eds.) ICALP 2014. LNCS, vol. 8572, pp. 114–125. Springer, Heidelberg (2014)Google Scholar
  2. 2.
    Burcsi, P., Cicalese, F., Fici, G., Lipták, Z.: On table arrangements, scrabble freaks, and jumbled pattern matching. In: Boldi, P., Gargano, L. (eds.) FUN 2010. LNCS, vol. 6099, pp. 89–101. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  3. 3.
    Chan, T.M., Lewenstein, M.: Clustered integer 3SUM via additive combinatorics. In: Servedio, R.A., Rubinfeld, R. (eds.) Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, STOC 2015, Portland, OR, USA, 14–17 June 2015, pp. 31–40. ACM (2015)Google Scholar
  4. 4.
    Cicalese, F., Fici, G., Lipták, Z.: Searching for jumbled patterns in strings. In: Holub, J., Zdárek, J. (eds.) Proceedings of the Prague Stringology Conference 2009, Prague, Czech Republic, 31 August - 2 September 2009, pp. 105–117. Prague Stringology Club, Department of Computer Science and Engineering, Faculty of Electrical Engineering, Czech Technical University in Prague (2009)Google Scholar
  5. 5.
    Constantinescu, S., Ilie, L.: Fine and Wilf’s theorem for abelian periods. Bull. EATCS 89, 167–170 (2006)MathSciNetMATHGoogle Scholar
  6. 6.
    Crochemore, M., Iliopoulos, C.S., Kociumaka, T., Kubica, M., Pachocki, J., Radoszewski, J., Rytter, W., Tyczyński, W., Waleń, T.: A note on efficient computation of all abelian periods in a string. Inf. Process. Lett. 113(3), 74–77 (2013)MathSciNetCrossRefMATHGoogle Scholar
  7. 7.
    Cummings, L.J., Smyth, W.F.: Weak repetitions in strings. J. Comb. Math. Comb. Comput. 24, 33–48 (1997)MathSciNetMATHGoogle Scholar
  8. 8.
    Erdös, P.: Some unsolved problems. Hung. Acad. Sci. Mat. Kutató Intézet Közl 6, 221–254 (1961)MathSciNetMATHGoogle Scholar
  9. 9.
    Fici, G., Lecroq, T., Lefebvre, A., Prieur-Gaston, É.: Computing abelian periods in words. In: Holub, J., Žd’árek, J. (eds.) Proceedings of the Prague Stringology Conference 2011, pp. 184–196. Czech Technical University in Prague, Czech Republic (2011)Google Scholar
  10. 10.
    Fici, G., Lecroq, T., Lefebvre, A., Prieur-Gaston, É., Smyth, W.: Quasi-linear time computation of the abelian periods of a word. In: Holub, J., Žd’árek, J. (eds.) Proceedings of the Prague Stringology Conference 2012, pp. 103–110. Czech Technical University in Prague, Czech Republic (2012)Google Scholar
  11. 11.
    Hermelin, D., Landau, G.M., Rabinovich, Y., Weimann, O.: Binary jumbled pattern matching via all-pairs shortest paths. CoRR, abs/1401.2065 (2014)Google Scholar
  12. 12.
    Kociumaka, T., Radoszewski, J., Rytter, W.: Efficient indexes for jumbled pattern matching with constant-sized alphabet. In: Bodlaender, H.L., Italiano, G.F. (eds.) ESA 2013. LNCS, vol. 8125, pp. 625–636. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  13. 13.
    Kociumaka, T., Radoszewski, J., Rytter, W.: Fast algorithms for abelian periods in words and greatest common divisor queries. In: Portier, N., Wilke, T. (eds.) 30th International Symposium on Theoretical Aspects of Computer Science, STACS 2013, 27 February - 2 March 2013, Kiel, Germany, vol. 20 of LIPIcs, pp. 245–256. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik (2013)Google Scholar
  14. 14.
    Matsuda, S., Inenaga, S., Bannai, H., Takeda, M.: Computing abelian covers and abelian runs. In: Holub, J., Zdárek, J. (eds.) Proceedings of the Prague Stringology Conference 2014. Prague, Czech Republic, 1–3 September 2014, pp. 43–51. Department of Theoretical Computer Science, Faculty of Information Technology, Czech Technical University in Prague (2014)Google Scholar
  15. 15.
    Moosa, T.M., Rahman, M.S.: Indexing permutations for binary strings. Inf. Process. Lett. 110(18–19), 795–798 (2010)MathSciNetCrossRefMATHGoogle Scholar
  16. 16.
    Moosa, T.M., Rahman, M.S.: Sub-quadratic time and linear space data structures for permutation matching in binary strings. J. Discrete Algorithms 10, 5–9 (2012)MathSciNetCrossRefMATHGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  • Tomasz Kociumaka
    • 1
  • Jakub Radoszewski
    • 1
  • Bartłomiej Wiśniewski
    • 1
  1. 1.Faculty of Mathematics, Informatics and MechanicsUniversity of WarsawWarsawPoland

Personalised recommendations