Friday, September 7, 2018

mathematics - Consecutive numbers that are Manhattan distance 3 apart


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!



Answer



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.



No comments:

Post a Comment

classical mechanics - Moment of a force about a given axis (Torque) - Scalar or vectorial?

I am studying Statics and saw that: The moment of a force about a given axis (or Torque) is defined by the equation: $M_X = (\vec r \times \...