A359740 Maximal number of moves needed by a knight to reach every cell from a fixed position on an n X n X n chessboard, or -1 if it is not possible to reach every square.
0, -1, -1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67
Offset: 1
Examples
a(4) = 4, since we can reach any cell of a n X n X n chessboard, from any given starting position, by spending at most 4 knight moves. For a 3 X 3 X 3 chessboard, it is impossible to reach the middle cell starting from any other, so a(3) = -1.
Links
- Michael S. Branicky, Python program computing graph diameter explicitly
- David Hartenstine, Distance and Metric Spaces
- MathOverflow, MathStackExchange discussion concerning chess pieces metrics on k-dimensional boards
- Marco Ripà, Metric spaces in chess and international chess pieces graph diameters, arXiv:2311.00016 [math.HO], 2023. See pp. 11, 14.
- Eric Weisstein's World of Mathematics, Graph Diameter
- Eric Weisstein's World of Mathematics, Knight Graph
Crossrefs
Cf. A232007.
Programs
-
Mathematica
Join[{0, -1, -1}, Range[4, 100]] (* Paolo Xausa, Jan 31 2024 *)
Formula
a(n) = n for n >= 4 (conjectured by author; proved above).
Extensions
a(7)-a(38) using linked program, a(39) and beyond using formula from Michael S. Branicky, Jan 21 2023
Comments