27
Rubik’s Cube and Other Puzzles SFU Math Camp June 2013 Jamie Mulholland Sam Johnson

Rubik’s Cube and Other Puzzles - SFU.cajtmulhol/presentations/2013-MathCamp-Puzzles.pdf · Part I: The Swap Puzzle The Parity Theorem: For an arrangement of objects (permutation)

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Rubik’s Cube and Other Puzzles

SFU Math CampJune 2013

Jamie MulhollandSam Johnson

12

1 2 3

6 7

9 10 11

13 14 15 16

4

85

2 43 65 7 81

SFU MathCamp 2013

SFU MathCamp 2013

1 9.2

3 4

5 6.

7 8

10

11 12

13 14

15

Cut out game boards, and individual numbered tiles.

Cut out your own 15-puzzle and Swap puzzle

Part I: The Swap Puzzle

Legal Moves: Pick any two boxes and swap the contents.

Game Play: Randomly arrange the tiles in the boxes then try to put them in proper order using only legal moves.

Challenges:puzzle 1

puzzle 2

puzzle 3

puzzle 4

Part I: The Swap Puzzle

Legal Moves: Pick any two boxes and swap the contents.

Game Play: Randomly arrange the tiles in the boxes then try to put them in proper order using only legal moves.

Challenges:puzzle 1

puzzle 2

puzzle 3

puzzle 4

(variation 1)

Part I: The Swap Puzzle

Legal Moves: You can only swap the contents of a box with box 1.(variation 2)

Game Play: Randomly arrange the tiles in the boxes then try to put them in proper order using only legal moves.

Challenges:puzzle 1

puzzle 2

puzzle 3

puzzle 4

Part I: The Swap Puzzle

Legal Moves: You can only swap the contents of two consecutive boxes (assume 8 and 1 are consecutive).

Game Play: Randomly arrange the tiles in the boxes then try to put them in proper order using only legal moves.

Challenges:puzzle 1

puzzle 2

puzzle 3

puzzle 4

(variation 3)

Let’s countthe numberof moves.

Part I: The Swap Puzzle

Legal Moves: Pick any 3 boxes, and shift the contents either left or right one box. We call this move a 3-cycle.

Game Play: Randomly arrange the tiles in the boxes then try to put them in proper order using only legal moves.

Challenges:puzzle 1

puzzle 2

puzzle 3

puzzle 4

(variation 4)

Part I: The Swap Puzzle

Legal Moves: Pick any 3 boxes, and shift the contents either left or right one box. We call this move a 3-cycle.

Game Play: Randomly arrange the tiles in the boxes then try to put them in proper order using only legal moves.

(variation 4)

Legal Moves: Pick any 4 boxes, and shift the contents either left or right one box. We call this move a 4-cycle.(variation 5)

Legal Moves: Pick any 4 consecutive boxes (assume ends wrap around), and swap the inner two tiles and then the outer two tiles.(variation 6)

Legal Moves: Pick any 4 boxes, and split the contents into pairs. Then swap pairs.(variation 7)

Part I: The Swap Puzzle

The Parity Theorem:

For an arrangement of objects (permutation) if you can find a way to put the objects back in order using an even number of swaps, then it always must take an even number of swaps to put the objects back in order no matter how you do it.

Similarly, if it took an odd number of swaps to put the objects back in order then it always must take an odd number.

Fact 1: Swapping two boxes at a time (variation 1) is enough to solve any arrangement of the tiles.

Fact 2: 3-cycles are enough to solve any even arrangement of the tiles.

Part II: The 15 Puzzle

Game Play: Randomly arrange the tiles in the boxes then try to put them in proper order by sliding tiles around using the empty space.

Challenges:

puzzle 1 puzzle 2

empty

1 3

119

2

10

4

15 14

6

12

7

13

8512

1 2 3

6 7

9 10 11

13 14 15 16

4

85

empty

12 14

64

13

5

15

2 3

9

7

10

1

11812

1 2 3

6 7

9 10 11

13 14 15 16

4

85

Part II: The 15 Puzzle

Game Play: Randomly arrange the tiles in the boxes then try to put them in proper order by sliding tiles around using the empty space.

Challenges:

puzzle 1 puzzle 2

empty

1 3

119

2

10

4

15 14

6

12

7

13

8512

1 2 3

6 7

9 10 11

13 14 15 16

4

85

empty

12 14

64

13

5

15

2 3

9

7

10

1

11812

1 2 3

6 7

9 10 11

13 14 15 16

4

85

Worcester Evening Gazette

January 24, 1880Set of teeth, “the best”.

January 29, 1880teeth + $100

February 13, 1880teeth + $100 + $1000

Part II: The 15 Puzzle

BIG QUESTIONS:

1) Why is it impossible to solve the 15-14 puzzle?

2) Can any even arrangement of the tiles be solved?

Yes, since we can do any 3-cycle, and so from Fact 2, we can do any even permutation.

The permutation is odd

Part III: Rubik’s Cube

Other puzzles...

Let’s solve the cube...

Solve the edges is the first layer. This is known as solving the cross.

Solve the corners is the first layer.

Solve the edges is the middle layer.

Solve the corners is the last layer. Do this in two stages:

Solve the edges is the last layer. Do this in two stages:

1. 2.

3. 4.4(a) Place corners in the proper positions 4(b) Then twist them into the proper orientation.5.

5(a) Place edges in the proper positions 5(b) Then twist them into the proper orientation.

Let’s solve the cube...

Corner 3-cycle

( L D-1 L-1 ) U ( L D L-1 ) U-1

Double corner twist

( L D2 L-1 F-1 D-2 F ) U ( F-1 D2 F L D-2 L-1 ) U-1

Edge 3-cycle

( M-1 D-1 M ) U ( M-1 D M ) U-1

Double edge flip

( M-1 D M D-1 M-1 D2 M ) U ( M-1 D2 M D M-1 D-1 M ) U-1

left: ( D L D-1 L-1) ( D-1 F-1 D F )

right: ( D-1 R-1 D R ) ( D F D-1 F-1)

Let’s solve the cube...

Corner 3-cycle

( L D-1 L-1 ) U ( L D L-1 ) U-1

Double corner twist

( L D2 L-1 F-1 D-2 F ) U ( F-1 D2 F L D-2 L-1 ) U-1

Edge 3-cycle

( M-1 D-1 M ) U ( M-1 D M ) U-1

Double edge flip

( M-1 D M D-1 M-1 D2 M ) U ( M-1 D2 M D M-1 D-1 M ) U-1

All these moves have the form

αβα-1β-1

(moves of this form are useful in solving these types of puzzles)

Part IV: Rubik’s Cube and BeyondHow many ways are there to scramble the cube?

• cover the surface of the earth to a height of 15 metres

• red blood cells in human body 2 · 1012

• earths population 7 billion (7 · 109)• if each person put a cube into a new configuration

every second, for one year, only 2 · 1017 different cubes would be produced.

If every cube, for the past 30 years, assumed a new position every second, total number of configurations would be

[350 million] · [seconds in a year] · [30 years] = 3.3 · 1017

• 350 million cubes sold since 1980.

• lined up end to end would have length 250 light years

Part IV: Rubik’s Cube and BeyondUsing only these four moves (and some modifications) we can solve the cube.

Wouldn’t it be easier to just learn these 4 moves instead?

These 4 types of moves are IMPOSSIBLE!

The Parity Theorem:

For an arrangement of objects (permutation) if you can find a way to put the objects back in order using an even number of swaps, then it always must take an even number of swaps to put the objects back in order no matter how you do it.

Similarly, if it took an odd number of swaps to put the objects back in order then it always must take an odd number.

Fact 1: Swapping two boxes at a time (variation 1) is enough to solve any arrangement of the tiles.

Fact 2: 3-cycles are enough to solve any even arrangement of the tiles.

Back to the Swap Puzzle

Back to the Swap Puzzle

What is the parity of the following permutations?

a 2-cyclea 3-cyclea 4-cyclea 5-cycle

two 4-cyclestwo 2-cycles

odd

even

evenodd

eveneven

Impossible moves...

(group discussion about why these moves are impossible)

What are the chances that if you randomly reassemble your cube that it is solvable?

1 in 12

What is the maximum number of moves needed to solve ANY scrambled Rubik’s Cube?

Further Reading...

www.sfu.ca/~jtmulhol/math302