The preface is the same as the well known 15 Sliding Puzzle/ 8 Sliding Puzzle. But this one is a miniaturized form of it with a 2x3 board. Given a initial configuration of the board and a final configuration of the board, can we tell:
(a) If the final config is "attainable" from initial config.
(b) Optimal steps to reach the final config (if attainable)
I know that one has something to do with no of of inversion pairs for a nxn game board. However what does one have to do for a mxn matrix? I have also seen some concept like "parity of permutation" being mentioned in a few places, but I don't understand how a transformation is done from the game board to that permutation, and how to use that to do when given an initial and final config and not just an initial config.