English

Fast Average-Case Pattern Matching on Weighted Sequences

Data Structures and Algorithms 2015-12-09 v2

Abstract

A weighted string over an alphabet of size σ\sigma is a string in which a set of letters may occur at each position with respective occurrence probabilities. Weighted strings, also known as position weight matrices or uncertain sequences, naturally arise in many contexts. In this article, we study the problem of weighted string matching with a special focus on average-case analysis. Given a weighted pattern string xx of length mm, a text string yy of length n>mn>m, and a cumulative weight threshold 1/z1/z, defined as the minimal probability of occurrence of factors in a weighted string, we present an algorithm requiring average-case search time o(n)o(n) for pattern matching for weight ratio zm<min{1logz,logσlogz(logm+loglogσ)}\frac{z}{m} < \min\{\frac{1}{\log z},\frac{\log \sigma}{\log z (\log m + \log \log \sigma)}\}. For a pattern string xx of length mm, a weighted text string yy of length n>mn>m, and a cumulative weight threshold 1/z1/z, we present an algorithm requiring average-case search time o(σn)o(\sigma n) for the same weight ratio. The importance of these results lies on the fact that these algorithms work in average-case sublinear search time in the size of the text, and in linear preprocessing time and space in the size of the pattern, for these ratios.

Keywords

Cite

@article{arxiv.1512.01085,
  title  = {Fast Average-Case Pattern Matching on Weighted Sequences},
  author = {Carl Barton and Chang Liu and Solon P. Pissis},
  journal= {arXiv preprint arXiv:1512.01085},
  year   = {2015}
}
R2 v1 2026-06-22T12:00:36.522Z