12
$\begingroup$

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!

$\endgroup$
  • 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$ – Paul Sinclair Oct 2 at 16:38
14
$\begingroup$

I think this works.

solution?

Method:

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:

bonus

Method:

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.

$\endgroup$
  • $\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$ – Dmitry Kamenetsky Oct 2 at 2:39
  • $\begingroup$ Brilliant you got both of them now! $\endgroup$ – Dmitry Kamenetsky Oct 2 at 2:46
8
$\begingroup$

My one solutions:

10,01,08,13
07,14,11,02
04,09,16,05
15,06,03,12
with Manhattan distance 3 & closed loop in 16 & 01

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

Another solution, with bonus:

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

Method:

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.

$\endgroup$
4
$\begingroup$

A slower solution, but my solution, with bonus.

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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