I live in a great neighborhood and am fortunate to have some great neighbors. Two of these neighbors (a husband and a wife actually) are retired math instructors and we always have a good time having a glass of wine and discussing why the methods our schools use to teach our children math are totally antiquated and backwards.
Well yesterday I found both retired instructors at home scribbling madly on paper trying to solve a math problem which was supposedly intended for 6th to 12th graders (as both these retired professors taught math education their focus is on how to teach math to children and teens).
The problem was that neither of them could find a solution to this problem (which was apparently posted in books and other instructor materials as a difficult question).
I forgot the “story” that went with the problem (since, unlike when I went to school, you aren’t supposed to be able to learn math without “stories” now) but basically it had to do with a Seven Eleven gas station and finding 4 items in the store that were above $1 and less than $5 that:
Add together to equal $7.11 AND multiply together to equal $7.11.
It was late on a Saturday night after a long day of kids volleyball games, soccer games, 6th grade football, and the legendary Chili Cook-off and Salsa Competition at Westport Plaza so my mind was already mush and finding elegant solutions to 6th grade math problems wasn’t immediately something I jumped on. BUT…..I did think of how I could do this quickly and efficiently and not rack my brain beyond further use: C#, Console App, Brute force, about 5 minutes.
I’m sure their are accepted methods for solving this problem on paper (and one of my neighbors did find a solution last night sans C#) but I know my capabilities and the quickest path to a solution was firing up VS.NET, creating a C# console application, and, via brute force, working through permutations of numbers until I reached a solution.
It was kind of a fun little problem that eventually spit out over 200 solutions (many of which added evenly to $7.11 but multiplied to something that rounded to $7.11 (example: $7.106455). At one point I let my computer run for about 20 minutes and didn’t find any solution…then I realized I had a comparison error between a float and a double (as I’d accidently changed data types in the middle of my algorithm due to my haste). After a bit of refactoring my solution was a bit nicer and shot out 216 solutions. My neighbors have (at this point) found a single answer via the ol’ Pen/Paper method.
While we all found answers, the debate was began on which you would accept. If a student broke out VS.NET and threw together a sweet little app (which probably overstates the elegance of my solution) and then just turned in the answers he would not be given any credit as he didn’t show his answer (and I’m not sure providing source counts). I think solving problems via code is a skill in and of itself that unfortunately not enough kids know is possible. We all agree that computer instruction at most levels is about as lacking as math instruction (at least in the US :) but I told them I’d be the rebel sitting in math class with my Laptop :)