We see the standard version of the puzzle in:
The Puzzle That's HARDER
After Seeing the
Solution!
Which corresponds to the case $n=2$ in my follow up problem.
5 coin puzzle
In short, you are presented with 2 types of coins (let there be small ones and big ones since we all are not using the same currencies), which are laid out in a straight line like: $\text{OoOoO}$
Your goal is to reach the sorted state of coins: $\text{OOOoo}$
By respecting the Rules:
You may only move 2 conjoined coins that are not of the same type per move.
The held coins cannot be twisted, separated or used to push other coins around.
All coins need to be aligned on the same line.
In the linked video, the best solution using only $4$ moves is shown.
There is also a $5$ move solution shown in the video, which would apply to a restricted variant that includes:
- Upon releasing the coins, at least one of the held coins must be touching one other coin.
Follow Up Problem
I want to know if there exist solutions for $2n+1$ coins or not, and if there is a best generalized method to reach them in least moves.
(Both for the standard set of rules and the restricted variation)
The solution for $n=1$ is trivial: we have $\text{OoO}$ where $1$ move solves to $\text{OOo}$ and holds for both variations.
The solutions for $n=2$ are shown in the video. ( $4$ and $5$ moves )
For $n=3$ we have: $\text{OoOoOoO}$ , where I found a solution in $11$ moves for standard set of rules, and one in $15$ moves for a restricted variation.
The solutions for $n\ge4$ are yet to be found or proven impossible.
(I believe that all $n$ have a valid solution following a similar pattern)
In the video, they reference the case they are showing as "11 cent puzzle", since they are using dimes and cents, thus you are always moving 11 cents per move.
Solution update
I have found a general solution that solves it in $n^2$ moves, and in $\frac{n(3n-1)}{2}$ moves for the restricted variation.
This is better than my previous solutions for $n=3$, and I believe the optimal method.
It wasn't actually that complicated. I will post it if no one is able to solve it ( or at least find a general solution of their own ).