9

I was wondering if any one knew how to swap 2 diagonal edge pieces. Assume the white squares don't matter.

cube layout

Image generated on https://ruwix.com/online-rubiks-cube-solver-program/

Bill the Lizard
  • 261
  • 1
  • 5
some_person
  • 235
  • 1
  • 2
  • 6

2 Answers2

8

I don't believe that you can swap them on their own. But, here is a move sequence that will swap these two along with two other edge pieces on top (that you have marked in white):

U2 F2 U D R2 U' D' F2

That solution preserves all but 2 cubies in the top row. As @elias points out, you can shorten it further by removing the first action and further disturbing the top row:

F2 U D R2 U' D' F2

There may be other possibilities - I didn't search for the shortest possible solution. Hold the cube in the same orientation as is shown in the picture above.

some_person
  • 235
  • 1
  • 2
  • 6
Nathan S.
  • 284
  • 2
  • 5
  • For whoever down-voted - any reason why I got a down vote? Any other information that would help here? – Nathan S. Feb 13 '17 at 05:28
  • Really. This question and answer are just the kind that got this site off the ground in the first place and still would benefit from more of the same. – humn Feb 13 '17 at 05:57
  • I think you can even skip the U2 in the beginning, if white squares don't matter. – elias Feb 13 '17 at 06:59
  • 2
    It is indeed impossible to swap only those two pieces - the reasoning uses the concept of parity of permutations: The unit move on A Rubik's cube is a 90-degree turn of a side, which introduces a permutation of the small pieces with an even parity (both the edges and the corners have a 4-cyclic permutation). A Rubik's cube which is organized, but only two pieces are interchanged (either two edges or two corners) has a permutation of odd parity when compared to the organized state. So they cannot be reached from each other with the standard turns, just as the sum of even numbers cannot be odd. – elias Feb 13 '17 at 07:29
  • @elias Yes - that looks correct. I just put a likely edge configuration for the top face into my solver and came out with the optimal solution for that configuration, but there also may be even shorter solutions that further disturb the top row. (Finding the shortest pattern would take a few more minutes to set up and test.) – Nathan S. Feb 13 '17 at 08:53
  • Also another Algorithm to know is one that rotates the middle layer edge piece on the right:

    R U R' U2 R U2 R' U F' U' F

    – some_person Feb 13 '17 at 14:25
  • @NathanS. how would you set up and test that? – some_person Feb 13 '17 at 15:59
  • @theman26 In my code I can set up a goal-test function that ignores certain cubies. So, I could set up your initial state and search to the goal, but only require certain cubies to be solved at the end. – Nathan S. Feb 13 '17 at 21:59
  • is that possible to do with cube explorer? or is that your own personal code? would you be willing to share it? – some_person Feb 14 '17 at 01:25
  • It's personal code. The code is on github in C++ but it's not designed for an end user right now. You really need to be an expert C++ programmer to use it. – Nathan S. Feb 14 '17 at 06:30
  • could you give us a link to the github page? – some_person Feb 14 '17 at 14:25
  • The current branch is here: https://github.com/nathansttt/hog2/tree/PDB-refactor This will be merged back into the main branch at some point. The code does tons of other stuff besides Rubik's Cube and is not well documented. – Nathan S. Feb 14 '17 at 17:46
  • could you walk me through how it works? or would it be too long to explain in this already lengthy comments section? – some_person Feb 15 '17 at 04:30
  • No - the code is quite complex. I had to write custom code to solve this problem. It's not something I can explain easily or succinctly - it's not designed for others to use at this point. – Nathan S. Feb 15 '17 at 08:31
0

Rather than providing a specific sequence consider some combinations.

Starting with a solved cube do the following, rotate the vertical center slice downwards moving the top front edge to bottom front. Now rotate the bottom slice through 180. Now return the front vertical slice to the top. Next rotate the bottom slice back through 180. Look at the cube. The top front edge has moved diagonally to the back lower edge. The rear lower edge has moved to the lower front location. The lower front edge has moved upwards to the top front. None of the edges were flipped in the process.

The next combination starts with a solved cube as well. Put the face you want to leave unchanged in your left palm. Now alternately rotate the top through 180 and the right slice through 180. Repeat the rotations of top and right slices through 180 each. Repeat a third time. Look at the cube. The left face should be intact. The edges on the top and right sides should have been exchanged front to rear/rear to front.

Returning to the first combination we discover that the two edge pieces that were located diagonally end up on the same face after the sequence. If the second sequence is now applied to the first result holding the cube so that the two edges will be exchanged in the process, the edges will be swapped.

Imac007
  • 1
  • 1