Saturday, 28 February 2009

Pancakes on My Mind

There is a nice solution in the comments of my last post by Nate to show that the stack of pancakes never needs more than 2n-3 flips.... but then he adds, "The optimum (or most flippant) arrangement which would require the most flips could be found by working backward from the last flip. " .... hmmmmm, I wasn't sure, so I set about trying his theory will small stacks I probably wouldn't mess up... By Nate's method, there will be a stack of four pancakes with 2(4)-3 = 5 flips necessary... and using his inversion process, 1234, would be the fifth step, so 2134 was the previous, or fourth step, and 3124 the step before that. The second step would be 1324, and the first step would be to 4231, so we must have started at 2431... But it concerned me that I had no proof that the "flip the largest to the top, then flip the whole stack to get it on the bottom" method was ALWAYS the best strategy. For instance, if we start at 2431, we could flip the top three to get 3421. Then if we flip the top two, we would have 4321, and finally flipping the whole stack, we are home to 1234...in only THREE moves, rather than five.

Now the shocker. Not only does the method not always produce the fastest results, the 2n-3 is an upper boundary on the number of flips, but it may not always be the maximum. I think it is for three pancakes, but it seems that for almost any other number of pancakes, you need less than 2n-3 for the most difficult stack.

After investigating furthur, it seems that 2n-3 is almost always more than the number of flips needed. At the Mathworld site, they have a nice table that shows the number of possible ways of stacking the pancakes that require any given number of flips to sort.

The table agrees that any stack of four needs no more than four flips, and even a set of five, needs no more than five flips... Which brings me back to Nate's creation. He thought that 31542 would take seven steps to sort, but the Wolfram site suggest it should not need more than five. So today's question, is can you do it in five ??? (or less???).. good luck

Tuesday, 24 February 2009

A Pancake Day Problem


Shrove Tuesday is a term used in several countries for the day preceding the first day of lent. I learned from Wikipedia that " The word shrove is the past tense of the English verb shrive, which means to obtain absolution for one's sins by way of Confession and doing penance. Thus Shrove Tuesday gets its name from the shriving that English Christians were expected to do prior to receiving absolution immediately before Lent begins.

Shrove Tuesday is the last day of "shrovetide", the English equivalent to the Carnival tradition that developed separately in countries of Latin Europe. The term "Shrove Tuesday" is no longer widely known in the United States outside of Liturgical Traditions, such as the Lutheran, Episcopal, and Roman Catholic Churches. [3][4] because of the increase in many immigrant populations and traditions since the 19th century. "Mardi Gras" is much more widely-used. The festival is widely associated with the eating of foods such as pancakes, and often known simply as Pancake Day, originally because these used up ingredients such as fat and eggs, the consumption of which was traditionally restricted during Lent."

I found out that some call the previous saturday, "Egg Saturday", and the monday before Shrove Tuesday is known as "Collop Monday" (A collop is chunk of meat or fat), and the cool mathword on the Sunday before is "Quinquagesima Sunday" which means the fiftieth day; Easter then, would be the first day in the string.

So here is the problem... I cooked up a bunch (call it n) of pancakes for pancake Tuesday, but the stack was not as neat as I wanted. I really wanted them to be stacked with the largest diameter on bottom and the smallest on top. I decided I wanted to restack them by inserting the spatula into the stack somewhere under the top x of them, and flip them over on top of the n-x below. Using only this process, what is the maximum number of times I would have to flip cakes to get them in my preferred order, no matter how they had been originally stacked?

Now pass the maple syrup someone, please?

Sunday, 22 February 2009

Two Nice Questions


I have talked before about Dave Marain's web site at Math Notations. He has a new contest for grade ten and under that has a wide enough span of problems that it even attracks some middle schoolers. If you teach in the grade eight to eleven range, you might want to drop in, and perhaps participate. He covers some nice stuff.

In particular, he posts a Math Problem of the Day (with a solution) and all the ones I have seen have been really interesting challenges. Good for bright kids who need a challenge that textbooks often don't offer. One of the problems from his last contest illustrates a nice property that too few teacherx and students know about quadratics.
The question was:
" The graphs of y = 2x+3 and y = -x2 + bx + c intersect in 2 distinct points P and Q, where P is on the y-axis. Let V denote the vertex of the graph of the parabola.

(a) Determine all values of b for which the points Q and V coincide.
"

Most students who are at all clever know that the constant term, c, of a quadratic will give the y-intercept, and if you ask them what happens when you change "c", they will tell you it just moves the whole graph up or down without changing the shape. So if the two points intersect on the y-axis, they must have the same constant term.. ie, that the c term of the quadratic must be 3.
When asked what the A term of a quadratic does the usual answer is that it makes the quadratic "narrower." I really don't like this answer for several reasons. I hope students, even those who say the curve is "narrower", realize that it has a domain from negative to positive infinity, and therefore it never gets "narrow". What they mean, I hope, is that it goes up more quickly for larger values of A. and less quickly for A values closer to zero.
When you ask them about B, they are often less certain. They may tell you it moves the vertex (or the graph) left or right, and maybe they can even give a specific distance (someting about h==b/2A) but in fact there is a little more happening than that. In the image above, the red line is the locus being traced by the vertex as the variable b is animated and a is held as -1, while c=3. It looks quite clearly as if it follows a parabolic path with a leading coefficient that is the negative of the original function, and a vertex at the y-intercept. The confirmation of this should not be beyond a good Alg II, pre-calc student.

A couple of days ago Dave also posted a "Problem of the Day" about a regular dodecagon that got me thinking about a problem I haven't worked out yet. A regular Dodecagon for the Greek Impaired student is a twelve sided polygon. Think of a clock face with all the hour marks connected in sequence. What was given in the problem, is that if you draw a chord from any vertex, to the vertex four hours away, the length of this segment squared is the area of the dodecagon. Ok, I didn't know that. The proof was a pretty easy use of pre-calc tools, primarily the law of cosines and areas of isosceles triangles... but ... I wondered, how often does that happen? How often does a chord between two vertices of a regular polygon represent a quadrature of the figure (the square root of its area)... and what if we allowed easy extensions of this...(ie from a vertex to a midpoint of some edge).



Anyway, a big point, Dave's Problems of the Day are pretty good for provoking mathematical thought in students and teachers, so check them out.

Tuesday, 17 February 2009

Why Bother with Vectors?



The question in the title came from a fellow teacher who had set in on a class in which I was laying the first foundations of what would be several weeks of focus on vectors. Here is part of an answer:

Teacher: So, you took a year of geometry and two years of algebra, right?
student: That's right, Sir (my kids talk nice)
Teacher: So what can you tell me about any two points in space?
Student: Well, they determine a line, I guess..
Teacher: Good, and if I gave you the coordinates of the two points, could you write the equation of the line?

Student: (enthusiastic now, been here, done this)... Sure!

Teacher: Ok, let one be the point at (1, -2, 7)... and the other be at (3, 1, 5)
Student : (totally confused, now).. Huh... what is that.. you have too many numbers...

Ok, that never happened, but if you want it too, just repeat the teacher part with any bright Pre-calc student and I bet they will fill in the details, maybe even with the "Sir" (or Mam as the case may fit)...

I have wondered for a long time at the overemphasis of the slope-intercept form and the almost total exclusion of functions of more than one variable. So for the next few blogs, I'm going to talk about things you can do easily with vectors that seem difficult or impossible without them (or something like them)...

I think, based on my own experience with students, that it takes very little extra time to take a student from the two dimensional slope interecept form to a vector form of equations that will extend to as many dimensions as the student may ever encounter.. (I assume that number will be finite). Some teachers will suggest that there is not any real difference beween my vector form and what is commonly called parametric form of equations, and I agree, as long as all you want to do is write the equation of a line; but I hope to show in the next few days that mixing vectors, matrices, and the traditional equations of planes can quickly expand the level of three dimenisonal tasks that a student can answer.

Today I want to show that writing the equation of a line with vectors is really as easy as using slope intercept, and may actually make more sense in some ways to the students. Before we jump into three space, we might try to win the student over with a two space example..... for example, suppose we want to write the equation of a line though the points (3,1) and (1,-2) in the X-Y plane. First we find the slope, like always... and it turns out to be 3/2 (what do you say to the kid who writes -3/-2)... Then we can use the slope and one point to write the equation as y-1 = (3/2)(x-2) ...(I walked around an Alg I class today as they were being shown this method, and while the rule and an example were on the board, about 1/3 of the student's whose shoulders I peered over had reversed the x and y coordinate values on the subsequent example ...we drill it into them that x comes before y... hmmm)

I think the kid who really knows what is going on, when asked to graph this line will go to the board, mark the point (3,1) (or perhaps (1,-2)) and then count over two to the right, then up three, and make another point. They might repeat this a couple more times, then sketch a line through the points drawn... To most kids, the line goes "over 2, up three". What if we actually let them write it as [2,3] . [after a couple of examples, we might ask the student how long is the line segment between the two points... wait... see how long it takes them to notice that the two legs are right here in the vector) We could define the line as the set of all points (x,y) so that (x,y)=(3,1) + t [2,3] (there is absolutly no reason mathematically to write the point in parentheses and the slope (vector?) in brackets, but I think there is pedagogically). Now imagine that a classroom full of kids had been trained to write the two-dimensional equations as shown, and then we say... hey guys, suppose we want to write the equation of two points in space, with points (x,y,z)... between the two points at (1, -2, 7)... and at (3, 1, 5). I can tell you that in my experience working with Alg II and Pre-calc kids, they automatically extend the method naturally..... almost every one of them... and when I go really crazy, and ask them to write a line between two points in four space, over half the kids in class are wagging hands to get a shot at the board. And when I ask them the distance between the two points, there is almost never a question about whether the Pythagorean method applies... vectors is vectors, baby!

Down the line, I think there are some great modifications. If we develop the practice of writing the slope vector (I call it that becuase they learned "slope" first, but it could easily be called the translation vector) as a unit vector. The variable t suddenly takes on the additional value of indicating the distance away from the original point in the vector direction; substitute in t=3, and you get the point 3 units away..etc. Now we ask them to find the point three-fifths of the way from point A toward point B and they write A + 3/5 [B-A] almost without instruction; and yes, they will know what to do if you ask for it the other way around.

There are some heavy ideas you might want to explore here that you could almost never touch using the traditional equations. Imagine giving your students the coordinates of a triangle in three space and have the students find the point where the medians intersect. Later with dot and vector products, and a little work with matrices to find solutions to systems of equations, we will find the equation of a line along the intersection of two planes, the foot of the perpendicular to a tetrahedron etc.

Someone who is really good at linear algebra could probably point out fifty other little tasks that are easy to do in three-space with vectors and matrices.. (and I would love to hear from you)... But for now, try introducing some vector equations of lines to your kids.. I bet they can pick it up in one class period, and it is a natural companion to parametric equations (which is the area of the curriculum I use to justify the very little time I go off task on three space vectors and matrices)

Stay tuned... Next I'll write use the dot product to find the angle between two lines or segments in space.