Can you place numbers from 1 to 16 on a 4x4 grid, such that the distance between any two consecutive numbers ($a$ and $a+1$) is Manhattan distance 3?

Bonus question: can you also make 1 and 16 be separated by Manhattan distance 3, thus making it a closed tour?

Note that the Manhattan distance between two locations is the distance between their row locations plus the distance between their column locations.

Good luck!

  • 5
    $\begingroup$ If you also demand that the Euclidean distance is not 3, then this is just the classic problem of a Knight's tour on a 4x4 board. $\endgroup$ Commented Oct 2, 2019 at 16:38

4 Answers 4


I think this works.



It can't just be a knight's tour, since they don't exist on 4x4 boards. So I figured I would get to a corner and just knock out all four corners in a row. The rest was trial and error, except in this case I didn't happen to hit any errors.

Oh, I don't think the bonus question was in there when I was solving this. I can take a look later. Here we go:



I just backtracked from the original solution; I had to back up to the 10 and try a couple paths but it was pretty straightforward.

  • $\begingroup$ Great work and very fast! Yep I made sure that it can't be a knight's tour. Let's see if you can find the bonus answer. $\endgroup$ Commented Oct 2, 2019 at 2:39
  • $\begingroup$ Brilliant you got both of them now! $\endgroup$ Commented Oct 2, 2019 at 2:46

My one solutions:

with Manhattan distance 3 & closed loop in 16 & 01

  • 1
    $\begingroup$ Oops, a bit slower with bonus question? :( $\endgroup$
    – Conifers
    Commented Oct 2, 2019 at 2:46
  • $\begingroup$ Correct! Very well done. $\endgroup$ Commented Oct 2, 2019 at 2:47

Another solution, with bonus:

1, 14, 3, 16
4, 7, 10, 13
11, 2, 15, 6
8, 5, 12, 9


I wanted to try to get a 'symmetrical' answer - one where replacing 16 with 1, 15 with 2, etc. and flipping the 4x4 would cause the same solution. This meant I only had to 'solve' half the problem. The only way 1 and 16 AND 8 and 9 (the 'halfway' pair) could be symmetrical was with those four numbers at the four corners. It solved first guess after that.

Edit: Had to fix broken spoiler tags.


A slower solution, but my solution, with bonus.

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.