An interesting Square-1 alg

cuBerBruce

Veteran
Joined
Oct 8, 2006
Messages
914
Location
Malden, MA, USA
WCA ID
2006NORS01
YouTube
Visit Channel
I've come up with the following Square-1 algorithm that I think is somewhat interesting. See if you can figure out what's special about it. It's in classic notation omitting the parentheses. Start with the Square-1 in cuboid shape.

/3,3/0,2/-5,0/0,-2/0,1/-1,0/4,0/6,0/3,2/-1,1/
0,5/0,2/4,-2/0,2/0,-4/2,1/3,0/0,-4/3,0/-4,-2/
-4,0/0,2/0,-4/4,0/0,-1/-2,0/0,-1/-2,-2/2,0/-4,0/
0,3/1,-1/6,0/-1,2/-2,0/-5,2/6,0/-5,0/-1,2/-3,0/
0,-2/5,0/3,0/0,2/2,0/2,0/2,0/2,0/4,2/0,4/
0,1/-4,0/6,0/-2,0/1,-2/1,-1/0,1/0,3/0,4/-4,0/
0,2/-3,0/-1,0/-5,0/-2,0/0,-4/2,0/0,2/2,0/5,0/
4,0/2,2/-2,-2/5,0/4,0/5,0/0,4/1,0/-3,0/0,-1/
-2,0/6,0/-1,0/0,1/-4,2/-2,0/-4,0/-2,0/1,0/3,0/
 
I haven't solved the riddle yet, but here are my thoughts:

Bruce said it's an interesting algorithm, and I believe he's really talking about the algorithm, not its result. He also told us to start from cube shape, and I believe he's really talking about the shape, so we don't need to start with the fully solved puzzle. Now... my first guess was that it's the shortest algorithm using all possible moves, but this is not the case. However I still believe it's something like that.
 
Okay, I've had half an hour of internet trouble, but finally I can post. Animation

The scramble visits every shape once, except at the end.
The length (92) made it suspicious while I was animating, and it wasn't hard to verify using my Square-1 graph code.
If you truncate it near the end, you get a Hamiltonian path of the Square-1 graph.

Oh, and why didn't I think of doing this earlier? Right now, it took me 10 extra seconds of code in the file I posted in the Square-1 shape distribution thread: "HamiltonianPath[sq1graphsimple]" returns a valid path.
 
Last edited:
Darn I'm stupid.
I even knew the length of the alg, that should've told me. Guessed Lucas' answer when watching his video but at least before reading his spoiler.
 
Beautifull sequence of moves Bruce. We need more posts like this on the forum!

Am I correct in assuming it would be possible to construct a devils algorithm (or at least a perfectly randomly distributed scramble) with the following ingredients
1: Do a random combination of A=(1,0)/(-1,-1)/(0,1), B=/(3,0)/(-3,-3)/(0,3)/, C=(1,0)/(-1,0) and quarterturn U-D adjustments (n*3,n*3) to scramble while "staying in cube-shape"
2: Do or don't do a parity alg that "stays in cube-shape"
3: Do or don't do /(6,0)/(6,0)/(6,0) (I still like to call this (R2U2)*3) to randomize the middle layer state
4: Perform a part of the mentioned
HamiltonianPath-Alg

I believe 3 is not even needed because it is included in 4
 
Last edited:
Yes, the alg is the shortest possible in terms of number of twists ("/" moves) starting and ending in square-square shape that visits all 90 shapes (ignoring middle layer and ignoring the rotational positions of the top and bottom layers). "Kite-kite" shape is the only neighbor of square-square, so it has to be visited twice. But as Lucas said, it's a Hamiltonian path if you leave out the final two twists to return to square-square.

I also note that it is easy to use this to generate a Hamiltonian circuit for the 180-element shapes graph where the middle layer shape is also considered.

I might also look at the 65-element shapes graph (where reflected shapes are considered equivalent to the unreflected shape), but perhaps Lucas might come up with something quicker with Mathematica.
 
Last edited:
I do not own a square-1 but this is what I concluded before reading spoilers or watching lucas' animation:

Spoiler below

Both the length of the algorithm and the comment made that it doesnt end in an interesting configuration led me to believe that the changes it undergoes while being solved are what makes it interesting. Since this alg appears(to me at least) to be a bunch of randomness, i figured the shape was what was being affected. I didn't know how many shapes there were, but 90-ish seemed reasonable, so i figured that this alg must cycle through all shapes. ten seconds of lucas' animation confirmed this.

well done bruce, this was cool to see.
 
OK, another square-1 sequence...

0,0/3,3/0,2/-5,0/0,2/
3,0/5,2/1,-2/-3,0/3,-2/
-2,0/6,0/0,1/-1,0/4,1/
0,2/4,0/-4,2/4,-2/0,-2/
0,3/2,0/0,1/2,2/-1,0/
0,3/-1,1/0,3/-5,2/-2,0/
6,0/3,0/0,2/2,0/4,-2/
-2,0/3,0/0,4/0,4/0,-2/
0,-2/0,2/0,4/0,2/3,-1/
-1,0/0,1/3,0/1,-2/-1,2/
1,0/-3,0/0,2/3,0/5,0/
0,-2/3,0/3,2/0,2/2,0/
-1,0/2,2/1,0/2,-1/

This is a Hamiltonian path for the 65-shapes Square-1 graph.
In that graph reflected shapes are considered the same as the unreflected shape.
The state of the middle layer is also ignored and top and bottom of the puzzle are considered equivalent (just as with the 90-shapes graph).

The path starts from square-square and ends at square-kite. These two shapes are forced
to be the endpoints of any Hamiltonian path of this graph.
 
Back
Top