Using Math to Solve a Jigsaw Puzzle