15
$\begingroup$

You are given a 9x9 grid with a set of 9 pegs (red circles) arranged in a 3x3 pattern in the corner, as shown below:

enter image description here

A peg can jump over another adjacent peg in any direction (horizontal, vertical or diagonal as shown in blue), provided that the destination cell is empty. A move consists of taking one peg and making one or more consecutive jumps, as shown below:

enter image description here

Can you transfer all the 9 pegs to the opposite corner of the grid, arranged in the same 3x3 pattern?

Bonus question: what is the smallest number of moves you can do it in?

Good luck!

$\endgroup$
  • $\begingroup$ @Bass that's a good point. I don't think it would be possible to show optimality without a computer. However, I was hoping that people can still do this by hand and get sub-optimal answers. Would that still be ok for a puzzle? Perhaps I need to reword the question somehow? $\endgroup$ – Dmitry Kamenetsky Oct 3 at 5:59
  • $\begingroup$ Ok I've modified the problem. The primary objective is to complete the puzzle in any number of moves. The bonus question asks for the minimal number of moves. $\endgroup$ – Dmitry Kamenetsky Oct 3 at 6:15
  • $\begingroup$ Can't I just diagonally shift all pegs in 9×6= 54 moves. $\endgroup$ – Rishi Oct 3 at 6:48
  • $\begingroup$ @Rishi sorry I don't understand your solution. They need to jump, not shift. $\endgroup$ – Dmitry Kamenetsky Oct 3 at 7:29
  • 2
    $\begingroup$ @Rishi Pegs must always jump over other pegs. $\endgroup$ – Jaap Scherphuis Oct 3 at 8:16
40
$\begingroup$

I was having a slow work day, so I fired up Blender and made this:

GIF animation

In 13 hops, the block of 9 pegs can be moved two places down and to the right. By repeating the process two more times, the pegs can be moved to the bottom right corner.

$\endgroup$
  • 9
    $\begingroup$ ((((worship)))) $\endgroup$ – Conifers Oct 3 at 16:13
  • 4
    $\begingroup$ That is so beautiful! $\endgroup$ – Dmitry Kamenetsky Oct 3 at 22:01
  • 1
    $\begingroup$ If consecutive moves by the same piece count as a single move, you could probably optimize this some. (Looks great though.) $\endgroup$ – Darrel Hoffman Oct 3 at 23:22
  • 5
    $\begingroup$ Upvoted for producing a short film. ;) $\endgroup$ – Wyck Oct 4 at 2:53
  • 2
    $\begingroup$ Brilliant answer! Would you like a bounty award as a gift (after you earn the checkmark, I presume)? :) $\endgroup$ – Mr Pie Oct 5 at 0:09
9
$\begingroup$

It's possible.

Assume the pegs are in the upper left corner of a slightly enlarged chess board, which has indices $1 - 9$ and A - I. Now make the moves

b8-d6, c7-e5, d6-f4, e5-g3, f4-h2, g3-i1

b9-d7, c9-c7, c8-e6, c7-e7, d7-f5, e7-e5, e6-g4, e5-c5, f5-h3, g5-g3, g4-i2, g3-i3

a7-c7, a9-a7, a8-c6, c7-c5, a7-c7, b7-d5, c5-e5, c7-c5, c6-e4, e5-e3, c5-e5, d5-f3, e3-g3, e5-e3, e4-g2, g3-g1, e3-g3, f3-h1

EDIT

If I'm counting right, the wonderfully animated solution of @squeamish ossifrage has $12 \times 3 = 36$ moves, which is the same number of moves as my solution above. Inspired by the animated solution, I found that I can move the $9$ peg block two places down and to the right with just $9$ moves:

b8-d6, c7-e5, b9-d7, c9-c7-e7-c5, a7-c7-e7, a9-a7-c7, a8-c6-e6, c8-c6, b7-d5

This reduces the total number of moves to $9 \times 3 = 27$ moves. I don't know if this is the minimum, but it's a start.

EDIT 2

Made a computer program to look for a solution with fewer moves. It managed to improve my previous solution so it now only takes

$23$ moves

Here they are:

a8-c6, b9-d7, b7-d5, c7-e5, a9-c5, c9-e7, a7-c7, b8-f4, c8-g4, c6-e6, e5-e3, c5-e5, d5-h3, g4-i2, e5-i1, e7-i3, c7-g3, d7-f5, e6-g2, g3-g1, e3-g3, f5-h1, f4-h2

I had to make some assumptions to get a solution within a reasonable time, so I'm not absolutely sure this is the minimum. I'd love to see the minimum if this is not it!

$\endgroup$
  • $\begingroup$ 27 is very good. It is not the minimum, however it is a great start. Hopefully others can extend your solution. $\endgroup$ – Dmitry Kamenetsky Oct 5 at 13:01

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.