Verifying a Parameterized Border Array in O(n1.5) Time

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


The parameterized pattern matching problem is to check if there exists a renaming bijection on the alphabet with which a given pattern can be transformed into a substring of a given text. A parameterized border array (p-border array) is a parameterized version of a standard border array, and we can efficiently solve the parameterized pattern matching problem using p-border arrays. In this paper we present an O(n 1.5)-time O(n)-space algorithm to verify if a given integer array of length n is a valid p-border array for an unbounded alphabet. The best previously known solution takes time proportional to the n-th Bell number \(\frac{1}{e} \sum_{k=0}^{\infty} \frac{k^{n}}{k!}\), and hence our algorithm is quite efficient.


String Match Linear Time Algorithm Pruning Technique Parameterized Match Space Algorithm 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Baker, B.S.: Parameterized pattern matching: Algorithms and applications. Journal of Computer and System Sciences 52(1), 28–42 (1996)zbMATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Amir, A., Farach, M., Muthukrishnan, S.: Alphabet dependence in parameterized matching. Information Processing Letters 49(3), 111–115 (1994)zbMATHCrossRefGoogle Scholar
  3. 3.
    Kosaraju, S.: Faster algorithms for the construction of parameterized suffix trees. In: Proc. FOCS 1995, pp. 631–637 (1995)Google Scholar
  4. 4.
    Hazay, C., Lewenstein, M., Sokol, D.: Approximate parameterized matching. ACM Transactions on Algorithms 3(3), Article No. 29 (2007)Google Scholar
  5. 5.
    Apostolico, A., Erdös, P.L., Lewenstein, M.: Parameterized matching with mismatches. Journal of Discrete Algorithms 5(1), 135–140 (2007)zbMATHCrossRefMathSciNetGoogle Scholar
  6. 6.
    I, T., Deguchi, S., Bannai, H., Inenaga, S., Takeda, M.: Lightweight parameterized suffix array construction. In: Proc. IWOCA, pp. 312–323 (2009)Google Scholar
  7. 7.
    Idury, R.M., Schäffer, A.A.: Multiple matching of parameterized patterns. Theoretical Computer Science 154(2), 203–224 (1996)zbMATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Morris, J.H., Pratt, V.R.: A linear pattern-matching algorithm. Technical Report 40, University of California, Berkeley (1970)Google Scholar
  9. 9.
    I, T., Inenaga, S., Bannai, H., Takeda, M.: Counting parameterized border arrays for a binary alphabet. In: Dediu, A.H., Ionescu, A.M., Martín-Vide, C. (eds.) LATA 2009. LNCS, vol. 5457, pp. 422–433. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  10. 10.
    Franek, F., Gao, S., Lu, W., Ryan, P.J., Smyth, W.F., Sun, Y., Yang, L.: Verifying a border array in linear time. J. Comb. Math. and Comb. Comp. 42, 223–236 (2002)zbMATHMathSciNetGoogle Scholar
  11. 11.
    Duval, J.P., Lecroq, T., Lefevre, A.: Border array on bounded alphabet. Journal of Automata, Languages and Combinatorics 10(1), 51–60 (2005)zbMATHMathSciNetGoogle Scholar
  12. 12.
    Duval, J.P., Lefebvre, A.: Words over an ordered alphabet and suffix permutations. Theoretical Informatics and Applications 36, 249–259 (2002)zbMATHCrossRefMathSciNetGoogle Scholar
  13. 13.
    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)Google Scholar
  14. 14.
    Schürmann, K.B., Stoye, J.: Counting suffix arrays and strings. Theoretical Computer Science 395(2-1), 220–234 (2008)zbMATHCrossRefMathSciNetGoogle Scholar
  15. 15.
    Clément, J., Crochemore, M., Rindone, G.: Reverse engineering prefix tables. In: Proc. STACS 2009, pp. 289–300 (2009)Google Scholar
  16. 16.
    Duval, J.P., Lecroq, T., Lefebvre, A.: Efficient validation and construction of border arrays and validation of string matching automata. RAIRO - Theoretical Informatics and Applications 43(2), 281–297 (2009)zbMATHCrossRefMathSciNetGoogle Scholar
  17. 17.
    Gawrychowski, P., Jez, A., Jez, L.: Validating the Knuth-Morris-Pratt failure function, fast and online. In: Proc. CSR 2010 (to appear 2010)Google Scholar
  18. 18.
    Crochemore, M., Iliopoulos, C., Pissis, S., Tischler, G.: Cover array string reconstruction. In: Proc. CPM 2010 (to appear 2010)Google Scholar
  19. 19.
    Moore, D., Smyth, W., Miller, D.: Counting distinct strings. Algorithmica 23(1), 1–13 (1999)zbMATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

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

Personalised recommendations