[Community Puzzle] Doubly solved Rubik's cube

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

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.

it does not help me

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

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

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