**Objectives**: Introduce the concept of Decomposition to students using a familiar activity. Decomposing large and complex tasks into more manageable sub tasks in a predictable and optimum manner is a fundamental concept and skill of computer science and in life.

**Logistics**: This activity is only intended to take about 15 minutes and is appropriate for any age level.

**Introduction activity**: Explain to students that, in the next 15 minutes, you will be virtually completing a complicated jigsaw puzzle. In the process, you will be thinking about the ways you solve big problems. You may have a strategy that you use without thinking about it much. Today, we are going to put that strategy into words and collaborate with your classmates to get even better at jigsaw puzzle solving.

**Lesson**: Form teams of 3-4 students. Assign each team a picture of a jigsaw puzzle to think about. These are large, complicated jigsaw puzzles that may have 1000 pieces and almost certainly take days to complete. Here are two good examples below:

Explain: “Opening a brand new 1000-piece puzzle can be a daunting challenge. There are 1000 pieces of seemingly infinite shapes and color patterns, and about half are upside down in the box. This can seem like an impossible task, or at least something that would take years to solve. But I bet many of you have solved complicated tasks like this.”

In their team discussions (~8-9 minutes), have the students write down the steps they would take to solve this puzzle, making notes on each step that makes the puzzle easier to solve and describe why this procedure makes their work more efficient.

After discussing in teams, bring the entire class back together to summarize what the teams talked about. Expect comments such as:

- turn all pieces so they are face-up
- separate out the edge pieces
- put the edge pieces together first (probe with questions like: Are there ways to make putting the edge pieces together faster, or more efficient? Answers: sorting into colors, putting corner pieces into place first, etc.)
- solving the middle of the jigsaw puzzle, sort pieces by colors
- solving the middle of the jigsaw puzzle, sort pieces by color and/or texture. Notice all the different textures of blues in the national parks puzzle.
- solve sub-parts of the puzzle at a time. For the popsicle puzzle, complete individual popsicles first, then attach them together to form ever larger sections of the entire puzzle. For the national park puzzle, solve individual patches first, then attach them together.
- Use the box or the picture of the completed puzzle? How many of you would use the box cover picture art to help you solve the puzzle? How would you use it? (As we get subparts of the puzzle constructed, the box can be used as a tool to tell us where in the grand scheme of things a patch or a popsicle fits. What patches are adjacent to what other patches and in what orientation. What popsicles are adjacent to other popsicles. etc.
- When solving each popsicle or each patch, similar strategies we have already discussed can be used. E.g., find the edges of the patch or popsicle first. Reduce the complexity by identifying relatively unique pieces like popsicle sticks, edges of patches, animals on patches, etc.
- Ask: “As we complete subsections of the puzzle, does the rest of the puzzle get easier, or more difficult?” (Expect a lively debate on this as it should get simpler as we remove pieces from the pile of incomplete pieces, but those remaining pieces are often nondescript and therefore more difficult to piece together). Use the idiom: “We have picked all the low-hanging fruit.”

Follow-up discussion: what if the puzzle was all painted white instead of no pictures. How would our tools for solving change? Would this take longer or shorter than the puzzle with pictures on it? Why?

**Summary**: Summarize the discussion by grouping their puzzle strategy tips into a collective idea of decomposing a daunting task into smaller and smaller subtasks. Have the students explain which subtasks went into solving an even bigger task. E.g., solving a single popsicle, or patch, then combining the popsicles or patches to form larger sections is a form of decomposition of a problem.

**Goal for understanding**: The type of task we have dictates the tools we can use to solve it. Not every problem can be broken down into simpler and simpler subtasks, but we should strive to identify and use as many of these optimizations as the problem will allow.

**Possible Follow-up Activity: Introduce the idea of recursion** (may be more appropriate for older students): When we solve a single popsicle or a single patch, we may identify the edges, find unique sections, and break each popsicle or patch into smaller subtasks. This is the same procedure we use to solve the entire puzzle (identify the edges, find unique sections, and break the puzzle into smaller subtasks).

In this way, we say that solving a jigsaw puzzle is a **recursive** activity. Recursion means using the same procedure over and over at different scales. By doing this we break a problem up into ever simpler problems of the same variety.

Another example of this would be: Counting backwards from 157.

You may not know how to count backwards from 157, but you could solve it like this:

Write the number 157, then count backwards from 156 (a slightly simpler problem).

then solve the count backwards from 156 by

Write the number 156, then count backwards from 155 (a slightly simpler problem).

then solve the count backwards from 155 by

Write the number 155, then count backwards from 154

and so on, until …

until you are left with a problem you absolutely know how to do, like:

count backwards from 1.

**Resource of interest**: “** Turtles all the way down**“: The saying references the idea of a World Turtle that supports the earth on its back. The old saying asserts that this turtle rests on the back of an even larger turtle, which itself is part of a column of increasingly large turtles that continues indefinitely (i.e., “turtles all the way down”).

**Classroom Environment Add On**: Have several difficult jigsaw puzzles around the classroom as often as possible. Students with more novice problem solving skills and less experience in decomposing daunting tasks into more manageable sub tasks will pick up these skills and experience the efficiency with which more experienced puzzlers tackle these challenges while working alongside them.