3

I know this is a very general question, but these kinds of puzzles are the only ones I can't figure out on my own. Rubik's cube, Twiddle, 16... (the last two are in Simon Tatham's Puzzle collection.)

Is there a general thinking principle that applies to puzzles like these? If not, can you give me an example of how to arrive at the solution for any one of these puzzles? I just can't even begin to think about something with so many interconnected parts.

bobble
  • 10,245
  • 4
  • 32
  • 80
Puzzlees
  • 746
  • 5
  • 12

1 Answers1

2

Permutation puzzles are puzzles in which a random permutation needs to be restored to the identity permutation by using a limited (or 'clumsy') set of moves.

For example, with the Rubik's cube, you would like to be able to swap two corners by themselves, but you can't do this directly - you can only rotate faces.

A key feature is then to find - and hopefully optimize - the solving process.

For example, consider that you are only allowed to rotate three elements of a permutation forwards, e.g. $abc\to cab\to bca\to abc$. The three elements do not need to be consecutive.

Then $1234\to4321$ can be done in four steps:

 1234
 3124
 3412
 3241
 4321

Or:

 1234
 1423
 2143
 4213
 4321

But can it be done in three moves or less? And if not, why not?

It can:

 1234
 4132
 4213
 4321

And, as the OP found, a solution in 2:

 1234
 4213
 4321

The challenge is now to find the shortest solution to reverse n numbers, but that's a different question!

My example shows how the straightforward approach is not necessarily the shortest, but the easiest to construct. So to solve a permutation puzzle, construct the 'obvious' solution first, and then try to find shortcuts.

JMP
  • 35,612
  • 7
  • 78
  • 151
  • Well, I assume that question was directed to me; getting the "1" to its position in itself takes 3 moves. So it can't be less than 3 moves. It can't be 3 moves either because "4" has to move in place as well and the first click to move "1" will not be able to move "4". I think this reasoning proves that the solution can be - at minimum - 4 moves. – Puzzlees Mar 27 '20 at 22:16
  • You can rotate 124 or 134 first (to get 4132 or 4213). @alexoland – JMP Mar 28 '20 at 03:56
  • Well then 2 moves is clearly possible: 1234 4213 4321

    It can't be 1 because there is no way to move the "1" to its position in 1 move. But I don't feel like I am solving this in the proper way. I am just trying things out and stumble into a solution. Is there something else you want me to realize?

    – Puzzlees Mar 28 '20 at 18:28