Below left is the original configuration of a tile puzzle, where 15 tiles are arranged in a 4 x 4 grid, leaving one square unoccupied. Below right is an example of how you slide a tile to the adjacent, unoccupied square. (The alternative move could have been 15 going to the right, instead of 12 coming down.)
After some number of tile slidings on the original configuration, how many of the following 6 configurations are attainable?
Add the numbers below the pictures and give their sum as your answer.
For example, if you think <Picture 1>, <Picture 8>, <Picture 16> are attainable, give your answer as 1+8+16=25.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Define an inversion of a number n on the grid as:
"the number of numbers that are smaller than n that come after it when we read the table like the sequence depicted below".
Define distinguisher as (the sum of all the inversions of the numbers in the table) + (the row number of the blank tile) .
So, the distinguisher of <Original> would be 4. (= 0 + 4)
Consider moving the blank tile horizontally. It wouldn't affect the distinguisher.
Then consider moving the blank tile downwards, swapping with a number tile X , which was originally followed by three numbers a , b and c .
The only inversions that are affected by this movement is that of X , a , b , c .
Noticing that the sequence changes from a , b , c , X to X , a , b , c ,
If n of a , b , c are bigger than X , the sum of inversions of a , b , c would decrease by n .
Then, it means that 3 − n of a , b , c are smaller than X , which leads to an increase of the inversion of X by 3 − n .
The row number of the blank tile will increase by 1 .
distinguisher after = distinguisher before − n + ( 3 − n ) + 1 = distinguisher before + 4 − 2 n .
Then, moving the blank tile upwards would do exactly opposite of what this did.
This is getting quite complex, but we notice that the "parity"(odd and even) of the distinguisher doesn't change.
Therefore, all the distinguishers of possible pictures must have the same parity with <Original> .
Original.
The distinguisher is 0 + 4 = 4 .
.
Picture 1.
The distinguisher is 0 + 1 = 1 .
Hence, impossible.
.
Picture 2.
The distinguisher is 1 + 1 + 2 = 4 .
Hence, possible.
.
Picture 4.
The distinguisher is 0 + 3 + 6 + 9 + 0 + 2 + 4 + 6 + 0 + 1 + 2 + 3 + 4 = 4 0 .
Hence, possible.
.
Picture 8.
The distinguisher is 1 4 + 1 3 + 1 2 + ⋯ + 1 + 0 + 1 = 2 1 4 ⋅ 1 5 + 1 = 1 0 6 .
Hence, possible.
.
Picture 16.
The distinguisher is 2 + 6 + 4 + 3 + 3 + 0 + 5 + 3 + 0 + 0 + 0 + 1 + 0 + 4 = 3 1 .
Hence, impossible.
.
Picture 32.
The distinguisher is 5 + 1 + 3 + 7 + 2 + 0 + 1 + 7 + 5 + 1 + 0 + 1 + 2 + 1 + 4 = 4 0 .
Hence, possible.
We've already proven that if the distinguisher is odd, the arrangement isn't possible.
What we have to prove now is that if the distinguisher is even, the arrangement must be possible.
This is the sequence. For an arbitrary arrangement of a board that has an even distinguisher,
Find 1, 4 and 13. It shouldn't be too hard to stick them into the corner. Then arrange 2 and 3 like the image above.
You will see that it is possible to arrange 2 and 3 like the second picture. Do the same with 5 and 9.
Find 6 and stick it into the corner again. Arrange 7 and 8 like the image above.
You will see that it is possible to arrange 7 and 8 like the fourth picture.
Then next step is a bit tricky. Put 10 onto the (12 or blank tile)'s place in the <Original> picture, then move the blank tile to fit 14 into the corner. Then stick the 10 on the right of the 14.
It is easy to arrange them like the fifth picture.
Now we have a , b and c . They are either 1 1 , 1 2 or 1 5 .
Numbers 1 1 0 don't do anything about the distinguisher, as their inversions are all 0.
Write all the a − b − 1 3 − 1 4 − c 's and there are 6 possible arrangements:
11-12-13-14-15 (sum of inversion: 0)
11-15-13-14-12 (sum of inversion: 5)
12-11-13-14-15 (sum of inversion: 1)
12-15-13-14-11 (sum of inversion: 6)
15-11-13-14-12 (sum of inversion: 6)
15-12-13-14-11 (sum of inversion: 7)
And the parity of the sum of inversion of the sequence above is equal to the parity of the distinguisher.
Hence, only ( 1 1 , 1 2 , 1 5 ) , ( 1 2 , 1 5 , 1 1 ) , ( 1 5 , 1 1 , 1 2 ) are possible for ( a , b , c ) ,
which all can be neatly fit into their original places.
To make that arbitrary picture from before, we can just reverse our process.
Therefore, it is proven that if the distinguisher of an arrangement is even, the arrangement can be made from <Original> .
2 + 4 + 8 + 3 2 = 4 6 .