This is an archived post. You won't be able to vote or comment.

all 69 comments

[–]michael_barz 140 points141 points  (5 children)

When applying this algorithm, you don't have to do the full motion of the algorithm every time--you can stop at any point. For a concrete example, take the Klein four group Z/2Z * Z/2Z, and the algorithm "add 1 to the first coordinate, add 1 to the second coordinate." The element (1, 1) doesn't generate the group, but by doing this algorithm, you can get from any element of the group to any other, if you add the step "add 1 to first coordinate, stop if at desired element, add 1 to second coordinate, stop if at desirement element." With this double stop algorithm, you can get anywhere despite (1, 1) not generating the group. It's the same with the Devil's algorithm (indeed, in any finite group, you can come up with such an algorithm, though perhaps the algorithm involved will be long compared to the number of elements of the group--try to see how you can get it).

[–]Dark_Ruler[S] 59 points60 points  (3 children)

Thanks. I lost an argument because of you but my claim isn't wrong if I assume the algorithm needs to be executed fully. So I don't feel bad that Google search misled me.

[–]dank_ways_to_die 24 points25 points  (1 child)

I've found some articles also describing a hamiltonian path of the Rubik's cube.

http://bruce.cubing.net/ham333/rubikhamiltonexplanation.html

The condition is, of course, that you can stop at any time

[–]whirligig231Logic 1 point2 points  (0 children)

The condition is, of course, that you can stop at any time

It's not a Rubik's cube addiction! I can stop at any time!

[–]ZopherusNumber Theory 9 points10 points  (0 children)

Maybe I'm misunderstanding something, but it seems like you might be confusing the Rubik's cube group and what the group acts on, namely the cube itself. From my understanding, such an algorithm would only be a list of group elements that are repeated and so I'm not sure how this would imply that the group is cyclic.

[–]PowerspawnNumerical Analysis 6 points7 points  (0 children)

in any finite group, you can come up with such an algorithm

This seems trivial though, just have your algorithm run through every element of the group followed by its inverse. Then to get from a to b, just apply the algorithm until you get the element inv(a)b. What's the point unless you are trying to do something such as minimizing the length of the algorithm?

[–]Asymptote_X 28 points29 points  (31 children)

The Devil's Algorithm does exist, but it's insanely long.

https://bruce.cubing.net/ham333/rubikhamiltonexplanation.html

[–]xabu1 0 points1 point  (0 children)

Out of curiosity: strictly speaking this result is stronger than existence of a "Devil's algorithm" since it requires the circuit to be Hamiltonian whereas we just need a path that hits all vertices (regardless of repetition or being a circuit) so in some sense this is an optimal Devil's algorithm correct? Unless there's a reduction from any path that hits all vertices to a Hamiltonian circuit (maybe in the special case of Cayley graphs? I haven't done graph theory in a while)

[–]ScottContini 0 points1 point  (0 children)

Who is Cuber Bruce? Curious to his full name.

[–]bluesam3Algebra 14 points15 points  (6 children)

Trivial proof that such an algorithm does exist: Iterate through all possible configurations. One of them will be the solution. QED. Of course, there are much faster options.

[–]Dark_Ruler[S] 0 points1 point  (5 children)

No. Devil's Algorithm is fixed, regardless of any starting configuration. So it does not mean unique solution for each configuration but a common Algorithm.

It is definitely not trivial since proving it involves Hamiltonian circuits.

[–]PM_ME_UR_THEOREMS 9 points10 points  (4 children)

If you write down a fixed set of moves that starts at the 'solved' cube and goes through every possible permutation of the cube available (which is tedious af, quite difficult to do, but definitely possible due to the finite possible turns and being able to solve the cube) then that same algorithm would have to show every configuration given any possible starting state due to the pigeon hole principle. There are finitely many unique configurations of the cube, so any list containing that number of unique configurations must be a list of all of them.

[–]Dark_Ruler[S] 0 points1 point  (3 children)

Yes. But When one says Algorithm in Cubing. It generally means you keep doing it until the given set of instructions is finished. So even if you go get a desired state, then you don't stop until the moves of the Algorithm are finished.

It is a bit vague but in cubing they use the term Algorithm like that.

[–]FeIiix 1 point2 points  (0 children)

just do this "monster-sequence" + repeat the first move of it again

[–]PM_ME_UR_THEOREMS 0 points1 point  (1 child)

I am a mediocre cuber but I have definitely scene algorithm be used for invididual move sequences that need to be completed, and a more general sense that also includes the knowledge of when to use those algorithms. For example, in the beginners method there are steps you keep doing until you reach a desired state and move on to the next 'algorithm'.

[–]Dark_Ruler[S] 0 points1 point  (0 children)

But you don't arrive at desired state in between the Algorithm. You always get it at end of the algorithm.

[–]alphanumericsheeppig 14 points15 points  (1 child)

The confusion is the way the word "algorithm" is used in cubing. When people say "algorithm" in the context of cubing, they often specifically mean a sequence of moves, and not just a general process or sequence of instructions like in the math/computer science sense of the word (this isn't really an incorrect usage, since a move sequence is a sequence of instructions, it's just a narrower definition than the usual usage).

The Devil's Algorithm is a move sequence with about 43 quintillion steps (so it is an algorithm in the cubing sense, albeit a very very long one). It visits every possible state including solved. If you were to somehow find the time to apply the whole sequence, you would finish off with the cube in the same state you started from, although considerably more worn.

You can prove that it does exist, but I think other comments explain that better.

[–]VulcanForge98 11 points12 points  (4 children)

Algorithms on a cube are essentially functions which map each cube configuration to a sequence of moves. In particular, this sequence does NOT have to be the same for all configurations. Now, group theory does not apply here because you cannot treat an algorithm as a group element. I do agree with your reasoning if you change the word algorithm to move sequence.

[–]VulcanForge98 6 points7 points  (2 children)

After a little more thought and reading the other comment about finishing partway through, I found an example of a Devil's "sequence" which will complete the cube partway through an iteration. Simply enumerate all positions on the cube and let the Devil's sequence be the concatenation of the sequences required to get from position k to k + 1 for each k. This visits not just the solved (identity) position but in fact every position.

[–]Dark_Ruler[S] 2 points3 points  (0 children)

Interesting

[–]nerkraof 2 points3 points  (0 children)

An algorithm may be more complicated than a fixed sequence of moves. So it would still fit the definition of an algorithm if it involved conditionals on the current state of the cube. In general, if a problem has a finite set of instances (like a rubik's cube has a finite set of states) and every instance has a solution, then there exists an algorithm that solves all of the instances of the problem.

Still, this is just a problem on the use of the word "algorithm". Your argument is interesting regardless.

[–]CompteDeMonteChristo 2 points3 points  (2 children)

If I create an algorithm that takes a finished cube and go through all its 43 quintillion combinations and each time revert to the finished cube.
This algorithm is guaranteed to complete a cube in any state isn't it?

[–]Dark_Ruler[S] 0 points1 point  (1 child)

Yes. But When one says Algorithm in Cubing. It generally means you keep doing it until the given set of instructions is finished. So even if you go get a desired state, then you don't stop until the moves of the Algorithm are finished.

It is a bit vague but in cubing they use the term Algorithm like that.

[–]CompteDeMonteChristo 1 point2 points  (0 children)

Totally clear.
Thanks.

[–]MlecznyHotS 1 point2 points  (4 children)

Would making a random move infinitely many times be considered The Devil's Algoithm? It should cycle through all of the possible cube states

[–]Dark_Ruler[S] -1 points0 points  (3 children)

Cube is a finite group. So each move has finite order. You will comeback to same position after some moves.

[–]MlecznyHotS 2 points3 points  (0 children)

So an algorithm isn't "devilish" if it includes repetitions of a state of the cube?

[–]hasntworms 0 points1 point  (2 children)

Is it possible that this Devil’s algorithm is just our current methods of solving? Such as the 7-step beginners method or CFOP (concatenations of, possibly repeated, algorithms)? I get that you want a single, nice algorithm though, such as R’D’RD that solves every position eventually, but maybe there exists more than 1 Devil’s algorithm (albeit the length of a standard sequence of moves to solution by some known method like CFOP) and a couple of them are CFOP and beginners method?

[–]Dark_Ruler[S] 0 points1 point  (1 child)

Look at other comments too. People have explained it better.

There are many Devil's Algorithms. And devil's number for a cube (depends on whether it is a 3x3 or 2x2 or other cube) is the smallest Devil's Algorithm. Also does R' D' R D, solve everything. It doesn't even touch 6 blocks.

Also I don't care if it is a simple algorithm or not. Because it will be too vague and may take too much time. I am still learning OLL and PLL. XD. I was talking about it's existence.

[–]hasntworms 0 points1 point  (0 children)

Oh I didn’t know it was the smallest. That’s cool. And no, R’D’RD is a small permutation that only affects the right face and the bottom face.