[Math] Snake cube puzzle equation

group-theorypermutationspuzzle

This is a Snake Cube Puzzle

enter image description here

I am trying to understand the solution from mathematical point of view. Someone even wrote a solver: https://github.com/markfickett/snakepuzzle but I can't really read the code. I can imagine a solver that would iterate through all combinations until it finds one that is 3x3x3 in size but that is not really a "solution".

What would be the equation and how would I approach solving it?

Best Answer

One can certainly write a solver that just tries all the possibilities, as long as you do it step by step and throw away the ones that fail. The cube target is quite restrictive. If your first three steps are forward it is already too big so you ignore that. The more steps you take, the more likely the shape won’t fit. The number of possibilities stays reasonable. There is a whole literature on tree searching.

Related Question