3 years ago

Faster Approximate(d) Text-to-Pattern L1 Distance.

Przemysław Uznański

The problem of finding \emph{distance} between \emph{pattern} of length $m$ and \emph{text} of length $n$ is a typical way of generalizing pattern matching to incorporate dissimilarity score. For both Hamming and $L_1$ distances only a super linear upper bound $\widetilde{O}(n\sqrt{m})$ are known, which prompts the question of relaxing the problem: either by asking for $1 \pm \varepsilon$ approximate distance (every distance is reported up to a multiplicative factor), or $k$-approximated distance (distances exceeding $k$ are reported as $\infty$). We focus on $L_1$ distance, for which we show new algorithms achieving complexities respectively $\widetilde{O}(\varepsilon^{-1} n)$ and $\widetilde{O}((m+k\sqrt{m}) \cdot n/m)$. This is a significant improvement upon previous algorithms with runtime $\widetilde{O}(\varepsilon^{-2} n)$ of Lipsky and Porat (Algorithmica 2011) and $\widetilde{O}(n\sqrt{k})$ of Amir, Lipsky, Porat and Umanski (CPM 2005). We also provide a series of reductions, showing that if our upper bound for approximate $L_1$ distance is tight, then so is our upper bound for $k$-approximated $L_1$ distance, and if the latter is tight then so is $k$-approximated Hamming distance upper bound due to the result of Gawrychowski and Uzna\'nski (arXiv 2017).

Publisher URL: http://arxiv.org/abs/1801.09159

DOI: arXiv:1801.09159v1

You might also like
Discover & Discuss Important Research

Keeping up-to-date with research can feel impossible, with papers being published faster than you'll ever be able to read them. That's where Researcher comes in: we're simplifying discovery and making important discussions happen. With over 19,000 sources, including peer-reviewed journals, preprints, blogs, universities, podcasts and Live events across 10 research areas, you'll never miss what's important to you. It's like social media, but better. Oh, and we should mention - it's free.

  • Download from Google Play
  • Download from App Store
  • Download from AppInChina

Researcher displays publicly available abstracts and doesn’t host any full article content. If the content is open access, we will direct clicks from the abstracts to the publisher website and display the PDF copy on our platform. Clicks to view the full text will be directed to the publisher website, where only users with subscriptions or access through their institution are able to view the full article.