Algorithmic Thinking and Metacognition

I’m teaching a math camp for students entering 6th grade. It’s my first time being the teacher of record for a course, and luckily it only took a few minutes for my anxiety to subside. It’s a small group – only 9 kids – so it reminds me of my days being a camp counselor, except now it’s talking about math with very advanced kids for 3 hours a day. It’s been a blast.

The second half of each day is spent discussing aspects of graph theory. The nice thing about graph theory is that a lot of the problems can be phrased in natural, applicable ways, and you don’t need too much vocabulary to discuss it. The first few days were spent getting kids familiar with the terminology, the types of graphs you might see, and playing some games on graphs to get a feel for them. Overall this was a pretty big hit.

The last thing we did this past week was a bit more complicated, and required kids to examine their own intuition more deeply than they are used to. We were discussing a topic called spanning trees. Imagine a set of cities, and you want to have trains running so that if you start at any city, you are able to take a sequence of trains to get to any other city. However, you don’t want any extra routes. That is, if you start at city A and want to go to city D, the only (reasonable) way back is to retrace your steps. Mathematically, we say there are no cycles in the train network.

With this new information, if I gave you a set of points representing these cities, you could easily find a set of train tracks connecting the cities that satisfy my two constraints above. It’s not too hard. Similarly, if I gave you a set of tracks already in place that connected the cities, but had some redundancy we wished to avoid, you could remove any necessary tracks to form a spanning tree without too much trouble. I say this confidently because my students solved both of these problems quite well.

It’s at this point where we run into the difference between young and mature minds. If I asked you to describe the process you took to find your set of train tracks, or how you chose to remove some, and perhaps asked for a little explanation as to why it should work, you probably wouldn’t need too long to come up with a reasonable set of steps your brain went through. In the case of having a set of cities and needing to add in train tracks, my method would be as follows:

  1. Pick any city to start.
  2. Add in a train track from that city to another city that has no train tracks connected to it. That’s your new city.
  3. If all cities are connected, you’re done. Otherwise, repeat step 2.

Odds are, you intuitively thought about it in a similar fashion, and could probably recreate these steps with a bit of prompting. What I just wrote out is an algorithm, which is an explicit set of steps that, when followed exactly, accomplish a particular task or solve a particular problem. Computer code is just a conglomeration of various algorithms solving a bunch of small problems, and then you combine those small-scale solutions in complex ways to solve bigger problems. Yet in total, they are just specific steps that a computer can follow.

My students have trouble with such algorithmic thinking for two main reasons. First, they often lack the vocabulary to fully express their ideas. Second, and more importantly, they lack the ability to examine how they think. Doing so is called metacognition, and it’s an incredibly important ability to work on throughout your time in school, as it allows you to self-reflect and grow. My students are capable of roughly describing what they did for a particular graph, and the explanation often goes like this:

I started here (points) and then I needed to add a bunch of edges, so I drew them like this, and this, and this. And it made a spanning tree, so it works!

Of course I understand them, and can relay that solution onto a whiteboard and confirm that it is indeed a solution. But then comes the hard question: Why did they start at that vertex, and why did they draw in edges in a particular way? Did they notice any similarities in how they approached problem 1 and problem 3?

It is not a young student’s strength to consider what led them to particular actions. Whether it’s drawing edges on a graph, or why they decided to throw that eraser, they lack the ability to examine the causes of what they do. This can be quite frustrating for both the teacher and the student, but it’s what we need to help them train their minds to do.

Now, once they are capable of understanding some of these causes – whether it’s provided by an annoyed teacher, or actually discovered by the student themselves – they are now faced with the task of adjusting their behavior and drawing conclusions from those causes. Because my students had a hard time thinking about why they were approaching problems the same way, and weren’t sure how to examine their thought process, they had an incredibly difficult time verbalizing an algorithm that might work out.

Once I explained the thought process behind algorithms, and worked backwards from our goal, they took to it better. But it’s still an uphill battle. Consider the last time you deeply thought about how you view the world, how you decide what to do each day, how you make decisions. If you don’t do that, you’re much closer to 13-year-old you than you may want to confess. It’s an ongoing habit to build, a muscle that must be exercised. That’s why I love writing and I love mathematics; they both work the same part of my brain that examines the other parts of my brain responsible for solving problems. At times it’s a fractal of thought, but it’s important to keep your grasp on it.

When I first heard about metacognition, it was from some assignment a friend was doing in college. As usual, when given a task by an authority figure, you begrudgingly do it without too much thought about why it’s being done. This is the downside: the instructor is in the position of knowing this is a good thing to consider, and tries to give the student every opportunity to make use of it, but in the end it’s up the student as to whether they will come away from the idea any better than before. For me, I let it mull inside my head for a while. I always knew that self-reflection was important, and practiced it in various ways, but metacognition took a more powerful approach to the concept for me. Being able to think about how you think is a measure of consciousness and awareness of every aspect of your life. I’m not always great about it, but I work on it because I find it helps me be more accomplished in the projects I choose to take on. Perhaps it can do the same for you.

Leave a Reply