Difference Squares: A Magical Mathematical Sandbox

Mathematics can seem magical sometimes, intricate patterns can emerge from following simple rules in surprising ways. Like all good magic, it begs to be explained, which provides a very effective way to cultivate intrinsic motivation to do mathematics.

This is one of our all-time favorite math activities to explore. It goes by many names Diffy, “Difference Squares,” or you may have seen it at a Julia Robinson Math Festival where its called the “Difference Engine.” 

We’ve led explorations on this topic with people of all ages, 5-65+. As a teacher, it’s the kind of activity that you can come back to time and time again and learn something new each time you explore. 

Embrace the unknown, model taking risks, and NOT knowing it all!

For most, it may seem scary, the idea of exploring a mathematical context with your students when you may not know all the answers to the questions that may arise. This is normal. In fact, the flip side of that is, if your students never see you interact with mathematics that you aren’t totally sure about, they develop the false notion that mathematics is all about procedures and right answers. 

What’s special about this activity? 

  • Open Middle, and potentially open beginning and ending as well! “Choose your own Adventure”

  • Easy to differentiate for pre-k through college-level mathematics (one person is doing single-digit subtraction, while another may be coding or using algebra)

  • Provides an authentic mathematical context that motivates all 8 mathematical practices

  • Connects to *active research in mathematics

Lesson Overview:

  1. Play Difference Squares with dice

  2. Notice/Wonder about the results of their games

  3. Play Difference Squares by choosing the numbers, or explore another research question

  4. Extension: Code a Difference Square Bot on Scratch

Over the years we have introduced the context in a variety of ways, our favorite being as a game.

Game Launch

If you haven’t noticed yet, we love using games in math class. The benefits of launching this exploration as a game include...

  • Games are “branded” as fun

  • With games, taking risks and making mistakes are naturally part of the learning process

  • Can make doing something repeatedly seem effortless or even fun

  • Generate lots of examples that serve as the basis for exploring patterns, analyzing and modeling data

How to Play the “Game”

  1. Roll dice four times and record each number on a corner of a square

  2. For each pair of corners that are next to each other, find the difference between the two numbers (positive difference, AKA absolute value of the difference) and write it at the midpoint between the two numbers

  3. Draw a line connecting each of the differences to make a tilted square inside the original square.

  4. Repeat step 2 with the most recent set of 4 numbers

  5. Continue until you reach all zeros (if you don’t want to give it away that it always goes to zeros you could phrase this as continue until you get the same 4 numbers twice in a row)

  6. Whoever has the most number of squares wins (You could say players get 1 point for each square that’s filled out)

5 Point Difference Square.png

We made a Jamboard that has two different kinds of Difference Square Templates. Click below and then click on the three dots in the top right and make your own copy to edit as you see fit.

Differentiation 

  • For younger students, new to finding differences/subtraction, you can have students build the numbers with connector cubes and place the number of cubes next to each other to visually/physically find the difference.

  • Adjust the range of numbers they can “roll” using random number generators with different ranges, such as four-sided, ten-sided, or twenty-sided dice, or make a spinner use a digital random number generator.

Notice and Wonder

Once students have had enough time to play at least 3 or 4 rounds, you can bring the group together to discuss what they notice and wonder. 

Potential Notice and Wonder

  • It always goes to zero

  • Right before it hits zero, all the numbers are the same

  • If you see 0,N,0,N, you are only two steps away from all zeros

  • Does it really always go to zero?

  • What starting number had the most number of steps to get to all zeros?

  • Wonder what would happen if we used a triangle or pentagon to start instead?

  • Wonder what would happen if we used fractions, decimals, or other kinds of numbers?

  • Wonder what would happen if we did something else with the numbers instead of finding the difference?

A Garden of Forking Paths

This is where the path forks, depending on which rabbit hole and how deep you want to go. Let students work on a question that interests them, and if they’d like they can work with others with similar interests.

While it’s tempting to explore some of the variations like what happens if you use triangles or pentagons, or change the rules, I would hold off till you squeeze more juice out of the original context. Sometimes keeping the parameters tighter leads to more interesting discoveries.

We will elaborate on a few paths that we’ve found fruitful. However, you know your students best, so we can’t tell you exactly which path to take. 

Potential Questions to Explore

  • If you choose the numbers, can you find a set of starting numbers that makes a chain of more than 10 stages before it gets to all zeros?

  • What’s the longest chain you can create?

  • What’s the longest chain you can create with just zeros and ones?

  • How many different ways can you begin with just zeros and ones? 

  • Will you ever get a number other than 0 or 1 as the difference if you start with just zeros and ones? 

  • Can you make a flowchart that shows all possible paths to four zeros?

  • What’s the longest chain you can create with zeros, ones and twos?

  • What’s the longest chain you can create with numbers between 0-10, 0-100, 0-1000?

A Note on Choosing “ANY” Number?

At this stage you can have students play the game again, but now they can choose ANY number they want! 

What does ANY number mean? 

I’d suggest sticking to positive whole numbers at first.

Some students will naturally stick to nice numbers, say under 100, multiples of 10, etc. Other students will immediately jump to the biggest number they can think about or write down. Of course, those students will have to find the difference between those huge numbers, and will quickly realize that even those big numbers still drop down to zero quite fast. 

Expanding the Meaning of Any Number and the Tools Allowed

When it feels right, if students want to add negative numbers or fractions and decimals, go for it! Maybe this is the right time to introduce a new concept or skill, maybe not. 

Don’t be afraid to pull out tools like calculators, spreadsheets, or even using this as a motivation to code. This does not diminish the mathematical experience here, and in many cases can really enrich the students’ experience.

In fact, the last few times we’ve explored this with students we’ve used Scratch to code a Difference Square Bot that can run the numbers for us!

Computer Science Extensions

Level 1: Write a program in Scratch that asks the user for the four starting numbers and spits out the differences at each stage until it hits all four zeros, recording how many stages it takes to reach all zeros.

Level 2: Write a program that, given a range of starting integers between 0 and N, will try every possible set of four starting numbers, and record which set generates the longest chain.

Tip: Start With Pseudocode

I always like to start with having the students write some pseudocode, and then collecting ideas into a draft to help hone the programming work.

Extension Questions

  • What happens when you use fractions, decimals, or irrational numbers?

  • What happens to the length of your chain if you double all the starting numbers? What about multiplying all the starting numbers by a number N?

  • What can you say about a set of four numbers that wouldn’t ever reach all zeros? In other words, what would have to be true about the sequence of numbers in a difference square that never reaches zeros?

  • Can you find such a set of four numbers that would never reach all zeros? (If you give up, and want to see the solution, the best explanation we’ve found is from Dan Finkel of Math For Love, check it out HERE.)

*Active Research: Clausing, Achim (2018). "Ducci matrices". American Mathematical Monthly. 125(10): 901–921.