Invariant
Invariant
Invariant
1 2 3 4 1 2 3 4
5 6 7 8 5 6 7 8
9 10 11 12 9 10 11 12
13 14 15 13 15 14
A Chessboard Problem
Can a bishop move from its current position to the question mark?
?
A Chessboard Problem
Can a bishop move from its current position to the question mark?
Impossible!
?
Why?
A Chessboard Problem
Invariant!
Easy!
Domino Puzzle
Easy!
Domino Puzzle
Easy??
Domino Puzzle
Impossible!
Domino Puzzle
Then what??
Domino Puzzle
Yes??
Prove the Possible
Yes??
Prove the Possible
The secret.
Prove the Possible
The secret.
Fifteen Puzzle
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15
1 2 3 4 1 2 3 4
5 6 7 8 5 6 7 8
9 10 11 12 9 10 11 12
13 14 15 13 15 14
Initial configuration Target configuration
1 2 3 4 1 2 3 4
5 6 7 8 5 6 7 8
9 10 11 12 9 10 11 12
13 14 15 13 15 14
Initial configuration Target configuration
((1,2,3,…,14,15),(4,4)) ((1,2,3,…,15,14),(4,4))
For example, the sequence (1,2,4,5,3) has two out-of-order pairs, (4,3) and (5,3).
1 2 3 4 1 2 3 4
5 6 7 8 5 6 7 8
9 10 11 12 9 10 11 12
13 14 15 13 15 14
Initial configuration Target configuration
((1,2,3,…,14,15),(4,4)) ((1,2,3,…,15,14),(4,4))
Parity is odd
? ? ? ? ? ? ? ?
? a ? ? a ?
? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ?
? a b1 b2 ? b1 b2
b3 ? ? b3 a ? ?
? ? ? ? Row number has ? ? ? ?
changed by 1
? ? ? ? ? ? ? ?
? a b1 b2 ? b1 b2
b3 ? ? b3 a ? ?
? ? ? ? Row number has ? ? ? ?
changed by 1
? ? ? ? ? ? ? ?
? a b1 b2 ? b1 b2
b3 ? ? b3 a ? ?
? ? ? ? Row number has ? ? ? ?
changed by 1
Case 2: when a is the second largest, then the number of out-of-order pairs
will decrease by one, and since the row number is changed by one,
the parity is still the same. (The remaining case analysis is the same.)
Proving the Invariant
Parity of S = (number of out-of-order pairs + row) mod 2
? ? ? ? ? ? ? ?
? a b1 b2 ? b1 b2
b3 ? ? b3 a ? ?
? ? ? ? Row number has ? ? ? ?
changed by 1
1 2 3 4 15 14 13 12
5 6 7 8 11 10 9 8
9 10 11 12 7 6 5 4
13 14 15 3 2 1
Initial configuration Target configuration
1 2 3 4 15 14 13 12
5 6 7 8 11 10 9 8
9 10 11 12 7 6 5 4
13 14 15 3 2 1
Initial configuration Target configuration
Parity is odd.
Impossible!
Fifteen Puzzle
http://www.cs.cmu.edu/afs/cs/academic/class/15859-f01/www/notes/15-puzzle.pdf
K=4
x=0
There are three books on Mathematical Gems and all are excellent.
Covering with Trominoes
No, since the board has 64 squares and each tromino covers 3.
So, lets remove one corner so that the board now has 63 squares.