On the existence of Hamiltonian cycles in hypercubes

Gabriele Di Pietro and Marco Ripà
Notes on Number Theory and Discrete Mathematics
Print ISSN 1310–5132, Online ISSN 2367–8275
Volume 32, 2026, Number 1, Pages 198–206
DOI: 10.7546/nntdm.2026.32.1.198-206
Full paper (PDF, 222 Kb)

Details

Authors and affiliations

Gabriele Di Pietro
Independent researcher
Roseto degli Abruzzi, Italy

Marco Ripà
Independent researcher
Rome, Italy

Abstract

Building on the results of our previous work on Euclidean leaper tours, considering all integers k>1 and h>0, we study the existence of Hamiltonian cycles in the vertex set C(2,k):=\{0,1\}^k of the k-dimensional hypercube when the Euclidean distance between consecutive vertices is fixed. Since the distance between two vertices of C(2,k) is \sqrt{h} for some integer h, the problem amounts to determining for which integers k and h there exists a Hamiltonian cycle whose associated Euclidean distance is \sqrt{h}. In this paper, we prove that such cycles exist if and only if h is odd and 1 \leq h \leq k-1. As a result, for all integers a \geq 0, b \geq a with b>0, we provide a necessary and sufficient condition for the existence of closed Euclidean (a,b)-leaper tours on 2 \times 2 \times \cdots \times 2 chessboards, where the associated distance equals \sqrt{a^2+b^2}.

Keywords

  • Hamiltonian cycle
  • Knight’s tour
  • Euclidean distance
  • Hypercube

2020 Mathematics Subject Classification

  • 05C12
  • 05C45
  • 05C38

References

  1. Cancela, H., & Mordecki, E. (2015). On the number of open knight’s tours. arXiv. Available at: https://arxiv.org/abs/1507.03642.
  2. Di Pietro, G., & Ripà, M. (2025). Euclidean tours in fairy chess. Notes on Number Theory and Discrete Mathematics, 31(1), 54–68.
  3. Dickins, A. S. M. (1967). A Guide to Fairy Chess. The Q Press, Richmond, Surrey.
  4. Dvořák, T., & Gregor, P. (2007). Hamiltonian paths with prescribed edges in hypercubes. Discrete Mathematics, 307(16), 1982–1998.
  5. Gray, F. (1947). Pulse Code Communication. Bell Telephone Laboratories, Incorporated, New York. Available at: https://patentimages.storage.googleapis.com/a3/d7/f2/0343f5f2c0cf50/US2632058.pdf
  6. Harary, F., Hayes, J. P., & Wu, H.-J. (1988). A survey of the theory of hypercube graphs. Computers & Mathematics with Applications, 15(4), 277–289.
  7. Hooper, D., & Whyld, K. (1996). Knight’s Tour. Oxford University Press, Oxford, pp. 204.
  8. Ripà, M. (2023). Metric spaces in chess and international chess pieces graph diameters. Recreational Mathematics Magazine, to appear (2026). Available at: https://arxiv.org/abs/2311.00016.
  9. Ripà, M. (2024). Proving the existence of Euclidean knight’s tours on n × n × ⋯ × n chessboards for n < 4. Notes on Number Theory and Discrete Mathematics, 30(1), 20–33.

Manuscript history

  • Received: 1 October 2025
  • Revised: 23 February 2026
  • Accepted: 16 March 2026
  • Online First: 18 March 2026

Copyright information

Ⓒ 2026 by the Authors.
This is an Open Access paper distributed under the terms and conditions of the Creative Commons Attribution 4.0 International License (CC BY 4.0).

Related papers

  1. Di Pietro, G., & Ripà, M. (2025). Euclidean tours in fairy chess. Notes on Number Theory and Discrete Mathematics, 31(1), 54–68.
  2. Ripà, M. (2024). Proving the existence of Euclidean knight’s tours on n × n × ⋯ × n chessboards for n < 4. Notes on Number Theory and Discrete Mathematics, 30(1), 20–33.

Cite this paper

Di Pietro, G., & Ripà, M. (2026). On the existence of Hamiltonian cycles in hypercubes. Notes on Number Theory and Discrete Mathematics, 32(1), 198-206, DOI: 10.7546/nntdm.2026.32.1.198-206.

Comments are closed.