I am developing a 15 puzzle sliding puzzle game using JavaScript. As half of the combinations in a 15 puzzle is unsolvable I use the formula in http://mathworld.wolfram.com/15Puzzle.html to check the solvability.
I am currently adding the option to switch to 8 puzzle (3×3).
Are there unsolvable combinations in 8 puzzle too? If so can I use the same formula for it too?
I am developing a 15 puzzle sliding puzzle game using JavaScript. As half of
Share
Yes, half of the configurations of a n-puzzle game are unsolvable as stated here and here.
Also you can apply the same criterion: the number of inversions of the permutation shall be even.