The longest alg?

Honestly, isn't it possible to make an algorithm infinitely long? We could just keep undoing and redoing moves within an algorithm like the stryker.
 
Last edited:
Honestly, isn't it possible to make an algorithm infinitely long? We could just keep undoing and redoing moves within an algorithm like the stryzer.

ahem..

There is a shortest alg for a case, we know that, But is it a longest?

To simlify we assume it is a 2-gen RU, say U-PLL, what is then the longest alg for it using the two sides without repeating states?
 
There is a shortest alg for a case, we know that, But is it a longest?

The Devil's Algorithm: An algorithm that takes a puzzle through all possible configurations.

Although I have no evidence to back this up, I'm pretty confident in saying that there is no algorithm that can do that without repeating states.

PROVE ME WRONG.
 
There is a shortest alg for a case, we know that, But is it a longest?

The Devil's Algorithm: An algorithm that takes a puzzle through all possible configurations.

Although I have no evidence to back this up, I'm pretty confident in saying that there is no algorithm that can do that without repeating states.

PROVE ME WRONG.

its possible on floppy cube, why not 3x3? ;) lol not that I believe that but I'd still like to see some evidence in either direction
 
http://www.jaapsch.net/puzzles/hamilton.htm

"Although the Petersen graph is vertex-transitive, it does not occur as a Cayley graph of some group. It has been conjectured that Cayley graphs always have a Hamilton cycle. If this is true, then every puzzle with a group structure has a Hamilton cycle. In particular, the puzzles with unrestricted reversible moves and distinct pieces, such as the 2×2×2 and 3×3×3 Rubik's Cubes, the Pyraminx, and the 12 colour Megaminx, will have Hamilton cycles."

Keep in mind, the Devil's algorithm may not be the longest algorithm that performs, for example, a U permutation.
 
The thing that started me was that I was bored yesterday and started to search for a really crappy A-PLL using RUF,

Like this one: U2 R2 F2 R' U' R' F2 R2 F2 R U' F2 R2 U2 R2 F2 U2 R U2 (19f)

Then I started to think it must be a commutator inside and the rest will be setup turns. But you can't set up the corners and commutate them in so many ways using only three sides, it must be a limit to the length if you don't want it to do/undo states and the same must apply for using all sides but more combinations of course.

BTW: A using only q-moves : F' R' F R U' R' F' R F R F U F' R' F U' F' U (18f) ... I think it is the shortest using only quarters and three sides but I did not search the whole list I got.
 
Last edited:

If you'll allow me to step outside of the RU restriction to expand on this a bit, I can increase your alg to 42,157,984 turns, and I'm fairly certain that no state is repeated, though I'm a little unsure as to how to formally prove this.

Replace every R in your alg with: (D' L' U' R')*629 D' L' U'
Replace every R' with: (U L D R)*629 U L D
Replace every R2 with: [(D' L' U' R')*629 D' L' U']*2
Replace every U with: (R' D' L' U')*629 R' D' L'
Replace every U' with: (L D R U)*629 L D R
Replace every U2 with: [(R' D' L' U')*629 R' D' L']*2

No two consecutive moves would give any cancellation, and as far as I can tell no states should repeat.

If you wanted to expand on this further, then use a long algorithm with order 1260.

--edit--
I will also look at this from the viewpoint of RU turns only, I think this is really interesting! Also, I think I have a conjectured answer, but give me some time to type it up.

Chris
 
Last edited:
I suspect that there are Hamiltonian paths and cycles on the Rubik's Cube, and there are probably even non-repeating algs of 43252003274489855999 moves for every unsolved position. No, I don't have proof of either claim. A possible proof may start with finding a Devil's Algorithm for Thistlethwaite's group G2 (generated by U, D, F2, R2, B2, and L2), then finding a path between all of the cosets of this in the cube group.

Or something like that.

If we're just talking about finding "long" algs rather than the longest ones, then you can start with an ordinary alg and repeatedly substitute alternatives for each move in it. (It appears this is what qqwref did.) (EDIT: Well played, Chris.) Or you could get a million-move-long scramble, then solve that into your desired position with the method of your choice. It's still unlikely that there will be any repeats.
 
Last edited:
Ok, so I think I have a potential answer. I will put it out as a conjecture, and it can be either proven or disproven.

Hardwick conjecture:
The longest possible algorithm for any effect in the 2-gen 3x3x3 puzzle obtained by turning only R's and U's and without repeating any cube state is 73,483,199 turns. Such an algorithm would be the equivalent of either one quarter turn or one half turn on the puzzle. Any other permutation effect on the cube must be of equal or shorter length than this one.

This is done by constructing a Hamiltonian cycle out of all possible 73,483,200 2-gen [R,U] 3x3x3 states. IF such a hamiltonian cycle exists, then imagine it is constructed of all 73,483,200 states of the 2-gen puzzle. Call this Hamiltonian cycle the 2-gen Devil's algorithm.

Number the states the 2gen Devil's algorithm passes through as:
\( a_1, a_2, a_3, ... , a_{73,483,200} \)

where each \( a_i \) is a unique cube state achieved in the 2-gen permutation group. All \( a_i \) states taken together form a partition of the 2-generator cube group. Also, define \( a_1 \) to be the solved cube.

Now let's number the turns in the Devil's algorithm itself as:
\( s_1, s_2, s_3, ... , s_{73,483,200} \)

where \( s_n \) denotes the particular turn that takes the cube from state \( a_{n} \) to state \( a_{n+1} \)

Now assume that the particular algorithm you want to achieve is state \( a_{k+1} \)

So our currently numbered Devil's algorithm can be viewed as:
\( s_1, s_2, s_3, ... , s_k, s_{k+1}, ... , s_{73,483,200} \)

Now to construct the algorithm that has the effect of taking the solved state and turning it into state \( a_{k+1} \) construct the following algorithm:

\( s_1, s_2, s_3, ... , s_{k-1}, s_{k} \)

This sequence is k turns in length. To construct another version of this algorithm you can use:

\( s_{73,483,200}', s_{73,483,199}', ... , s_{k+2}', s_{k+1}' \)

where \( s_n' \) denotes the inverse of turn \( s_n \) and is the turn that takes the cube from state \( a_{n+1} \) to state \( a_n \). This constructed sequence is \( 73,483,200 - k \) turns in length.

Finding the longest possible alg to achieve a particular U permutation can be constructed by finding an optimal turn length 2gen 3 cycle for that U perm. Call that state \( a_{k+1} \) and construct the longer version of the permutation using the method above, which will be the permutation you wished to achieve.

This leads me to:

Hardwick conjecture number 2:
A longest possible algorithm for any desired permutation \( P \) is of length:
\( 73,483,200 - O_{P} \) turns.

\( O_{P} \) denotes the length of an optimal algorithm to achieve the permutation \( P \)

This algorithm is constructed by creating a new Devil's Algorithm \( r_n \) such that:
\( r_1, r_2, ... , r_{O_P} \) is the optimal length algorithm that takes the solved state and transforms it into the permutation \( P \). Now construct the following algorithm out of this new Devil's algorithm \( r_n \) IF such a new Devil's algorithm exists:

\( r_{73,483,200}', r_{73,483,199}', ... , r_{O_P+2}', r_{O_P+1}' \)

This algorithm will be a longest possible algorithm to achieve the permutation \( P_k \) and this assertion is Hardwick conjecture number 2.

Chris
 
Last edited:
A little corollary to the Hardwick conjecture: If there is a Hamiltonian cycle, then its inverse is also a Hamiltonian cycle, and by choosing between these two we can find an algorithm of length at least 73483200/2 = 36741600 moves.

P.S. Anybody recognize the number 36741600?
It's ten times the number of positions of a 2x2 cube. Semi-coincidence.
 
Back
Top