Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Two-way string-matching
Crochemore M., Perrin D. (ed) Journal of the ACM38 (3):650-674,1991.Type:Article
Date Reviewed: Sep 1 1992

The simple string-matching algorithm presented here uses the critical factorization theorem. First, the pattern x is factored into x = x l x r by a critical position l (shown to reduce to the computation of the maximal suffix of x) and the period of the pattern is computed.

The string-matching algorithm itself has two phases. The first phase of the algorithm compares x r with the text, scanning from left to right. If a mismatch is found in this phase, then the pattern is shifted right by l. If no mismatch occurs, then the second phase of the algorithm compares x l with the text, scanning from right to left. If a mismatch occurs, then the pattern is shifted by the period of the pattern. This two-way string-matching algorithm uses linear time and constant space, which compares with the well-known Knuth-Morris-Pratt and Boyer-Moore algorithms.

The paper is well written. The algorithms are described simply, and proofs of termination and correctness are accompanied by many diagrams that help illustrate both how the algorithm works and what the variables in the algorithm represent.

Reviewer:  Violet R. Syrotiuk Review #: CR115924
Bookmark and Share
 
Pattern Matching (F.2.2 ... )
 
Would you recommend this review?
yes
no
Other reviews under "Pattern Matching": Date
Deterministic sampling
Vishkin U. SIAM Journal on Computing 20(1): 22-40, 1991. Type: Article
Jun 1 1992
On the exact complexity of string matching: lower bounds
Galil Z., Giancarlo R. SIAM Journal on Computing 20(6): 1008-1020, 1991. Type: Article
Jan 1 1993
Alphabet independent two dimensional matching
Amir A., Benson G., Farach M.  Theory of computing (, Victoria, British Columbia, Canada, May 4-6, 1992)681992. Type: Proceedings
Jul 1 1993
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy