There are insoluble 8 puzzles, like 15 puzzles

I am developing a 15 jigsaw puzzle using javascript. Since half of the combinations in puzzle 15 are unsolvable, I use the formula at http://mathworld.wolfram.com/15Puzzle.html to check for solvability. I am currently adding the ability to switch to 8 puzzles (3x3). Are there insoluble combinations in 8 puzzles? If so, can I use the same formula for it?

+4
source share
1 answer

Yes, half of the configurations of the n-puzzle game are unsolvable, as indicated here and here . You can also apply the same criterion: the number of permutations inversions must be even.

+4
source

Source: https://habr.com/ru/post/1432442/


All Articles