What a lovely independent discovery! The context is similar to the (un)solvability of the 15 puzzle.
https://en.wikipedia.org/wiki/15_puzzle#Solvability