# sliding-tile puzzles - suny...

TRANSCRIPT

The 15 Puzzle

Modern version

The tiles are held in the tray

with a tongue-and-groove system.

Traditional version

The tiles are loose. They

can be dumped out and replaced.

2

Observation:

From any starting arrangement, there is a sequence of moves that leads to

either

or

S S ′

There is no sequence of moves that leads from S to S ′.

3

Conjecture:

An arrangement T is reachable from the standard

ordering only if T represents an even permutation of

[1, 2, 3, 4, 5, . . . , 15].

4

Conjecture:

An arrangement T is reachable from the standard

ordering only if T represents an even permutation of

[1, 2, 3, 4, 5, . . . , 15].

Definitions:

An arrangement represents a permutation

[a1, a2, . . . , a15] when the numbers appear

in that order, reading left to right, top to

bottom, skipping over the blank.

4 10 15 96 7 123 11 1 82 5 14 13

[4, 10, 15, 9, 6, 7, 12, 3, 11, 1, 8, 2, 5, 14, 13]

5

Definitions:

A move consists of sliding an adjacent tile into

the blank space.

An arrangement T is reachable from an arrange-

ment S if there is some sequence of moves that

transforms S to T . Reachability is clearly an

equivalence relation.

Observation:

Two arrangements that differ by a horizontal

move represent the same permutation.

Only a vertical move changes the permutation.

4 10 15 96 7 123 11 1 82 5 14 13

4 10 15 96 7 123 11 1 82 5 14 13

6

Question:

What does a vertical move do to the

permutation?

4 10 15 9 6 7 12 3 11 1 8 2 5 14 13

4 10 15 9 6 7 1 12 3 11 8 2 5 14 13

Answer:

The permutation induced by a vertical move

is always a 4-cycle.

4 10 15 96 7 123 11 1 82 5 14 13

4 10 15 96 7 1 123 11 82 5 14 13

8

Result:

An arrangement that is reachable from the

standard starting arrangement represents

• an even permutation if the blank is in the

second row or the fourth row; and

• an odd permutation if the blank is in the

first row or the third row.

Corollary:

Any arrangement that has the blank in the bottom row and can be reached

from the standard starting arrangement must represent an even permuta-

tion of [1, 2, 3, . . . , 15].

1 2 3 45 6 7 89 10 111213 14 15

9

Harder question: Can every even-permutation arrangement be reached

from the standard starting position?

10

Harder question: Can every even-permutation arrangement be reached

from the standard starting position?

Answer: Yes.

• Edward Spitznagel, Jr., “A New Look at the Fifteen Puzzle,”

Mathematics Magazine, 1967

• Richard Wilson, “Graph Puzzles, Homotopy, and the Alternating

Group,” Journal of Combinatorial Theory (B), 1974

• Aaron Archer, “A Modern Treatment of the 15 Puzzle,” American

Mathematical Monthly, 1999

• Keith Conrad, “The 15-Puzzle (and Rubik’s Cube),” on-line notes,

2016

• S. Muralidharan, “The Fifteen Puzzle–A New Approach,”

Mathematics Magazine, 2017

11

Claim:

Given any even permutation σ of [1, 2, . . . , 15], there is a sequence of moves

that transforms the standard starting position to an arrangement repre-

senting σ with the blank in the lower-right corner.

12

Claim:

Given any even permutation σ of [1, 2, . . . , 15], there is a sequence of moves

that transforms the standard starting position to an arrangement repre-

senting σ with the blank in the lower-right corner.

Proof sketch:

Lemma 1: (Textbook exercise) The alternating

group A15 is generated by

(1 2 3), (1 2 4), (1 2 5), . . . , (1 2 15).

Lemma 1′: The alternating group A15 is gener-

ated by

(13 14 15), (12 14 15), (11 14 15), . . . , (1 14 15).

13

Proof sketch, continued:

Lemma 2: For an arrangement with the blank

square in the bottom row, there is a sequence of

moves that cyclically permutes the three tiles in

the bottom row, and leaves all other tiles fixed.

1 2 3 45 6 7 89 10 111213 14 15

1 2 3 45 6 7 81112 1510 9 13 14

1 2 3 45 6 7 81112 1410 9 15 13

1 2 3 45 6 7 89 10 111215 13 14

14

Proof sketch, continued:

Lemma 3: For an arrangement with the blank square in the bottom row,

there is a sequence of moves that leaves the two rightmost tiles in the

bottom row fixed and replaces the remaining bottom-row tile with any

other tile.

Idea: Walk the blank around a non-self-intersecting closed path enough

times to advance the target tile into the “13” position.

1 2 3 45 6 7 89 10 1112

13 14 15

1 2 3 45 6 7 89 10 1112

13 14 15

15

Proof sketch, conclusion:

1. By Lemma 3, we can move any tile x other

than 14 or 15 into the 13 spot.

2. Using Lemma 2, we cyclically permute the

three tiles in the bottom row.

3. We reverse the moves we made in (1). This

returns all tiles except 14, 15, and x to their

original positions. We have effected the per-

mutation (x 14 15).

4. By Lemma 1′, the set of permutations

{(x 14 15) : x = 1, 2, . . . , 13} generates the

alternating group A15.

1 2 3 413 9 7 810 5 1112

6 14 15

14 15 6

1 2 3 45 14 7 89 10 1112

13 15 6

16

History of the 15 Puzzle: The 15 Puzzle, first appearing in late

1879, became a craze throughout the first

quarter of 1880.

In February and March 1880, articles and

letters about the 15 Puzzle appeared al-

most daily in newspapers from Boston to

Chicago and beyond.

The novelty:

With the tiles placed haphazardly, the puzzle is

sometimes (relatively) easy, and sometimes im-

possible.

17

“15”

The Diabolical Invention of SomeEnemy of Mankind.

. . . A gentleman saw one in the store, and it looked sosimple that he took it home to amuse the children. In tenminutes . . . he was oblivious to all outward things, and wenton, hour after hour, moving the little blocks of wood withthe feverish intensity of a madman. . . .

. . . To-day there is hardly a pleasant home in the city thathas not the dark shadow of “15” across its threshold.. . .

. . . Occasionally some one will get the fifteen numbers inthe proper order, but his elation is short lived. To save himhe cannot tell how he did it, nor can he do it again. Alltheories are wrong and experience is of no avail.. . .

18

More history:

About a decade after the 15-puzzle craze, the famous

puzzlist Sam Loyd let it be known that he had in-

vented the puzzle. He is credited with its invention

in The Dictionary of American BiographyThe Encyclopedia BritannicaScientific American columns by Martin GardnerMathematics papers by Archer and Spitznagel . . .

19

More history:

About a decade after the 15-puzzle craze, the famous

puzzlist Sam Loyd let it be known that he had in-

vented the puzzle. He is credited with its invention

in The Dictionary of American BiographyThe Encyclopedia BritannicaScientific American columns by Martin GardnerMathematics papers by Archer and Spitznagel . . .

In 2006, Slocum and Sonneveld showed that Loyd

did not invent the 15 puzzle (or Parchesi or “Pigs

in Clover”), and that the actual inventor was prob-

ably Noyes P. Chapman, who was the postmaster

in Canastota, New York.

20

Variations:1 2 3 45 6 7 89 10 11

12

34

56

78

910

11

??

107

41

118

52

96

3

Hans Liebeck’s

quarter-turn challenge

Answer

Clockwise: Yes

Counterclockwise: No

21

Card Trick:

Lay out eleven cards in a 3-by-4

array, in order, on a tray.

Make some sequence of moves to

scramble the cards.

26

Card Trick:

Lay out eleven cards in a 3-by-4

array, in order, on a tray.

Make some sequence of moves to

scramble the cards.

Hand the tray to your victim

(Liebeck’s word), giving it a

half-turn as you do so.

Watch your victim try to restore

the cards to their natural order.

27

References:Solutions

• Aaron F. Archer, “A Modern Treatment of the 15 Puzzle,” American Mathematical Monthly,November 1999.

• Keith Conrad, “The 15-Puzzle (And Rubik’s Cube),” on-line notes, December 2016.

• S. Muralidharan, “The Fifteen Puzzle–A New Approach,” Mathematics Magazine 90, 2017.

• Daniel Ratner and Manfred Warmuth, “Finding a Shortest Solution for the n × n Extensionof the 15-Puzzle is Intractable,” AAAI-86 Proceedings, 1986.

• Edward L. Spitznagel, Jr., “A New Look at the Fifteen Puzzle,” Mathematics Magazine, Sep-Oct 1967.

• Richard M. Wilson, “Graphs Puzzles, Homotopy, and the Alternating Group,” Journal ofCombinatorial Theory (B) 16, 1974.

History

• Jerry Slocum and Dic Sonneveld, The 15 Puzzle: How it Drove the World Crazy, The SlocumPuzzle Foundation, 2006.

Variations, Card Tricks, and so on

• Hans Liebeck, “Some Generalizations of the 14-15 Puzzle,” Mathematics Magazine, Sep-Oct1971.

28