[Community Puzzle] Doubly solved Rubik's cube

https://www.codingame.com/training/hard/doubly-solved-rubiks-cube

Send your feedback or ask for help here!

Created by @icecuber,validated by @Chhunneng,@dolmen1234 and @piwai.
If you have any issues, feel free to ping them.

Hi , i tried a bfs search, but of course, it takes too much time. i don’t have any other idea to solve this puzzle. Does anyone have a hint ?

Look at the two tags.

1 Like

it does not help me :cry:

Either you solve the Rubik’s cube (it’s the hard way), or you find the trick with a little help from the tags.

Note that I know the trick but I still did not code it.

i did tried to solve the cube. Does the trick use matrix ?
Do you find a matrix between given cube and solve cube, inverse the matrix and apply it to solved cube ? or something like that ?

The trick does not need to solve the cube.

i think i have an idea :smiley:

I’d say it does.
Just not using regular moves.

i tried to swap cells two by two until i solved the cube , and do again the same swaps, but that did not work

All you need to know is the “destination” of each small face after the solving moves are performed.
Once this mapping is defined, you’re good to go :slight_smile:

to do that, i have to find the solving moves, that was my first try, with a bfs on regular rubik moves, but it was too slow

Not at all.
That’s the point, you don’t even have to know how those moves are actually done.

To give you an easier example, say you have 5 items, A, B, C, D, E.
You want to change their positions like this for example:
A->C
B->D
C->A
D->E
E->B
Now what happens if you apply these moves again ?
You’ll get:
A->A
B->E
C->C
D->B
E->D
Now extend this to the cube, but this time the items are the 54 small faces.

The Rubik’s group’s order is (12!×2^12)×(8!×3^8)/12=43252003274489856000.
It’s a bit too large for a computer.

i’m not sur it’s so easy, for the fourth example, the rubik’s cube is

UUU
UUU
DDD

RRL BBB RLL FFF
RLL FFF RRL BBB
RLL FFF RRL BBB
DDD
DDD
UUU

and the first line expected is DDD . with your solution i would have UUU no ?

I just did the puzzle yesterday so I’m sure it works.
When you identify the destination of a “sticker”, if it’s a corner sticker you must check its 2 corners neighboors to make sure it’s the good one.
For an edge sticker you must check its edge neighboor.
It’s the boring part of the problem, identifying neighboors.

1 Like

very intersesting, i think i undestand my mistake now, i’ll let you know if i could resolve the problem

Finally did it, thanks

“not regular moves”, this helped me a lot !

1 Like