2
$\begingroup$

You have a single row of $2n +1$ checker squares: $n$ red checkers, an empty square, and $n$ black checkers. A 'move' can be:

  1. A checker next to the empty square sliding into the empty square, or
  2. A checker that is $2$ squares away from the empty square jumping over an opposite colored checker into the empty square.

What is the least number of moves $M$ needed to reverse the colors? i.e. Start with $n$ red, empty, $n$ black. End with $n$ black, empty, $n$ red,

Example. $n=1$, starting with Red Empty Black: (1) Red Black Empty (2) Empty Black Red (3) Black Empty Red. Took M=3 moves.

  • 0
    Great puzzle. I believe the first four numbers are 3, 8, 15, 24.2017-01-01
  • 0
    @Wildcard It follows this recurrence relation $$a_n=a_{n-1}+2n+1$$ where $a_1=3$ for $n>1$. Solving it we get, $$a_n=n^2+2n$$2017-01-01
  • 0
    @WiCK3DPOiSON, I don't see how you can establish that recurrence relation. I got the same answer by an entirely different approach, so I can confirm that recurrence relation "backwards" (i.e. I can prove it from the closed form) but I'd be interested to see your answer with the thought process you used to reach that conclusion.2017-01-01

1 Answers 1

2

$n(n+2)$ moves are sufficient. I can't prove that number is necessary. Thus $$M_n\le n(n+2)$$

Without moving any piece "backward" at any point, one may solve the puzzle by advancing 1 black piece, then 2 red pieces, then 3 black pieces, then 4 red pieces...then (assuming $n$ is even) $n-1$ black pieces, then $n$ red pieces, then $n$ black pieces, then $n$ red pieces again, and then $n-1$ black pieces, $n-2$ red pieces...then 2 red pieces, then 1 black piece.

This is a total number of moves: $$1+2+3+...+(n-2)+(n-1)+n+n+n+(n-1)+(n-2)+...+3+2+1$$ $$=2(1+2+...+n)+n$$ $$=2(n(n+1)/2)+n$$ $$=n(n+2)$$

  • 2
    To show that it's necessary, label each team with 1,2,3... and note that the order of labels within a color doesn't change. Each checker needs at least $n+1$ steps to reach its destination, so each team needs at least $n(n+1)$ steps, for a total of $2n^2+2n$. But there must occur at least $n^2$ leaps, each equivalent to two steps.2017-01-01
  • 0
    This completes the solution to the problem. : The least number of moves required to reverse the colors is n(n+2). Andrew Woods proved that number of moves is necessary, and Wildcard proved that number is sufficient. Problem solved.2017-01-02