A unifying look at the Apostolico-Giancarlo string-matching algorithm

نویسندگان

  • Maxime Crochemore
  • Christophe Hancart
  • Thierry Lecroq
چکیده

String matching is the problem of finding all the occurrences of a pattern in a text. We present a new method to compute the combinatorial shift function (“matching shift”) of the well-known Boyer–Moore string matching algorithm. This method implies the computation of the length of the longest suffixes of the pattern ending at each position in this pattern. These values constituted an extra-preprocessing for a variant of the Boyer-Moore algorithm designed by Apostolico and Giancarlo. We give here a new presentation of this algorithm that avoids extra preprocessing together with a tight bound of character comparisons (where is the length of the text).

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Tight Bounds on the Complexity of the Apostolico-Giancarlo Algorithm

The Apostolico-Giancarlo string-matching algorithm is analyzed precisely. We give a tight upper bound of 3 2 n text characters comparisons when searching for a pattern in a text of length n. We exhibit a family of patterns and texts reaching this bound. We also provide a slightly improved version of the algorithm.

متن کامل

Tight bounds on the complexity of theApostolico

The Apostolico-Giancarlo string-matching algorithm is analyzed precisely. We give a tight upper bound of 3 2 n text characters comparisons when searching for a pattern in a text of length n. We exhibit a family of patterns and texts reaching this bound. We also provide a slightly improved version of the algorithm.

متن کامل

Tight bounds on the complexity of the Apostolico - GiancarloalgorithmMaxime

The Apostolico-Giancarlo string-matching algorithm is analyzed precisely. We give a tight upper bound of 3 2 n text character comparisons when searching for a pattern in a text of length n. We exhibit a family of patterns and texts reaching this bound. We also provide a slightly improved version of the algorithm.

متن کامل

The Boyer-Moore-Galil String Searching Strategies Revisited

Based on the Boyer-Moore-Galil approach. a new algorithm is proposed which requires a number of character comparisons bounded by 20, regardless of the Dumber of occurrences of the pattern in the textstring. Preprocessing is only slightly more involved and still requires a time linear in the pattern size.

متن کامل

Optimal Parallel Algorithms for Periods, Palindromes and Squares (Extended Abstract)

of results Optimal concurrent-read concurrent-write parallel algorithms for two problems are presented: Finding all the periods of a string. The period of a string can be computed by previous eecient parallel algorithms only if it is shorter than half of the length of the string. Our new algorithm computes all the periods in optimal O(loglog n) time, even if they are longer. The algorithm can b...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • J. Discrete Algorithms

دوره 1  شماره 

صفحات  -

تاریخ انتشار 2003