4
$\begingroup$

You have a 5 by 5 Board as shown.

You start from the S (Center) position.

You can:

1 Move TWO or THREE spaces only

2 You can move Vertically or Horizontally or Diagonally but only in a straight line ( No moves like the Knight in Chess)

3 You must visit all the squares but only ONCE

4 You can jump over (pass thru) any square/s EXCEPT the S (Start) square.

Since the grid is symmetric there will be more than 1 solutions. enter image description here

BTW : You can have multiple variations of this puzzle where you start from different squares. I found starting from the center most interesting. Also more challenging is limiting only to vertical or horizontal moves. That will get special kudos.

$\endgroup$
3
  • $\begingroup$ I presume the 2/3 step movements is horizontal and vertical? And diagonal is 1? $\endgroup$
    – n_plum
    Jun 18, 2017 at 22:27
  • $\begingroup$ Nope diagonal can be 2 or 3 also but in a straight line $\endgroup$
    – DrD
    Jun 18, 2017 at 22:34
  • $\begingroup$ NO ONE STEP MOVE IN ANY DIRECTION $\endgroup$
    – DrD
    Jun 18, 2017 at 22:35

2 Answers 2

14
$\begingroup$

Let's do the "special kudos" version with no diagonal moves. In this case

if we reorder both rows and columns in the order 25314 then the legal moves are exactly the single orthogonal steps, where we consider the grid to wrap around on all edges. The "no crossing the centre" condition forbids the moves 25,14,42 in the middle row and column.

Now

it is easy to find a solution:
enter image description here
and this one happens not even to need any "wraparound" moves.

which corresponds to

the following path through the original grid, starting with A in the middle and proceeding alphabetically to Y. I T B J C N Q O M P H S A K D X U W Y V G R F L E

$\endgroup$
4
  • $\begingroup$ Darn, that's clever. $\endgroup$ Jun 19, 2017 at 2:34
  • $\begingroup$ So, what was your reason for reordering and why did it work? $\endgroup$
    – Forklift
    Jun 19, 2017 at 13:52
  • $\begingroup$ I noticed that (aside from the funny restriction in the middle) everything has exactly two neighbours horizontally and two vertically, which means they have to form either a loop of length 5 or two loops of 2 and 3; it turns out to be the former. $\endgroup$
    – Gareth McCaughan
    Jun 19, 2017 at 14:13
  • $\begingroup$ And you deserve the Special Kudos Gareth $\endgroup$
    – DrD
    Jun 19, 2017 at 20:51
3
$\begingroup$

I randomly encountered this problem and I think I have a simpler solution (for the special kudos version) than Gareth's:

Start by labeling each cell as follows, where the cells with the same label can be stepped over using only size-2 steps: $$\begin{array}{ccccc}A&B&A&B&A\\C&D&C&D&C&\\A&B&A&B&A\\C&D&C&D&C&\\A&B&A&B&A\end{array}$$

Starting from the center cell (which has the label $A$), step over all the cells with the same label before moving on to another. This means to start with these moves... $$\begin{array}{ccccc}\bbox[#ccf]{3}&B&\bbox[#ccf]{4}&B&\bbox[#ccf]{5}\\C&D&C&D&C&\\\bbox[#ccf]{2}&B&\bbox[#ccf]{1}&B&\bbox[#ccf]{6}\\C&D&C&D&C&\\\bbox[#ccf]{9}&B&\bbox[#ccf]{8}&B&\bbox[#ccf]{7}\end{array}$$

Then move to $B$... $$\begin{array}{ccccc}3&\bbox[#ccf]{13}&4&\bbox[#ccf]{12}&5\\C&D&C&D&C&\\2&\bbox[#ccf]{14}&1&\bbox[#ccf]{11}&6\\C&D&C&D&C&\\9&\bbox[#ccf]{15}&8&\bbox[#ccf]{10}&7\end{array}$$

Then move to $D$... $$\begin{array}{ccccc}3&13&4&12&5\\C&\bbox[#ccf]{16}&C&\bbox[#ccf]{17}&C\\2&14&1&11&6\\C&\bbox[#ccf]{19}&C&\bbox[#ccf]{18}&C\\9&15&8&10&7\end{array}$$

Then move to $C$, finishing the puzzle. $$\begin{array}{ccccc}3&13&4&12&5\\\bbox[#ccf]{23}&16&\bbox[#ccf]{22}&17&\bbox[#ccf]{21}\\2&14&1&11&6\\\bbox[#ccf]{24}&19&\bbox[#ccf]{25}&18&\bbox[#ccf]{20}\\9&15&8&10&7\end{array}$$

$\endgroup$
1
  • $\begingroup$ That seems a good way too. $\endgroup$
    – DrD
    Oct 8, 2020 at 10:46

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.