Abstract

We present the FQS (faster quick search) algorithm, an improved variation of the quick search algorithm. The quick search (QS) exact pattern matching algorithm and its variants are among the fastest practical matching algorithms today. The FQS algorithm computes a statistically expected shift value, which allows maximal shifts and a smaller number of comparisons between the pattern and the text. Compared to the state-of-the-art QS variants of exact pattern matching algorithms, the proposed FQS algorithm is the fastest when lΣl ≤ 128, where lΣl is the alphabet size. FQS also has a competitive running time when lΣl > 128. Running on three practical text files, E. coli (lΣl = 4), Bible (lΣl = 63) and World192 (lΣl = 94), FQS resulted in the best performance in practice. Our FQS algorithm will have important applications in the domain of genomic database searching, involving DNA or RNA sequence databases with four symbols Σ = {A, C, G, T(/U)} or protein databases with lΣl = 20.

Highlights

  • Given a text T = T [0, ..., n − 1] of length n and a pattern P = P [0, ..., m − 1] of length m over an alphabet, Σ, the exact string matching problem is to find all occurrences of pattern P in the text, T .In general, n ≥ m

  • We introduce faster quick search (FQS), an improved algorithm based on the QS exact pattern matching algorithm

  • We conducted a number of experiments to compare the FQS algorithm with other state-of-the-art

Read more

Summary

Introduction

It compares the strings from right to left of the pattern These algorithms need an O(|Σ| + m) time for preprocessing the pattern, and search in. Bitwise parallelism is the basis of some recent improved algorithms for exact pattern matching. Some algorithms used both forward and backward comparisons at the same time, for example, quick search by Sunday, and its variants, the Franek–Jennings–Smyth (FJS) algorithm [13] and the Horspool algorithm [14]. The QS algorithm and its variants remain among the fastest practical exact pattern matching algorithms to date [9]. We introduce faster quick search (FQS), an improved algorithm based on the QS exact pattern matching algorithm.

Boyer–Moore Algorithm and Its Variants
Quick Search Algorithm
Variants of the QS Algorithm
The FQS Algorithm
Preprocessing Phase
Computing the ES array
Search Phase
Correctness Analysis
Complexity Analysis
An Example
Computing the Shift Tables: next and shif t
Searching Pattern P in T
Experimental Results
Randomized Text Files
Practical Text Files
Number of Symbol Comparisons
Statistical Analysis
B Better
Conclusions
Results
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call