## Rubik's

## Rubik's

(OP)

I know a Rubik's cube is a puzzle in and of itself, but my question involves only a small part of a Rubik's cube.

Imagine you are holding a Rubik's cube and you are looking at the white face of the cube. If the cube is oriented such that the green face is on the right side, that will put the orange face on the bottom.

Now, assuming the cube is starting out solved and alternating between only 2 moves - spinning the green face down (toward you) and the orange face to the left, how many moves will it take to scramble and then resolve the cube? I just manually did it, so I know the answer, but this is the hard part - how can it be solved programmatically w/o using a loop and checking for a solved state after each move? After doing it manually it took this many moves to solve:

So, alternating between the 2 moves:

Imagine you are holding a Rubik's cube and you are looking at the white face of the cube. If the cube is oriented such that the green face is on the right side, that will put the orange face on the bottom.

#### CODE --> Rubik's orientation

yellow (in back and hidden)

-------------

/ red /|

/ / |

|------------| |

| | green

blue | white | /

| | /

--------------/

orange

-------------

/ red /|

/ / |

|------------| |

| | green

blue | white | /

| | /

--------------/

orange

Now, assuming the cube is starting out solved and alternating between only 2 moves - spinning the green face down (toward you) and the orange face to the left, how many moves will it take to scramble and then resolve the cube? I just manually did it, so I know the answer, but this is the hard part - how can it be solved programmatically w/o using a loop and checking for a solved state after each move? After doing it manually it took this many moves to solve:

#### Spoiler:

210

So, alternating between the 2 moves:

- Spin right side face (green) down toward you
- Spin bottom side face (orange) to the left
- GOTO 1

http://www.silkypups.com

## RE: Rubik's

Just concentrated on the red-white-green corner, it takes N moves to come so you have to do 3N moves to have it back in the original rotation. Then surely something else will still be out of whack and adds another factor to the formula.

Regarding N: There are 6 stations on the way of it's original position back to it. But it's not moved in every move. It's moved in the 1st, 2nd, 4th, 6th, 7th and 9th move and not in the 10th. But I'd count that too, because afterwards that pattern repeats. So it's 30xM, Figure out M.

Bye, Olaf.

## RE: Rubik's

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpsonhttp://www.silkypups.com

## RE: Rubik's

## RE: Rubik's

mmerlinn

"Political correctness is the BADGE of a COWARD!"

## RE: Rubik's

Bye, Olaf.

## RE: Rubik's

It takes the white-green edge 14 moves to come back.

14=2*7

30=2*3*5

least common multiple is 2*3*5*7=210

I wonder if any other period for a certain other corner or edge would include a higher prime number like 11. But even 7 is rather odd, so could be the case.

Assuming you would not have taken your time for 2*3*5*7*11=4620 moves or even higher (if there is a period of n*13 etc.), it should be 210 moves.

But that's no proof, just taking probabilities into account and making assumptions on your patience.

Bye, Olaf.

## RE: Rubik's

Bye, Olaf.

## RE: Rubik's

Bye, Olaf.

## RE: Rubik's

hmm, could also be something like 2*2*3*7 or 2*3*3*7, the least common multiple. A prime number can be a factor twice or more. So could also be 420 or 630. Hmm.

Bye, Olaf.

## RE: Rubik's

## CODE

-------------

/ red /|

/ / |

|------------| |

| | | green

blue | white | | /

| <--- V | /

--------------/

orange

## CODE

-----------

| |

-----------

| |

## CODE

-----------

| |

-----------

| |

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpsonhttp://www.silkypups.com

## RE: Rubik's

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpsonhttp://www.silkypups.com

## RE: Rubik's

All pieces will be in their initial position and orientation when all these independant periods end together. And that is surely the case, if you multiply all the periods, but the least common multiple is sufficient.

It's comparable to several gearwheels with a certain amount of cogs. If you take one with 6 cogs and one with 15, you need need to spin the 6-cog-gearwheel 5 times to move the 15-cog-gearwheel twice and be in the initial position. Or you need to spin the 15 gear-wheel twice to have the 6-cog-gearwheel in its original position. Because then both gearwheels have moved 30 cogs, which is the least common multiple of 6 and 15.

Bye, Olaf.

## RE: Rubik's

Bye, Olaf.

## RE: Rubik's

Am I correct in saying:

We must end on an even number of rotations.

We're only dealing with 15 cogs.

7 rotate on green

7 rotate on orange

1 shared

Maybe it's just making the numbers fit Olaf's post, but it'd provide primes 2, 3, 5, & 7.

If we add another rotation, say on blue, would it take 154 (2 * 7 * 11) moves? Or do I have it wrong and it's really 322 (2 * 7 * 23) moves? Or, am I entirely incorrect because my numbers are made up? ;)

## RE: Rubik's

even = 2

22 cogs = 11 * 2

7 blue = 7

7 green = 7

6 orange = 3 * 2

1 orange/blue = 1

1 orange/green = 1

2 * 3 * 7 * 11 = 462.

## RE: Rubik's

I think you are getting my gearwheel analogon a little wrong.

There are 15 elements of the cube moving if you count the middle ones. I'd say 3 shared plus 6 other elements on both faces, but okay. You got that right.

So the analogon to the problem would be 15 gearwheels, not 15 cogs. Each gearwheel will have as much cogs, as you need moves to put the corresponding element back to initial position and rotation.

But there's a cathc: As I said in the first example of the red-white-green I counted 10 to put the corner back (rotated though), although it's back after 9 moves already. The thing is, after 18 moves it will not be back. The (partly) period is not done, because the first move of the first period moved that corner, the 10th move would not, so it belongs to that period. And you need to do that 3 times to get the rotation right, which results in 30 moves.

My results so far are:

red-white-green: 30 = 2*3*5

white-green: 14 = 2*7

middle orange: 8 = 2*2*2

middle green: 8 = 2*2*2

That alone makes 4 of the 15 gearwheels. It gives a least common multiple of 840, due to the rotation of the middle elements, for which you don't really need to care. Without them it's 210 so far.

It would matter if any other element would contribute more prime factors to the overall result. For a proof I need to provide those periods too. I only argued on the fact, kaht has done this by trying. And he might have given up after more moves. I didn't proove it yet.

more periods:

white-green-orange: 6 moves - we alreasdy have 2*3, no new factor.

blue-white-orange: 30 moves - again what we already have.

All in all that corner takes the same root as the red-white-green corner, only starts/ends at a different position. The same goes for all other corners, except the white-green-orange. But no new prime factors from 6 too.

And if I think about it, all edges take the same route too. Then it's 210 or 840 respectively, depending on taking the middle elements into account or not.

Bye, Olaf.

## RE: Rubik's

## RE: Rubik's

6 corner blocks are affected by the turns

of these positions, a block will spend two turns in each of 4 positions, and one turn in each of 2 positions.

Thus, it takes 10 turns (2*4 + 1*2) for a corner block to make a full rotation.

However, to return to its original orientation, it must complete 3 rotations.

Thus, period for corner blocks = 30.

7 side blocks are affected

of these positions, a block will spend two turns in each of 6 positions, and one turn in the remaining position, but will visit it twice in a rotation.

Thus, it takes 14 turns (2*6 + 2*1*1) to make a full rotation. A rotation does not change a side block's orientation.

Thus, period for side blocks = 14.

If we count the orientation of the middle blocks (which I think is a nice twist), there are two blocks affected, but neither changes position. Thus, each block makes a rotation every 2 turns. It takes 4 rotations to return to its original orientation.

Thus, period for middle blocks is 8.

The least common denominator of 30, 14, and 8 is 840.

Ignoring the middle blocks, lcd of 30 and 14 is 210.

This is a fun mathematical exercise. Thanks for the distraction.

Thus, it takes

## RE: Rubik's

You weren't by chance using one of these were you?

http://jpbrown.i8.com/cubesolver.html

Wow, I'm having amnesia and deja vu at the same time.I think I've forgotten this before.

## RE: Rubik's

http://www.silkypups.com

## RE: Rubik's

• Rotate the rightt face 90 degrees clockwise about its face. Rotate the entire cube so that the top face does not change and the rear face becomes the right face. Repeat process. How many iterations of this before the cube is solved?

• Rotate the right face 90 degrees clockwise about its face and the leftmost face 90 degrees clockwise about its face. Rotate the entire cube so that the top face does not change and the rear face becomes the right face. Repeat. How many iterations to solve? If you start again but only perform half the number of iterations, you will find a neat zig-zag pattern on the sides of the cube with the top and bottom solved. If you then perform the same half-tranformation again only starting with the "wrong" pair of faces, you will find another interesting transformation, again with the top and bottom faces solved.

My alarm clock causes time travel. When I hit snooze, no apparent time passes before the alarm sounds again, but the universe has in fact moved forward through time by ten minutes!

## RE: Rubik's

--

If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.

## RE: Rubik's

Wow, I'm having amnesia and deja vu at the same time.I think I've forgotten this before.