Tuesday, August 28, 2012

A Math Problem Revisited

One of the advantages of teaching in a learning center rather than a classroom is that I often get to see the same student at various stages of his or her academic life. A student who is in one of my precalc classes today was the very first student I ever taught. Back then it was number facts and place value. Today it's trig identities and parametric equations. While I haven't seen this student every year since first grade, we've reunited for key math events. We were together for whole number operations, met again for fractions, and stayed close through algebra and geometry. The opportunity to observe students over the entire length of their K-12 careers has been an incredible learning experience. It has given me a unique perspective regarding how children learn math and how various math programs succeed or fail in preparing students for each new stage of concept development.

One of the math classes I'm teaching combines problem solving with computer programming. The group is made up of 8th graders I had taught a few years back. They had participated in a math olympiad course. One type of problem that appeared frequently dealt with simultaneous equations. For example,

At the movie theatre, tickets cost $6 for adults and $5 for children.
A total of 24 people went to the movies and paid $128 for tickets.
How many children went to the movies?

At the elementary level, the students were encouraged to create a chart to keep track of the number of adults and children, and total cost. The process is simply an organized version of guess and check. The efficiency of this method is dependent on the extent of number sense developed by the students and the number of potential solutions.

I thought it would be interesting to revisit this type of problem four years later from a different angle. If we removed the constraint of the total number of people, would we be able to find the exact number of reasonable solutions to the problem? In this case, only positive integer values would be sensible since the problem deals with whole people.

We had done some hand graphing of linear equations, so I led the group in that direction. The students identified the variables and came up with an equation to graph, 6x + 5y = 128. They determined that there were 4 combinations of adults and children that would result in a total cost of $128. The graph showed that while there were an infinite number of solutions to the equation, only 4 solutions made sense in the context of the problem.

We then talked about other situations that would result in an equation of this type and developed the general equation, ax + by = c. Next, I challenged them to create a computer program that would find all positive, integer solutions of this generalized equation. From the graph, the students knew that we needed to test all x values from zero to some equation dependent maximum value. The students were familiar with programming loops and agreed that this would be the best approach. Here's the pseudo-code version of what the group invented.

var a:Number;
var b:Number;
var c:Number;
var x:Number;
var y:Number;
var nMax:Number = c/a rounded to the next highest integer;

for(all values of x from 0 to nMax)
y = (c-ax)/b; //rearranged equation in terms of y
if(we divide y by 1 and get a remainder of zero)
then y is an integer
this xy pair is a solution
store these values
y is not an integer
this xy pair is not a solution

So far so good. My students were very proud that they were able to work out the logic in this program. They had to figure out a way to calculate the maximum value of x, determine if a number was an integer, and decide what to do when y was an acceptable value. Each of these areas led to rich discussions and deeper connections. Our next step is to find a way to display our results in both graph and chart form. 
If I'm fortunate enough to teach these students a couple of years from now, perhaps I could challenge them to develop an algorithm based on parametric equations.

No comments:

Post a Comment

Thank you for visiting the Math Playground blog. We will read and publish your comment shortly.