Tuesday, January 31, 2012

Why Math is Hard

There has been a lot of buzz around using "technology" for math education. Specifically, I have heard more people talking about using computer programming to teach math. While I think there are some real benefits to this, there are some major drawbacks if we just take the old methods and apply them to programming. Consider the standard algorithm for adding two positive integers:

  • Start with the ones place. Add these. The result will be one or two digits.

  • Take the ones place for the result and make it the ones place for the sum.

  • Move to the tens place and add the digits. If the result from adding the ones was two digits, add this as well.

  • Process the results for the tens place in the same way the result for the ones place was processed.

  • Continue this process for each digit in the two numbers.

  • Don't forget to add the carry digit at the end, if there is one.



WOW! No wonder kids hate math!

If you don't believe me, this is a snippet of the 75 lines of JavaScript code needed to add two numbers using this algorithm (this uses a bunch of helper functions and a 10-digit addition table):

function add(a, b) {
var digit = 0;
var carry = 0;
var sum = 0;
while (digit < numberOfDigits(a, b)) {
var result = addSingleDigits(getDigit(a, digit), getDigit(b, digit));
if (carry > 0)
result = add(result, carry);
sum = setDigit(sum, digit, ones(result));
carry = tens(result);
digit++;
}
if (carry > 0)
sum = setDigit(sum, digit, carry);
return sum;
}


OK, so this could be trimmed with some clever programming tricks, and it should be made more efficient in special cases, but it is still a monster algorithm for just a simple operation. I'll happily send the full code to anyone who really wants it. By the way, binary calculations done by the most simple electrical circuits work in almost the exact same way.

Other arithmetic operations are no better. Think about the algorithms you use to multiply, divide or simplify fractions. Then add decimals and negative numbers.

If education is to move in this direction, we should think about how to simplify calculation algorithms into more logical, less comprehensive systems. Do people really need to add $473991 and $47838, or do they just need to know whether this means $500,000 instead of $1 million? Of course not!

Is it even important for kids to be able to describe and apply such an algorithm in plain language?

I think the answer is yes, due to the complex nature of the systems in modern society, but we should be providing tools to allow students to do this without the unnecessary complexity of the medium provided. I envision a sort of computerized graphic organizer that can allow students to express their thoughts through a path of least resistance. This is an education issue, not a technology one (the technology is easy).

As with so many of these initiatives, more work is needed on developing thoughtful learning tools before they are technologized so that kids can spend more time staring blankly at a screen.

No comments:

Post a Comment