Abstract
We consider the k-difference and k-mismatch problems in the pseudo-realtime model where the text arrives online and the time complexity measure is per arriving character and unamortised. The well-known k-difference/k-mismatch problems are those of finding all alignments of a pattern of length m with a text of length n where the edit/Hamming distance is at most k. Offline, the literature gives efficient solutions in O(nk) and \(O(n \sqrt{k \log k})\) time, respectively. More recently, a pseudo-realtime solution was given for the former in O(k logm) time and the latter in \(O(\sqrt{k \log k}\log m)\) time per arriving text character. Our work improves these complexities to O(k) time for the k-difference problem and \(O(\sqrt{k}\log k + \log m)\) for the k-mismatch problem. In the process of developing the main results, we also give a simple solution with optimal time complexity for performing longest common extension queries in the same pseudo-realtime setting which may be of independent interest.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Abrahamson, K.R.: Generalized string matching. SIAM J. Comput.Ā 16(6), 1039ā1051 (1987)
Amir, A., Lewenstein, M., Porat, E.: Faster algorithms for string matching with k mismatches. In: SODA 2000, pp. 794ā803 (2000)
Clifford, R., Efremenko, K., Porat, B., Porat, E.: A black box for online approximate pattern matching. In: Ferragina, P., Landau, G.M. (eds.) CPM 2008. LNCS, vol.Ā 5029, pp. 143ā151. Springer, Heidelberg (2008)
Clifford, R., Sach, B.: Online approximate matching with non-local distances. In: Kucherov, G., Ukkonen, E. (eds.) CPM 2009. LNCS, vol.Ā 5577, pp. 142ā153. Springer, Heidelberg (2009)
Galil, Z.: String matching in real time. Journal of the ACMĀ 28(1), 134ā149 (1981)
Kosaraju, S.R.: Efficient string matching (1987) (manuscript)
Landau, G.M., Myers, E.W., Schmidt, J.P.: Incremental string comparison. SIAM J. Comput.Ā 27(2), 557ā582 (1998)
Landau, G.M., Vishkin, U.: Fast string matching with k differences. J. Comput. Syst. Sci.Ā 37(1), 63ā78 (1988)
Manber, U., Myers, G.: Suffix arrays: a new method for on-line string searches. In: SODA 1990, pp. 319ā327 (1990)
Porat, E., Porat, B.: Exact and approximate pattern matching in the streaming model. In: FOCS 2009, pp. 315ā323 (2009)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
Ā© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Clifford, R., Sach, B. (2010). Pseudo-realtime Pattern Matching: Closing the Gap. In: Amir, A., Parida, L. (eds) Combinatorial Pattern Matching. CPM 2010. Lecture Notes in Computer Science, vol 6129. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-13509-5_10
Download citation
DOI: https://doi.org/10.1007/978-3-642-13509-5_10
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-13508-8
Online ISBN: 978-3-642-13509-5
eBook Packages: Computer ScienceComputer Science (R0)