Study of Bit-Parallel Approximate Parameterized String Matching Algorithms

  • Rajesh Prasad
  • Suneeta Agarwal
Part of the Communications in Computer and Information Science book series (CCIS, volume 40)


In the parameterized string matching, a given pattern P is said to match with a substring t of the text T, if there exist a bijection from the symbols of P to the symbols of t. This problem has an important application insoftware maintenance, where we wish to find the equivalency between two sections of codes. Two sections of codes are said to be equivalent, if one can be transformed into the other by renaming identifiers and variables. In the approximate parameterized matching, a given pattern P matches the given substring t of the text T with k ≥ 0 errors, if P can be transformed into t with at most k modifications (insertion, deletion, replacement). In this paper, we extend Myers Bit-Parallel algorithm and Approximate String Matching by using Bit-Parallel NFA (both for approximate matching), for parameterized string matching problem. These extended algorithms are known as PAMA and PABPA respectively. Theoretically, PAMA algorithm is faster than PABPA algorithm. The above algorithms are applicable only when pattern length (m) is less than word length (w) of computer used (i.e. m ≤ w).


Algorithm finite automata bit-parallelism approximate matching Non-deterministic finite automata prev-encoding and parameterized matching 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Baeza-Yates, R.A., Gonnet, G.H.: A new approach to text searching. Communication of ACM 35(10), 74–82 (1992)CrossRefGoogle Scholar
  2. 2.
    Boyer, R.S., Moore, J.S.: A fast string-searching algorithm. Communication of ACM 20(10), 762–772 (1977)CrossRefGoogle Scholar
  3. 3.
    Baeza-Yates, R., Navarro, G.: Faster approximate string matching. Algorithmica 23(2), 127–158 (1999)CrossRefGoogle Scholar
  4. 4.
    Hyyro, H., Navarro, G.: Faster bit-parallel approximate string matching. In: Apostolico, A., Takeda, M. (eds.) CPM 2002. LNCS, vol. 2373, pp. 203–224. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  5. 5.
    Navarro, G.: A guided tour to approximate string matching. ACM Computing Survey 33(1), 31–88 (2001)CrossRefGoogle Scholar
  6. 6.
    Baker, B.S.: Parameterized duplication in string algorithm and application in software maintenance. SIAM J. Computing 26(5), 1343–1362 (1997)CrossRefGoogle Scholar
  7. 7.
    Fredriksson, K., Mozgovoy, M.: Efficient parametrized string matching. Information Processing Letters (IPL) 100(3), 91–96 (2006)CrossRefGoogle Scholar
  8. 8.
    Salmela, L., Tarhio, J.: Fast Parameterized Matching with q-grams. In: Proc. of 7th Combinatorial Pattern Matching (CPM), pp. 354–364 (2006)Google Scholar
  9. 9.
    Apostolico, A., Erdos, P., Lewenstein, M.: Parameterized matching with mismatches. Journal of discrete algorithms (to appear)Google Scholar
  10. 10.
    Baker, B.S.: Parameterized diff. In: Proc. 10th Symposium on Discrete Algorithm (SODA), pp. 854–855 (1999)Google Scholar
  11. 11.
    Myers, G.: A fast bit-vector algorithm for approximate string matching based on dynamic programming. Journal of the ACM 46(3), 395–415 (1999)CrossRefGoogle Scholar
  12. 12.
    Hyyro, H.: Explaining and extending the bit-parallel approximate string matching algorithm of Myers. Tech. Rep. A-2001-10, Department of Computer Science and Information Sciences, University of Tampere, Tampere, Finaland (2001)Google Scholar
  13. 13.
    Wu, S., Manber, U.: Fast text searching allowing errors. Communication of the ACM 35(10), 83–91 (1992)CrossRefGoogle Scholar
  14. 14.
    Sellers, P.: The theory and computation of evolutionary distances: pattern recognition. Journal of Algorithms 1, 359–373 (1980)CrossRefGoogle Scholar
  15. 15.
    Prasad, R., Agarwal, S.: Parameterized shift-and string matching algorithm using super alphabet. In: Proc of the International Conference on Computer and Communication Engineering (available on IEEE Xplore), pp. 937–942 (2008)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Rajesh Prasad
    • 1
  • Suneeta Agarwal
    • 1
  1. 1.Department of Computer Science & EngineeringMotilal Nehru National Institute of TechnologyAllahabadIndia

Personalised recommendations