In Praise of Memorizing Algorithms

Published by MrHonner on

tao climbingA common debate in math education centers on the extent to which students should memorize things, like multiplication tables, the quadratic formula, or the division algorithm.

There are many sensible arguments against memorizing algorithms. While memorizing algorithms might produce good results in a typical math class, mathematics makes the most sense when it is understood as a coherent, interconnected system of thought. We want students to be resourceful and creative problem solvers, and this requires that students understand the context and the connections, not merely the steps, of the procedures they learn.

Occasionally this argument is taken to the extreme and teachers altogether discourage memorization of algorithms and procedures, claiming that it’s pointless for students to have the procedural knowledge without understanding the context.

While there is some merit to this argument, I was recently reminded how valuable it can be to blindly memorize algorithms.

A friend invited me to go rock-climbing, something I had never done before. We arrived at the gym, and my friend, an experienced climber, showed me how to identify the beginner trails on the wall and encouraged me to get climbing right way. Over the next hour I attempted a few trails, and met with more frustration than success.

After a particularly discouraging attempt, I sat down next to my friend to rest. He told me that he noticed I was getting stuck in the middle of the trail and was having difficulty finding the next hold. He suggested that I examine the trail before I start the climb and memorize the sequence of moves needed to make it to the top.

By memorizing the wall-climbing algorithm, I was freed from trying to do too many things at once. I could focus on developing the fundamental techniques — proper holds, balance, body position, different reaches — without worrying about what the next step should be.

Ultimately we want the ability to be on an unfamiliar wall, or in an unfamiliar problem, and have the confidence and skill to figure out what to do next. But this skill is really a combination of many skills, and it can be challenging, and frustrating, to try to develop them them all simultaneously.

Sometimes memorizing things — like a sequence of handholds, or the quadratic formula — can help us get to the top. And it can help prepare us for the day when memorizing won’t be enough.

Categories: Teaching

11 Comments

James Sheldon · June 18, 2013 at 11:33 am

It’s funny you should mention the quadratic formula. I asked some students of mine if they knew what a quadratic function was – and most of them could rattle off x= (-b+-sqrt(b2-4ac) ) / 2a but very few of them could come up with the ax^2+bx+c form — which is kind of needed in order to make the quadratic formula work. And when I asked them where that formula comes from – none of them had any idea.

If we had to choose between the two, I’d rather have them able to recognize a quadratic equation – and then be able to input it into a graphing calculator or CAS to find the roots – something visual, concrete, than to be able to be able to find the roots using a formula that totally baffles them.

Or… another example. We were looking at a parabola y=x^2 – and I asked students why it is symmetrical. A few students eventually said, because squaring the number makes both, say (-2)(-2) = 2 and (2)(2) = 2. So I asked them why a negative number times a negative number makes a positive number, and I got totally blank looks.

So they were basically just taking the negative times negative equals positive on faith- and had been for over 6 years – something that’s really scary to me in a math class. I met a prospective elementary school teacher at one point, and we were studying for the GRE together – and at one point he was having trouble remembering how to do +, -, and * with negative numbers – and in the resulting discussion, it became clear he had NEVER learned why those “rules” of negative numbers work.

Or … today I was talking to a friend about the common misconception that (x+y)^2 = x^2 + y^2. He looked at me and was like, “that’s incorrect?” If you memorize, say, (xy)^2 = x^2y^2 and don’t know why that works (xy)(xy) = (xx)(yy) … then you’re going to think that (x+y)^2 works the same way, and won’t stop to try it out…

I guess I’d like to see an example of when you would teach something through memorization first – like, something that really is better taught without any derivation, explanation, or justification…without any exploration or questioning. I fear that the quadratic formula might not be the right example – given how the derivation isn’t much more complicated than trying to memorize and use the formula…

    MrHonner · June 18, 2013 at 3:45 pm

    James-

    I doubt there is anything that is “better taught without any derivation, explanation, or justification…without any exploration or questioning”, but this is not the point I’m trying to make here.

    I think I’m writing more from the perspective of a learner than a teacher. Sometimes, a learner has to accept that real understanding takes time. Memorizing procedures can provide a way to move forward, and often times, moving forward can create context for understanding what wasn’t understood before. Memorizing should never take the place of understanding, but in some cases, it can be used to help develop it.

    Something that does come to mind as a teacher, though, is mathematical induction. Although clear and logical, the technique of proof by induction can be very difficult for students to understand. After exploration, questioning, and discussion, some students get it, but many don’t. But the form of the proof is something that they can execute and build upon, creating experience with the technique that eventually help them understand the nuances of the argument.

Sue VanHattum · June 18, 2013 at 1:06 pm

When I saw the title of this post, I was concerned. (Given the recent silly article in the New York Times, perhaps you can imagine why.) But overall, I like what you’re saying.

I am good at problem-solving, which is vital to math, and also have a very bad memory. When I was first teaching college math courses, I actually had to write the quadratic formula at the top of my notes, because I did not have it memorized. On the other hand, I tutor a young boy who is great at math, and he has both the problem-solving skills and a good memory. He uses them well together, and I can see that I would be able to do more if I remembered more.

I try to convince my students that it’s not about memory, because they often think that’s all math is. But I also tell them they’ll need to commit a few basics to memory.

    MrHonner · June 18, 2013 at 3:52 pm

    Sue-

    I had been kicking this around for a while, and when that NYT piece came out, I figured it was time. Glad to know you came in skeptical!

    I certainly don’t think a good memory is pre-requisite to being a good mathematician, but like with most other things, I’m sure it helps. But it’s never a substitute for understanding, not in the long term anyway.

Stephanie reilly · June 18, 2013 at 2:52 pm

This is a question I have struggled with this year. My department also is divided about in half between alg2 teachers who require the memorization of quad formula and those that don’t. I did not require my students to memorize it. I have the formula on the wall above the whiteboard and its on their HW and tests. My thinking is that some students really struggle with just applying the QF, figuring out what a,b,c are and plugging it in correctly and then simplifying the radical. The don’t need to go through all of this with the wrong formula because they didn’t memorize it correctly. As they use it over and over again, they will need to look at the formula less and less. I teach a mix of low to average students, for many of my students, this is the last math class they take before graduating HS. I think it’s kind of self-differentiating….the higher-level kids will naturally memorize it through use and it will be available in their head for their future math classes. The lower students will not because they are thinking so hard just about its use, but they are unlikely to need QF as they are done with math classes and heading into workplace.

    MrHonner · June 18, 2013 at 8:17 pm

    Stephanie-

    I understand your conundrum. While the quadratic formula is probably a good example of something many math teachers would insist students memorize, I personally don’t think it’s that important. I like exploring the quadratic formula in depth (its derivation; relation to the axis of symmetry; sum/product of roots; disciminant; extension to the cubic formula), but in the bigger picture I don’t really think it’s a big deal.

    In any event, what you are doing in your classroom sounds perfectly reasonable to me.

Rebecca Phillips · June 18, 2013 at 4:18 pm

Hear, hear! You cannot fully integrate knowledge and analyze concepts if you don’t KNOW them. The things we memorize – multiplication tables and algorithms – are the building blocks for more complicated, more abstract, more elaborate concepts.

    MrHonner · June 18, 2013 at 8:20 pm

    I’m not sure I’d go so far as to call these things “building blocks”, but they are definitely part of the structure of mathematical knowledge. Knowing how to execute certain procedures can allow us to develop experience and understanding of new things, which can then help us understand the procedures that got us there.

Mike Lawler · June 19, 2013 at 8:25 pm

I’ve been pondering the NYT article and your post here for a few days. The main outcome of this reflection has been coming to better understand my own math education, and what that journey looks like now looking backwards.

Many times I’ve heard people describe learning math as being similar to walking up stairs. You struggle to get up a step, but when you are on that step you can look back on the material that you now understand and wonder why you struggled. That always struck me as a pretty reasonable analogy – especially when I was in school.

Looking back, though, I might change the analogy a little. It seems now that my own experience learning math was more like filling up a plastic ice cube tray up with water. While the water is filling up one of the compartments, the water in that compartment doesn’t really make any connection to any other compartment. Eventually the compartment will fill up, though, and the water will start making connections to other parts of the tray. Eventually the whole tray will fill with water and everything is connected.

There are a lot of compartments in the math world, and a lot of different ways to fill up the tray. Some ways to fill it up might be more algorithmic. Others less so, or even quite the opposite. I’m not so sure that means one way is better than the other necessarily, and as you learn more, you’ll probably find that different approaches were much more connected than you ever thought.

Two specific examples in my own education came to mind.

The first is from high school where I met an unbelievably influential math teacher, Mr. Waterman. He taught a special class called Enrichment Math that was just fun topic after topic after topic. You could take the class every year, too, which made it even more fun.

Somehow or other through that class I ended up owning a book called “Mathematical Tables and Formulas.” I doubt such books even exist now – it was mostly log and trig tables. At the back, though, were pages and pages of interesting math formulas. One, in particular, caught my eye – the area of a triangle = A*B*C / (4 *R), where A,B, and C are the lengths of the sides, and R is the radius of the circumcircle.

It was such a neat formula, but that’s all it was. I didn’t spend any time trying to understand why it was true, I just found it fascinating how these different elements of a triangle could all be related to each other in such a beautiful way.

Fast forward to 2 years ago. Through teaching my own kids math, I’d gotten quite interested in education again. I thought it would be fun to start putting math videos for kids on youtube ( put our 1200th up today!). To get some practice lecturing again, I grabbed my old copy of Geometry Revisited and made youtube lectures about the first 2 chapters. The very first one was about the extended law of sines:

https://www.youtube.com/watch?v=M8jDdLTACG8

It was only while preparing for this silly little youtube lecture that I ever learned where that old geometry formula came from – more than 25 years after seeing it for the first time.

Looking back on it, I don’t think that memorizing this particular formula was a bad thing at all. It is a beautiful formula. It got me interested in math. There wasn’t a rush or thrill in learning the proof – it is amazingly simple actually. The joy came in seeing the formula for the first time.

The second example is from the end of college.

I studied math and physics at MIT and also was part of MIT’s Putnam team my senior year. Growing up in Mr. Waterman’s math class in Omaha left me with a love of contest math, and through that contest math I’d become pretty good at problem solving and working through difficult calculations.

Those math skills meant that I didn’t learn nearly as much “physics” as I should have in my physics classes – everything was about the math. My senior thesis was about the cosmic microwave background radiation and a possible explanation for some interesting characteristics in the data that was coming back from the COBE satellite back in 1992.

As usual, I just plowed through the math and come up with a bunch of equations. At the end of the year I sat with my thesis advisor, Ed Bertschinger, and went through my results. It amazed me that he could look at the equations and draw pictures and see structure – seemingly just by waving his hands in the air. He drew a picture in his chalkboard that matched almost exactly some numerical solutions I’d put together. How could he do that? It was truly amazing to me.

Now, 20 years later, I work for a large financial organization. A few months ago we were in the middle of a fairly interested deal in which a problem similar to this one came up:

Suppose you have $100 in an account and you expect the value of that account to grow by 5% per year. You will also take $5 out of the account at the end of every year. How much money should you expect to have in the account at the end of 5 years?

It turns out to be a problem where a simple approach can lead you astray. If you assume the account grows by exactly 5% per year, you’ll have $100 at the end. But the account won’t grow by 5% every year, rather each year’s return will come from some distribution with a 5% mean (assume, for fun, that your 5% expectation is right).

The Black-Scholes formula is pretty useful for this type of problem, but it is a difficult formula. If you understand the theory, though, the answer isn’t that hard and requires just a little hand waving – just like my old Physics professor did!

In the particular case of the deal we were working on, I did my little hand waving and suggested an answer to the problem at hand. No one in the room believed a word of what I was saying, but the answer I’d suggested did turn out to be pretty close. More importantly, the answer you get by assuming the stable 5% growth was far from correct and extremely misleading.

Again, when I was much younger, my understanding of how to solve problems and how to use math was pretty limited. It was also definitely algorithmic. As you get more experience, and as the water level in the tray keeps rising, you start to understand the meaning behind the algorithms. You don’t have to do so much calculating just to get to reasonably accurate answers.

Of course I agree that the point of a good mathematical education is not algorithmic thinking. However, spending a little time with algorithms along the way isn’t necessarily bad, and it isn’t going to prevent you from eventually getting a good understanding of a field if that’s what you want to do.

    MrHonner · June 20, 2013 at 9:10 pm

    Mike-

    Your reply should be a blog post of its own! Or several.

    Your tale about the triangle area formula resonates with me. There are lots of things I “learned” first and then understood later (sometimes, much later). One of the best things about being a math teacher for me is that I have that experience of seeing things in a new way all the time.

    And your interest-growth/withdrawal problem has definitely piqued my interest. That sounds like it’s worth a blog post or two, as well!

    Thanks for sharing. And congrats on your 1200th video!

Pooya · July 2, 2013 at 4:58 pm

The example that you’ve used is more fit for showing that sometimes you need to do more compile-time processing in order for a more efficient online algorithm.

Once you’re given the whole climbing problem, why not process it as a whole instead of solving it one grip at a time.

Leave a Reply

Your email address will not be published. Required fields are marked *

Follow

Get every new post delivered to your Inbox

Join other followers: