Counting Parameterized Border Arrays for a Binary Alphabet

  • Tomohiro I
  • Shunsuke Inenaga
  • Hideo Bannai
  • Masayuki Takeda
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5457)

Abstract

The parameterized pattern matching problem is a kind of pattern matching problem, where a pattern is considered to occur in a text when there exists a renaming bijection on the alphabet with which the pattern can be transformed into a substring of the text. A parameterized border array (p-border array) is an analogue of a border array of a standard string, which is also known as the failure function of the Morris-Pratt pattern matching algorithm. In this paper we present a linear time algorithm to verify if a given integer array is a valid p-border array for a binary alphabet. We also show a linear time algorithm to compute all binary parameterized strings sharing a given p-border array. In addition, we give an algorithm which computes all p-border arrays of length at most n, where n is a a given threshold. This algorithm runs in time linear in the number of output p-border arrays.

Keywords

Rovan 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Baker, B.S.: Parameterized pattern matching: Algorithms and applications. Journal of Computer and System Sciences 52(1), 28–42 (1996)MathSciNetCrossRefMATHGoogle Scholar
  2. 2.
    Baker, B.S.: A program for identifying duplicated code. Computing Science and Statistics 24, 49–57 (1992)Google Scholar
  3. 3.
    Fredriksson, K., Mozgovoy, M.: Efficient parameterized string matching. Information Processing Letters 100(3), 91–96 (2006)MathSciNetCrossRefMATHGoogle Scholar
  4. 4.
    Shibuya, T.: Generalization of a suffix tree for RNA structural pattern matching. Algorithmica 39(1), 1–19 (2004)MathSciNetCrossRefMATHGoogle Scholar
  5. 5.
    Amir, A., Farach, M., Muthukrishnan, S.: Alphabet dependence in parameterized matching. Information Processing Letters 49(3), 111–115 (1994)CrossRefMATHGoogle Scholar
  6. 6.
    Baker, B.S.: Parameterized pattern matching by Boyer-Moore-type algorithms. In: Proc. 6th annual ACM-SIAM Symposium on Discrete Algorithms (SODA 1995), pp. 541–550 (1995)Google Scholar
  7. 7.
    Kosaraju, S.R.: Faster algorithms for the construction of parameterized suffix trees. In: Proc. 36th Annual Symposium on Foundations of Computer Science (FOCS 1995), pp. 631–637 (1995)Google Scholar
  8. 8.
    Hazay, C., Lewenstein, M., Tsur, D.: Two dimensional parameterized matching. In: Apostolico, A., Crochemore, M., Park, K. (eds.) CPM 2005. LNCS, vol. 3537, pp. 266–279. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  9. 9.
    Hazay, C., Lewenstein, M., Sokol, D.: Approximate parameterized matching. ACM Transactions on Algorithms 3(3), Article No. 29 (2007)Google Scholar
  10. 10.
    Apostolico, A., Erdös, P.L., Lewenstein, M.: Parameterized matching with mismatches. Journal of Discrete Algorithms 5(1), 135–140 (2007)MathSciNetCrossRefMATHGoogle Scholar
  11. 11.
    Apostolico, A., Giancarlo, R.: Periodicity and repetitions in parameterized strings. Discrete Applied Mathematics 156(9), 1389–1398 (2008)MathSciNetCrossRefMATHGoogle Scholar
  12. 12.
    Deguchi, S., Higashijima, F., Bannai, H., Inenaga, S., Takeda, M.: Parameterized suffix arrays for binary strings. In: Proc. The Prague Stringology Conference 2008 (PSC 2008), pp. 84–94 (2008)Google Scholar
  13. 13.
    Idury, R.M., Schäffer, A.A.: Multiple matching of parameterized patterns. Theoretical Computer Science 154(2), 203–224 (1996)MathSciNetCrossRefMATHGoogle Scholar
  14. 14.
    Aho, A.V., Corasick, M.J.: Efficient string matching: An aid to bibliographic search. Communications of the ACM 18(6), 333–340 (1975)MathSciNetCrossRefMATHGoogle Scholar
  15. 15.
    Morris, J.H., Pratt, V.R.: A linear pattern-matching algorithm. Technical Report Report 40, University of California, Berkeley (1970)Google Scholar
  16. 16.
    Franek, F., Gao, S., Lu, W., Ryan, P.J., Smyth, W.F., Sun, Y., Yang, L.: Verifying a border array in linear time. J. Combinatorial Math. and Combinatorial Computing 42, 223–236 (2002)MathSciNetMATHGoogle Scholar
  17. 17.
    Duval, J.P., Lecroq, T., Lefevre, A.: Border array on bounded alphabet. Journal of Automata, Languages and Combinatorics 10(1), 51–60 (2005)MathSciNetMATHGoogle Scholar
  18. 18.
    Moore, D., Smyth, W., Miller, D.: Counting distinct strings. Algorithmica 23(1), 1–13 (1999)MathSciNetCrossRefMATHGoogle Scholar
  19. 19.
    Manber, U., Myers, G.: Suffix arrays: a new method for on-line string searches. SIAM J. Computing 22(5), 935–948 (1993)MathSciNetCrossRefMATHGoogle Scholar
  20. 20.
    Blumer, A., Blumer, J., Haussler, D., Ehrenfeucht, A., Chen, M.T., Seiferas, J.: The smallest automaton recognizing the subwords of a text. Theoretical Computer Science 40, 31–55 (1985)MathSciNetCrossRefMATHGoogle Scholar
  21. 21.
    Baeza-Yates, R.A.: Searching subsequences (note). Theoretical Computer Science 78(2), 363–376 (1991)MathSciNetCrossRefMATHGoogle Scholar
  22. 22.
    Duval, J.P., Lefebvre, A.: Words over an ordered alphabet and suffix permutations. Theoretical Informatics and Applications 36, 249–259 (2002)MathSciNetCrossRefMATHGoogle Scholar
  23. 23.
    Bannai, H., Inenaga, S., Shinohara, A., Takeda, M.: Inferring strings from graphs and arrays. In: Rovan, B., Vojtáš, P. (eds.) MFCS 2003. LNCS, vol. 2747, pp. 208–217. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  24. 24.
    Schürmann, K.B., Stoye, J.: Counting suffix arrays and strings. Theoretical Computer Science 395(2-1), 220–234 (2008)MathSciNetCrossRefMATHGoogle Scholar
  25. 25.
    Lyndon, R.C., Schützenberger, M.P.: The equation a M = b N c P in a free group. Michigan Math. J. 9(4), 289–298 (1962)CrossRefMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Tomohiro I
    • 1
  • Shunsuke Inenaga
    • 2
  • Hideo Bannai
    • 1
  • Masayuki Takeda
    • 1
  1. 1.Department of InformaticsKyushu UniversityJapan
  2. 2.Graduate School of Information Science and Electrical EngineeringKyushu UniversityFukuokaJapan

Personalised recommendations