[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/1523103.1523106acmconferencesArticle/Chapter ViewAbstractPublication Pagesicac3Conference Proceedingsconference-collections
research-article

Multi-patterns parameterized shift-and string matching algorithm with super alphabets

Published: 23 January 2009 Publication History

Abstract

In the parameterized string matching, a given pattern P is said to match with a sub-string 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 in software maintenance where it is required to find 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 only. In this paper, we extend single pattern exact shift-and string matching algorithm to find all parameterized occurrences of multiple patterns P0, P1, P2 …Pr-1, (r≥1), each of equal size m, in the text T. The set of r multiple patterns is being handled by using the concept of classes of characters. The new algorithm is named as multi-pattern parameterized shift-and (MPSA) string matching algorithm. We further extend MPSA by using the concept of super alphabets. Implementation results show that by using a super alphabet of size s, the algorithm (MPSA) is speeded-up by a factor of s, where s is the size of the super alphabet (i.e. s is the number of characters processed simultaneously). By using multi-pattern parameterized string matching, the search time is lesser than individual pattern searching in the text. We also show the performance of super alphabet MPSA with respect to duplicity present in the code. However these algorithms are applicable only when pattern length (m) is less than or equal to word length (w) of computer used (i.e. m≤w).

References

[1]
A. Amir, M. Farach, and S. Muthukrishnan, "Alphabet dependence in parameterized matching", Information Processing Letter 49(3), pp. 111--115, 1994.
[2]
A. V. Aho, and M. J. Corasick, "Efficient String Matching: An aid to bibliographic search", Communication of ACM 18(6), pp. 333--340, 1975.
[3]
B. S. Baker, "Parameterized pattern matching by Boyer-Moore type algorithms", In proceedings of the 6th ACM-SIAM Annual Symposium on Discrete Algorithms, San Francisco, CA, pp. 541--550, 1995.
[4]
B. S. Baker, "Parameterized duplication in string: algorithm and application in software maintenance", SIAM J. Computing, 26(5), pp. 1343--1362, 1997.
[5]
G. Navarro, and Mathieu Raffinot, "Fast and Flexible String Matching by Combining Bit-parallelism and Suffix automata", ACM Journal of Experimental Algorithms, 5(4), 2000.
[6]
Kimmo Fredriksson, "Shift-or string matching with super alphabets", In Information Processing Letters (IPL), 87(4), pp. 201--204, 2003.
[7]
Kimmo Fredriksson, and Maxim Mozgovoy, "Efficient parametrized string matching", In Information Processing Letters (IPL), 100(3), pp. 91--96, 2006.
[8]
Leena Salmela, Jorma Tarhio, and Jari Kytojoki, "Multi-pattern String Matching with q-grams: To appear in ACM Journal of Experimental Algorithm"
[9]
R. A. Baeza-Yates, and G. H. Gonnet, "A new approach to text searching", Communication of ACM, 35(10), pp. 74--82, 1992.
[10]
R. Prasad and S. Agarwal, "Optimal Shift-or string matching algorithm for multiple patterns" In Proceedings of International Conference on Computer Science and Applications (WCECS-07), San Francisco, USA, October 24--26, 2007, pp. 263--266.
[11]
R. Prasad and S. Agarwal, "Parameterized Shift-And String Matching Algorithm using Super Alphabet" Accepted for publication in International Conference on Computer and Communication (available on IEEE Xplore), Kuala Lumpur Malaysia, pp. 937--942, May 13--15, 2008.
[12]
R. Prasad and S. Agarwal, "A New Parameterized String Matching Algorithm by Combining Bit-Parallelism and Suffix Automata" Accepted for publication in the IEEE 8th International Conference on Computer and Information Technology (available on IEEE Xplore), Sydney, Australia, pp. 778--783, July 8--11, 2008.
[13]
R. S. Boyer, and J. S. Moore, "A fast string-searching algorithm", Communication of ACM, 20(10), pp. 762--772, 1977.

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
ICAC3 '09: Proceedings of the International Conference on Advances in Computing, Communication and Control
January 2009
707 pages
ISBN:9781605583518
DOI:10.1145/1523103
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 23 January 2009

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. finite automata
  2. parameterized matching
  3. prev-encoding
  4. shift-or
  5. string matching

Qualifiers

  • Research-article

Conference

ICAC3 '09
Sponsor:

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 284
    Total Downloads
  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 31 Jan 2025

Other Metrics

Citations

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media