Computer Science > Data Structures and Algorithms
[Submitted on 23 Nov 2012 (v1), last revised 31 Jul 2013 (this version, v3)]
Title:Approximate pattern matching with k-mismatches in packed text
View PDFAbstract:Given strings $P$ of length $m$ and $T$ of length $n$ over an alphabet of size $\sigma$, the string matching with $k$-mismatches problem is to find the positions of all the substrings in $T$ that are at Hamming distance at most $k$ from $P$. If $T$ can be read only one character at the time the best known bounds are $O(n\sqrt{k\log k})$ and $O(n + n\sqrt{k/w}\log k)$ in the word-RAM model with word length $w$. In the RAM models (including $AC^0$ and word-RAM) it is possible to read up to $\floor{w / \log \sigma}$ characters in constant time if the characters of $T$ are encoded using $\ceil{\log \sigma}$ bits. The only solution for $k$-mismatches in packed text works in $O((n \log\sigma/\log n)\ceil{m \log (k + \log n / \log\sigma) / w} + n^{\varepsilon})$ time, for any $\varepsilon > 0$. We present an algorithm that runs in time $O(\frac{n}{\floor{w/(m\log\sigma)}} (1 + \log \min(k,\sigma) \log m / \log\sigma))$ in the $AC^0$ model if $m=O(w / \log\sigma)$ and $T$ is given packed. We also describe a simpler variant that runs in time $O(\frac{n}{\floor{w/(m\log\sigma)}}\log \min(m, \log w / \log\sigma))$ in the word-RAM model. The algorithms improve the existing bound for $w = \Omega(\log^{1+\epsilon}n)$, for any $\epsilon > 0$. Based on the introduced technique, we present algorithms for several other approximate matching problems.
Submission history
From: Emanuele Giaquinta [view email][v1] Fri, 23 Nov 2012 08:30:45 UTC (20 KB)
[v2] Fri, 4 Jan 2013 12:02:24 UTC (23 KB)
[v3] Wed, 31 Jul 2013 12:45:11 UTC (25 KB)
References & Citations
Bibliographic and Citation Tools
Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)
Code, Data and Media Associated with this Article
alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.