# Attain a particular configuration from a given initial configuration in a 3x2/2x3 board

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.

• Welcome to Puzzling Stack Exchange! In short, yes. This is a finite game.
– Sny
Commented May 1 at 11:29
• See this question for some hints towards a (non-optimal) solving strategy, and here or here for how to determine whether it is solvable or not. Commented May 1 at 12:30
• @JaapScherphuis I have read the exact questions you have mentioned before, however couldn't understand how they approached it. I wanted someone to help explain the solvable part with an example if possible. Commented May 1 at 12:39
• The simplest explanation is Deusovi's one here. Where are you having trouble? Commented May 1 at 12:45