Next Article in Journal
Previous Article in Journal
Previous Article in Special Issue
Algorithms 2011, 4(4), 285-306; doi:10.3390/a4040285
Article

An Algorithm to Compute the Character Access Count Distribution for Pattern Matching Algorithms

1,*  and 2,3,*
Received: 14 October 2011; in revised form: 26 October 2011 / Accepted: 26 October 2011 / Published: 31 October 2011
(This article belongs to the Special Issue Selected Papers from LATA 2010)
View Full-Text   |   Download PDF [521 KB, uploaded 31 October 2011]   |   Browse Figures
Abstract: We propose a framework for the exact probabilistic analysis of window-based pattern matching algorithms, such as Boyer–Moore, Horspool, Backward DAWG Matching, Backward Oracle Matching, and more. In particular, we develop an algorithm that efficiently computes the distribution of a pattern matching algorithm’s running time cost (such as the number of text character accesses) for any given pattern in a random text model. Text models range from simple uniform models to higher-order Markov models or hidden Markov models (HMMs). Furthermore, we provide an algorithm to compute the exact distribution of differences in running time cost of two pattern matching algorithms. Methodologically, we use extensions of finite automata which we call deterministic arithmetic automata (DAAs) and probabilistic arithmetic automata (PAAs) [1]. Given an algorithm, a pattern, and a text model, a PAA is constructed from which the sought distributions can be derived using dynamic programming. To our knowledge, this is the first time that substring- or suffix-based pattern matching algorithms are analyzed exactly by computing the whole distribution of running time cost. Experimentally, we compare Horspool’s algorithm, Backward DAWG Matching, and Backward Oracle Matching on prototypical patterns of short length and provide statistics on the size of minimal DAAs for these computations.
Keywords: pattern matching; analysis of algorithms; finite automaton; minimization; deterministic arithmetic automaton; probabilistic arithmetic automaton pattern matching; analysis of algorithms; finite automaton; minimization; deterministic arithmetic automaton; probabilistic arithmetic automaton
This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Export to BibTeX |
EndNote


MDPI and ACS Style

Marschall, T.; Rahmann, S. An Algorithm to Compute the Character Access Count Distribution for Pattern Matching Algorithms. Algorithms 2011, 4, 285-306.

AMA Style

Marschall T, Rahmann S. An Algorithm to Compute the Character Access Count Distribution for Pattern Matching Algorithms. Algorithms. 2011; 4(4):285-306.

Chicago/Turabian Style

Marschall, Tobias; Rahmann, Sven. 2011. "An Algorithm to Compute the Character Access Count Distribution for Pattern Matching Algorithms." Algorithms 4, no. 4: 285-306.

Algorithms EISSN 1999-4893 Published by MDPI AG, Basel, Switzerland RSS E-Mail Table of Contents Alert