Jigsaw Puzzles: Basic Number Theory Saves the Day
By: Joshua Siktar
Tags: Number Theory, Puzzle, Problem Solving, Mathematics, Factoring

Introduction

Whenever I go home for a holiday break (home for me is Pittsburgh, Pennsylvania, by the way), my routine tends to change from the normal, and while I like for my breaks to be productive, some more time for relaxation is inevitable. One activity of choice for me and my family as of late has been solving jigsaw puzzles.

I had customized and ordered a Shutterfly puzzle of our family’s cats as a Mother’s Day present in 2020. We didn’t have time to put it together back in May, so we decided to open it up this weekend and give it a shot. We sorted out all of the “border” (edge and corner) pieces of the puzzle in order to put together the border first. In doing so, we realized that some border pieces were missing, even though all the border pieces that had been sorted seemed like they fit together. In this article I’m going to detail how I used some basic number theory to figure out how many border pieces were missing, and which portion of the border they belonged to (top, left, bottom, right).

Picture of our partially solved jigsaw puzzle, with only the outer frame in place

Solving the Puzzle

The puzzle, when fully solved, has 520 pieces. I made the assumption that the puzzle can be modeled as a rectangle of unit cells: that is, the completed puzzle looks like a large grid of tiny squares fit together. when viewed from afar. With this assumption, I figured there was certain number of “rows” of pieces, and also a certain number of “columns.” That piece of information, along with knowing the total number of pieces, effectively turned the mystery at hand into a number theory problem.

I counted the number of pieces included in each part of the border of the puzzle (the corners get counted twice):

The top row had 25 pieces The bottom row had 24 pieces The left column (side) had 19 pieces The right column (side) had 20 pieces

Since I assumed the puzzle took the formation of a rectangle of many small pieces, I was looking for two positive integers that multiplied to 520 (one for the length, and one for the width). One of those numbers had to be at least 25, since the top row had 25 pieces. The other number had to be at least 20, since the right side had 20 pieces. I quickly calculated 25 x 20 = 500, so I figured the numbers I needed were close to 25 and 20. Then I noticed I was 20 off from the grand total of 520 pieces, and if I added one to the 25, I got 26 x 20 = 520. That means the finished puzzle should probably have 26 columns, and 20 rows.

This suspicion was verified by the following: when I dug through the pieces that had not already been fit together, I found 4 more border pieces in the box. If the puzzle was indeed a 26x20 puzzle, that would mean 1 piece was missing off the top row, 2 pieces were missing off the bottom row, and 1 piece was missing from the left column. Of course these numbers don’t make sense if one of the corner pieces was missing, but I could easily see that was not the case.

After a bit of trial and error, I was able to fit the four “missing” pieces into the border of the puzzle. It turns out the original configuration of border pieces looked correct but was slightly off in a few spots, which ultimately made room for the remaining border pieces.