{"@context":"https:\/\/schema.org\/","@type":"ScholarlyArticle","@id":"#article11072","name":"Towards Unified Approximate Pattern Matching for Hamming and L_1 Distance","abstract":"Computing the distance between a given pattern of length n and a text of length m is defined as calculating, for every m-substring of the text, the distance between the pattern and the substring. This naturally generalizes the standard notion of exact pattern matching to incorporate dissimilarity score. For both Hamming and L_{1} distance only relatively slow O~(n sqrt{m}) solutions are known for this generalization. This can be overcome by relaxing the question. For Hamming distance, the usual relaxation is to consider the k-bounded variant, where distances exceeding k are reported as infty, while for L_{1} distance asking for a (1 +\/- epsilon)-approximation seems more natural. For k-bounded Hamming distance, Amir et al. [J. Algorithms 2004] showed an O~(n sqrt{k}) time algorithm, and Clifford et al. [SODA 2016] designed an O~((m+k^{2})* n\/m) time solution. We provide a smooth time trade-off between these bounds by exhibiting an O~((m+k sqrt{m})* n\/m) time algorithm. We complement the trade-off with a matching conditional lower bound, showing that a significantly faster combinatorial algorithm is not possible, unless the combinatorial matrix multiplication conjecture fails. We also exhibit a series of reductions that together allow us to achieve essentially the same complexity for k-bounded L_1 distance. Finally, for (1 +\/- epsilon)-approximate L_1 distance, the running time of the best previously known algorithm of Lipsky and Porat [Algorithmica 2011] was O(epsilon^{-2} n). We improve this to O~(epsilon^{-1}n), thus essentially matching the complexity of the best known algorithm for (1 +\/- epsilon)-approximate Hamming distance.","keywords":["approximate pattern matching","conditional lower bounds","L_1 distance","Hamming distance"],"author":[{"@type":"Person","name":"Gawrychowski, Pawel","givenName":"Pawel","familyName":"Gawrychowski","affiliation":"Institute of Computer Science, University of Wroc\u0142aw, Poland"},{"@type":"Person","name":"Uznanski, Przemyslaw","givenName":"Przemyslaw","familyName":"Uznanski","affiliation":"Department of Computer Science, ETH Z\u00fcrich, Switzerland"}],"position":62,"pageStart":"62:1","pageEnd":"62:13","dateCreated":"2018-07-04","datePublished":"2018-07-04","isAccessibleForFree":true,"license":"https:\/\/creativecommons.org\/licenses\/by\/3.0\/legalcode","copyrightHolder":[{"@type":"Person","name":"Gawrychowski, Pawel","givenName":"Pawel","familyName":"Gawrychowski","affiliation":"Institute of Computer Science, University of Wroc\u0142aw, Poland"},{"@type":"Person","name":"Uznanski, Przemyslaw","givenName":"Przemyslaw","familyName":"Uznanski","affiliation":"Department of Computer Science, ETH Z\u00fcrich, Switzerland"}],"copyrightYear":"2018","accessMode":"textual","accessModeSufficient":"textual","creativeWorkStatus":"Published","inLanguage":"en-US","sameAs":"https:\/\/doi.org\/10.4230\/LIPIcs.ICALP.2018.62","publisher":"Schloss Dagstuhl \u2013 Leibniz-Zentrum f\u00fcr Informatik","citation":["http:\/\/www.cs.bris.ac.uk\/Research\/Algorithms\/events\/BAD09\/BAD09\/Talks\/BAD09-Hammingnotes.pdf","http:\/\/arxiv.org\/abs\/1711.03887"],"isPartOf":{"@type":"PublicationVolume","@id":"#volume6310","volumeNumber":107,"name":"45th International Colloquium on Automata, Languages, and Programming (ICALP 2018)","dateCreated":"2018-07-04","datePublished":"2018-07-04","editor":[{"@type":"Person","name":"Chatzigiannakis, Ioannis","givenName":"Ioannis","familyName":"Chatzigiannakis"},{"@type":"Person","name":"Kaklamanis, Christos","givenName":"Christos","familyName":"Kaklamanis"},{"@type":"Person","name":"Marx, D\u00e1niel","givenName":"D\u00e1niel","familyName":"Marx"},{"@type":"Person","name":"Sannella, Donald","givenName":"Donald","familyName":"Sannella"}],"isAccessibleForFree":true,"publisher":"Schloss Dagstuhl \u2013 Leibniz-Zentrum f\u00fcr Informatik","hasPart":"#article11072","isPartOf":{"@type":"Periodical","@id":"#series116","name":"Leibniz International Proceedings in Informatics","issn":"1868-8969","isAccessibleForFree":true,"publisher":"Schloss Dagstuhl \u2013 Leibniz-Zentrum f\u00fcr Informatik","hasPart":"#volume6310"}}}