Skip to main content
Log in

A Linear-Time Algorithm for Hamming Distance with Shifts

  • Published:
Theory of Computing Systems Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. 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)

  2. Bookstein, A., Kulyukin, V.A., Raita, T.: Generalized Hamming distance. Inf. Retr. 5(4), 353–375 (2002)

    Article  Google Scholar 

  3. 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)

    Google Scholar 

  4. 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)

    Google Scholar 

  5. Gusfield, D.: Algorithms on Strings, Trees, and Sequences: Computer Science and Computational Biology. Cambridge University Press, Cambridge (1997)

    MATH  Google Scholar 

  6. 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)

    Chapter  Google Scholar 

  7. Toussaint, G.T.: A comparison of rhythmic similarity measures. In: Proceedings of the 5th International Conference on Music Information Retrieval, pp. 242–245 (2004)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Minghui Jiang.

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00224-007-9088-4

Keywords

Navigation