Abstract
The Hamming distance with shifts was introduced by Bookstein et al. as a generalization of the traditional Hamming distance to allow a tunable degree of fuzziness when comparing two binary sequences of the same length. We present a linear-time algorithm for computing this distance. The previous best time bound was quadratic.
Similar content being viewed by others
References
Bookstein, A., Klein, S.T., Raita, T.: Fuzzy Hamming distance: a new dissimilarity measure. In: Proceedings of the 12th Annual Symposium on Combinatorial Pattern Matching (CPM’01), pp. 86–97 (2001)
Bookstein, A., Kulyukin, V.A., Raita, T.: Generalized Hamming distance. Inf. Retr. 5(4), 353–375 (2002)
Bremner, D., Chan, T.M., Demaine, E.D., Erickson, J., Hurtado, F., Iacono, J., Langerman, S., Taslakian, P.: Necklace, convolutions, and X+Y. In: Proceedings of the 14th Annual European Symposium on Algorithms (ESA’06). Lecture Notes in Computer Science, vol. 4168, pp. 160–171. Springer, Berlin (2006)
Fisher, M.J., Patterson, M.S.: String matching and other products. In: Karp, R.M. (ed.) Complexity of Computation, vol. 7, pp. 113–125. SIAM-AMS, Providence (1974)
Gusfield, D.: Algorithms on Strings, Trees, and Sequences: Computer Science and Computational Biology. Cambridge University Press, Cambridge (1997)
Toussaint, G.T.: The geometry of musical rhythm. In: Proceedings of the Japanese Conference on Discrete and Computational Geometry (JCDCG’04). Lecture Notes in Computer Science, vol. 3742, pp. 198–212. Springer, Berlin (2004)
Toussaint, G.T.: A comparison of rhythmic similarity measures. In: Proceedings of the 5th International Conference on Music Information Retrieval, pp. 242–245 (2004)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Jiang, M. A Linear-Time Algorithm for Hamming Distance with Shifts. Theory Comput Syst 44, 349–355 (2009). https://doi.org/10.1007/s00224-007-9088-4
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00224-007-9088-4