A classic Rubiks Cube of size 3 times 3 times 3 is a three d


A classic Rubik\'s Cube of size 3 times 3 times 3 is a three dimensional combination puzzle that has six faces. Each of the six fazes is covered by nine stickers, each of one of six solid colon: while, red, blue, orange, green, and yellow. White is opposite yellow, blue is opposite orange is opposite red. and the red. white and blue are arranged in that order in a clockwise arrangement An internal pivot mechanism enables each face to turn independently, thus mixing up the colors. For the puzzle to be solved, each face must be returned to have only color. The figures below are examples of Rubik\'s Cube of size 3 times 3 times 3 Figure 1 represents the solved cube. Figure 2 shows the shuffled cube. Lean more about this puzzle by Googling it. Which data structure do your recommend to implement a cube size in x n x n ? ans why ? (justify your answer). Write a program (for a cube of size 3 times 3 times 3) that does the following; a. Rotate Up: rotates the up face. b. Rotate Bottom: routes the bottom face. c. Rotate Left rotates the left face. d. Rotate Right: routes the right face. e. Rotate Front: rotates the front face. f. Rotate Back: rotates the back face g. Shuffles the faces of the cube, h. Solve the cube and shows the solution step by step. Compute the time and space complexities of the program you wrote in part (3). Extend part (3) such that the program can also run on cube of size n x n x n.

Solution

Q1. Learn more about googling this puzzle:

>> Rubik\'s cube is a puzzle toy invented by Erno Rubik, a professor of architecture, in the year 1974.
>> In initial stages, the positions of various color squares, as discussed above, was not fixed.
>> It has been a very famous puzzle among puzzlers since long and world records have been maintained for solving it in record time.
>> The original Rubik\'s cube is of dimensions 3x3x3. It comprises of 8 corners and 12 edges. The puzzle can be solved in a massive number of methods (43 quintillion approx).

 A classic Rubik\'s Cube of size 3 times 3 times 3 is a three dimensional combination puzzle that has six faces. Each of the six fazes is covered by nine sticke

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site