Algorithms and the Cardinal Directions

“Mr. Sheldon! Mr. Sheldon! You forgot a step.”

It couldn’t be true. This was my first time teaching a computational thinking concept to our sixth graders, and I’d obsessed over the lesson all night. The material was flawless, and yet, somehow, a dozen hands were raised, eager to point out my mistake.

Let’s back up a few steps and see how this moment of panic came to be. The previous day, our sixth grade Humanities teacher, Ms. Marcalow, realized that she had the perfect opportunity to plug some computational thinking ideas into her unit on the cardinal directions. Students were learning how to navigate from one country to another. For instance, to get from the United States to South Africa, one would travel east and south. Brazil to France was east and north. String a few of those together, and pretty quickly you’ve got a set of directions – or is it an algorithm?

Ms. Marcalow reached out to see if I would come in and introduce algorithms to her class the next day. Of course, I jumped at the opportunity. It just so happened that I’d recently practiced an activity on Graph Paper Programming at a Code.org workshop, and I thought with some slight tweaks it would be a perfect primer on algorithms using directions. I put together a quick deck with the definition and some examples, and created a worksheet in which a gold miner living in a simple 4×4 grid needs an algorithm to get him to a conveniently-placed pot of gold.

gold miner

In class the next morning, I recruited student volunteers to control my pantomime – our first example algorithm was coming up with the steps required to make a PB&J sandwich. “An algorithm is like a recipe,” I’d explained. We’d gathered our ingredients and a knife, laid out a cutting board and a plate, carefully spread peanut butter on one side (peanut butter first, so we don’t get jelly in the peanut butter jar) and jelly on the other, and had combined our two halves into one delicious sandwich. And yet, half the class was ready to propose another step, even after I had declared our success.

Our definition of an algorithm is “a set of steps needed to complete a task”. To me, the sandwich was our task, and it was complete – what could possibly come next? I hesitantly called on Natasha for another step.

“Enjoy it!”

It was so obvious. The outcome of our algorithm wasn’t a sandwich – it was getting to eat that sandwich.

After a few more examples, students had no problem putting on their prospector hats and finding pot after pot of gold. They learned that even though they often took different routes than their partners, their algorithms still uncovered the same gold. When the compass rose rotated ninety degrees and suddenly North no longer meant Up, they understood that algorithms often have to adapt to new circumstances.

Above all, our students learned the most important lesson of the day – computational thinking isn’t hard, and it isn’t new. Sure, when they were learning the steps for long division in elementary school, they likely didn’t think of it as an algorithm – but it is one, and now they know why. Our students have used computational thinking throughout their lives, and as they begin to recognize the strategies, they can do exactly what Natasha suggested – they can enjoy it.

Facebooktwitterredditmail

2 thoughts on “Algorithms and the Cardinal Directions”

Leave a Reply

Your email address will not be published.