15 puzzle group theory - The 15-puzzle is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing.  The object of the puzzle is to place the tiles in order by making sliding moves that use the empty space.
Question: A man trying to solve a 15 puzzle accidentally drops two pieces. In how many ways can he ﬁt the two pieces back into the three available empty spaces, so that the resulting position can be solved?
I know that the corresponding permutation of the entire puzzle must be even. I also think that it is wise to assume we are in a solvable position for the pieces to be dropped. I just can't figure out how to answer this question.
 A: Say the three open squares are A, B, and C, and the two pieces that fell were the ones that were in squares A and B. 
he can put the two pieces back in 6 ways:
AB- (piece that was in A goes back in A, and piece that was in B goes back in B)
A-B (piece that was in A goes back in A, but piece that was in B goes back in C)
BA-
B-A
-AB
-BA
Now, clearly AB- is solvable, since that's how the pieces were in originally, while BA- is not, since that one is one inversion from a solvable state. But what about the others? Well, A-B could be solvable (e.g. Imagine that C was right next to B). But if A-B is solvable, then B-A is one inversion away from that, and therefore unsolvable. In other words, exactly one of A-B and B-A is solvable ... we just don't know which one. Likewise, exactly one of -AB and -BA is solvable. In fact, we don't even need to assume that the board was solvable before the two pieces fell ... all we need is that out of AB- and BA- exactly one is solvable. Therefore, out of these 6 possibilities, 3 will be solvable.
