Indeed such mountains are immensely stirring and one feels an awakening need to worship. It is humbling to wander in the looming presence of such wild danger and heights. It was not a simple walk to get as high as we did, but we topped out a bit higher than the pass, at about 3800 meters or so. Nanda Devi's peak is at 7816 meters, about four kilometers above our highest point.

## Sunday, November 15, 2009

### activity week - kuari pass - 3

Indeed such mountains are immensely stirring and one feels an awakening need to worship. It is humbling to wander in the looming presence of such wild danger and heights. It was not a simple walk to get as high as we did, but we topped out a bit higher than the pass, at about 3800 meters or so. Nanda Devi's peak is at 7816 meters, about four kilometers above our highest point.

## Saturday, November 14, 2009

### activity week - kuari pass - 2

We saw a great deal of this rock, schist, a metamorphic of shimmering appearance. In some places, the path was covered with a fine sparkling dust looked wet in the sunlight. Often there were heaps of it shining beautifully and crushing together like some forgotten treasure.

## Sunday, November 8, 2009

### activity week - kuari pass

## Monday, August 31, 2009

### code snippets

On the down side, I think that blogger decided to lose my fern picture in the title box during all of that. Conservation of formatting, no doubt.

## Saturday, August 29, 2009

### isPrime algorithm

*This is something of a continuation of my previous post. I stalled out trying to post the code snippets, posted them as cropped screenshots, and finally discovered a mildly convenient way to export from netbeans to html and paste into blogger with the help of a few lines of css in my blog layout.*

I find the Project Euler problems helpful because they challenge you to tidy up the algorithms. A question may be of a very approachable nature for small numbers, but the solution for large numbers relies on a solid understanding of what is necessary and sufficient to find the solution.

For example, if you want to create an algorithm that returns "true" if a number is prime and "false" if it is composite, then you might start with this:

public static boolean isPrime(int args){

int n = args;

for(int i=2; i<n; i++){

if(n%i==0){

return false;

}

}

return true;

}

...which works by checking every integer in the closed interval [2, n-1] as potential factors of n. The condition n%i==0 uses the modulus "%" operator and it is true when the remainder when n is divided by i is equal to zero. If there are any factors of n on that interval, then the code will return a value of "true".

With small numbers and simple tasks, the computer calculates quickly enough to make this seem like a good algorithm. For example, I can use this algorithm to learn in the blink of an eye that 370009919 (for example) is not a prime. However, it wastes a lot of energy and in some circumstances, a lot of time. It is wasteful because it checks 370009917 potential factors. If 370009919 is a composite number, then once we have learned that 2 is not a factor, we do not need to look at other even numbers. We could use:

public static boolean isPrime(int args){

int n = args;

if(n==2){

return true;

}

else if(n%2==0){

return false;

}

for(int i=3; i<n; i=i+2){

if(n%i==0){

return false;

}

}

return true;

}

...which still covers all of the possibilities, but after determining that 2 is not a factor, it will not look at any more even numbers because

*i*goes up by 2's from 3. It is still quite wasteful, however.

If 370009919 is a composite number, then it must have a factor smaller than or equal to its square root, which is about 19236. If we pass the square root without finding a factor, we know the number is prime and we can stop. This effectively allows us to stop after 1/19236^{ }of the work that the previous code ordered. We can take a square root of an int using Java, but the value will be a double. We can still compare our int *i* to the double *sqrtN*, but this time we want less-than-or-equal-to "<=" instead of less-than, since the maximum value of the minimum factor may be equal to the suare root, as would be the case for the square of any prime number.

public static boolean isPrime(int args){

int n = args;

double sqrtN = Math.sqrt(n);

if(n==2){

return true;

}

else if(n%2==0){

return false;

}

for(int i=3; i<=sqrtN; i=i+2){

if(n%i==0){

return false;

}

}

return true;

}

The code above is correct as long as Math.sqrt(n) is never less than the actual square root of n. If rounding errors and the hidden Java algorithm that computes "sqrt" might permit such a thing, then the code would possibly be incorrect. I could (A) look at the documentation to reassure myself, (B) conservatively make the second condition of the for-loop read: i<=(sqrtN+1), or (C), test the code for all squares of known primes in the range of int values to see if it correctly detects the factor every time. Also, this code will only return a true or a false. If I want to know the factor that was found, I can add a line of code to print out the factor as soon as it is found.

public static boolean isPrime(int args){

int n = args;

double sqrtN = Math.sqrt(n);

if(n==2){

return true;

}

else if(n%2==0){

return false;

}

for(int i = 3; i<=(sqrtN+1); i=i+2){

if(n%i==0){

System.out.println("found a factor: "+i);

return false;

}

}

return true;

}

The smallest factor is 1699.

I have not looked around to see how this algorithm could be further improved. It is a good idea to skip the evens after we determine that two is not a factor, but skipping the multiples of three (or five, and so on) would be, I suspect, too costly to provide an advantage. The BigInteger class has a method that determines if a number is prime, but I do not know if we are guaranteed more efficiency there, and I do not understand the cost should I need to convert to a BigInteger just to find out. I have seen references to the use of stored lists of primes, which would cut down execution time, but it does not address the programming question of primality. Also, if Java's square root algorithm is considered cheap, we could just replace "i<=sqrtN" with "i*i<=n". This would cost an extra multiplication for every value of *i*, but we could avoid finding the square root.

Many of the more sophisticated primality tests are designed to be quick and *probabilistic*, meaning there is a small chance that they will give an incorrect result. However, according to Wolfram Mathworld, the fastest general *deterministic* test, giving absolute certainty, is "Elliptic Curve Primality Proving", which recently took only six years of CPU time to verify the primality of a 20562-digit prime number.

## Friday, August 28, 2009

### to start programming

*I took Java as an undergrad but remember none of it. IF I want to start working on these problems as well as working on programing. What would you suggest... What Language? Helpful Sites? What programs I will need? Books to buy?*

**Disclaimer:**what follows is all very basic but (I hope) at least moderately correct. I am really not a computer programmer and I only presume as far as to say that I am learning and I do enjoy it.I recommend using Netbeans, which is an IDE (Integrated Development Environment) that can be downloaded from here. Netbeans is the first program of this type that I have used, so I know there are people out there that would argue for other IDE's. Netbeans and the Java Development Kit (JDK) are both free, sponsored by Sun Microsystems. Netbeans is very helpful because it will alert you (without being very distracting) when you have made a syntax error, or when you have created a variable that is not used for anything. Netbeans suggests methods while you are typing, but not in a way that I feel interferes in case you do know what you want to type. It also dims out the code that is 'commented out'.

I work on a need-to-know basis. I try to challenge myself just enough to make use of what I know while learning a little bit at a time. It is a fairly experimental process, so as you try new things you need to be writing programs in which you understand all of the code except maybe one or two lines. As a task becomes more interesting and more necessary, you will find the curiosity to look up how it might be done.

For example, I am getting pretty comfortable with int's, long's, double's and BigInteger's, but there are a few problems that will require me to learn some things about dealing with text, and I have simply not gotten around to it yet. As I try to gain some new skill, I move in little steps. A programmer is supposed to begin with a "Hello, World!" program and go from there. I recommend constructing a few simple programs using the tutorials. After you have something that at least returns a result without errors, you can begin to define variables and construct algorithms.

Sun has some Java tutorials (here is an example) as well as full documentation for the Java language (here is an example). The tutorials include code and some explanations, while the documentation is very technical but it explains the properties of each instance of a given class.

When using Java, you will need to learn the differences of data types. For example, a variable which has been defined as an int cannot exceed a certain value, 2

^{31}-1 = 2147483647. Its minimum value is -2

^{31}= -2147483648. This is because the variable is given 32 bits of disk space, one of which is a sign bit to signify (+) or (-). If your application will encounter bigger numbers than what is expressible as an int, you will need to prepare for that by initiating the variable as a long (64 bits) or a BigInteger, which has arbitrary precision. Sometimes you will need to convert between data types, and sometimes that will involve the risk of a loss of information.

Netbeans supports a trial and error learning technique. You can make small changes in your code and execute the program with a right-click of the mouse. You can track the value of a variable (to see if it is undergoing the changes you are trying to inspire) by putting this line in your code:

System.out.println("a label in quotation marks: "+variableName);

You can use this line to keep track of the progress while the program is running, to see if an anticipated condition is ever met, or to observe where the program stopped doing what you wanted it to do.

There are various tutorials and message boards around the internet, and even reading information about a different language may be helpful. Netbeans has been invaluable as I have been learning the Java language and syntax.

## Wednesday, August 26, 2009

### the prairie

*The Prairie*by James Fenimore Cooper. Grandpa gave me that book a few years ago after he and Grandma took a meandering trip westward along Lewis and Clark's route through the American West. He picked it up along the way. I didn't read it until now.

The main character is in this book quite an old man, but Cooper alludes to different parts of his life as told in the previous books, of which I have read only

*The Last of the Mohicans*. The character is one Natty Bumppo, a man of the frontier, a warrior, woodsman, and wanderer. In this book he is referred to only as "the trapper", with but a single mention of the initials of his proper name. He is above all honorable and unassuming. The bit about his identity though... In each of the books, he is something else to the people around him and he is called by their perceptions. Near the end of his life, this man of few possessions, having lived such an unfettered existence as God gives the grass of the field, asks for a stone on his grave, bearing his name. His name, used so seldom in his life--it does not appear in this book--is treasured and protected as the very center of his identity.

## Tuesday, August 18, 2009

### new hobby

Project Euler is a website which simply poses questions of mathematical (primarily number theory) interest which generally require a clever algorithm and expression in some computer language. The questions are well stated and challenging.

You can register and let the site keep track of which problems you have solved. When you solve a problem, you can look at a message board with comments and code snippets from people who have also already arrived at the solution. This has been a good challenge for me as I try to learn and relearn how to program.

The last problem I solved (don't worry, I won't give away the answer) asked for the sum of the prime factors of

_{20,000,000}C

_{15,000,000}, which is a rather large number that can be found about a quarter of the way through the twenty-million and first row of Pascal's triangle, but I rarely write that many rows.

Leonhard Euler was a Swiss mathematician who would have enjoyed these problems. Blind and hundreds of years before Java, he still would have knocked the socks off the likes of me.

## Sunday, August 16, 2009

### between the clouds

*And ice cream castles in the air*

*And feather canyons evrywhere*

*I've looked at clouds that way*

*-Joni Mitchell*

*I took this picture from our neighbors' front terrace. We sipped tea with Dot and watched the drama of the firmament against the rare clarity of this particular monsoon afternoon. It was very clear when we arrived, and I took this picture just after the last fir-covered hilltop was smothered by the clouds. I have always been perplexed to find myself between two ranges of clouds which each seem to know their place. The tops of the bottom clouds and the bottoms of the top clouds seem so content with their boundaries that I stare puzzled, stuck in the middle of it all. Another fifteen minutes and our own hill was in a dense fog.*

## Wednesday, August 12, 2009

### to burn or not to burn

This one is for my sister Sarah. I guess I have been mulling over her blog post from May about "hyperbaking" and a more recent post of hers about finding the proportion of the benefits gleaned from biking and running. At the very heart of it she is talking about fastidiously saving calories while cooking and ravenously consuming them while exercising. Something about the juxtaposition of these ideas struck the ironical chords that reside deep within me. Cooking like Bob Cratchit thaws his fingers by a candle and exercising like Nebuchadnezzar's slave stoking the furnace.

Essentially, hyperbaking or hypercooking is a neat way of not wasting as much heat. You cook noodles, for example, by bringing water to a boil and turning off the flame, letting the heat of the water do the cooking. You throw out less-than-boiling water instead of boiling water and you have used that heat in a more productive way than usual. It is a good idea, but of course it would be a bit of work to get the timing correct for a given project. I suppose there are recipes around to help with that. On the downside, it seems counter-productive if you are just making some sort of yummy dessert to power your not-so-pragmatic running habits.

Sarah's recent post about running a mile being equivalent to biking four miles made me think of this post by Steven Levitt on the Freakonomics blog. He suggested that recreational exercise should be taxed for its consumption of fuel and ultimate acceleration of global warming. In my own twisted fashion, I could not help but wonder if running a mile is somehow equivalent to burning a styrofoam cup. Or three.

Ah, global warming... Unless of course it turns out to be global cooling, in which case we will need to be less efficient in all that we do, right? We would probably have a "cash for hybrids" program and redistribute all of those globe-warming machines that are so uselessly sitting around now. We could then feel free to start a nuclear war, and environmentally-conscious people would probably popularize hypobaking, in which one does not shut the oven door. And recreational exercise would naturally be encouraged.

## Friday, July 17, 2009

### the korean dmz

The blue buildings belong to the UN and the grey buildings are for the North Koreans. They are not generally in such close proximity as these two buildings, but in the JSA (Joint Security Area) the soldiers spend time every day staring at the enemy. The JSA at Panmunjom is the only point of remotely diplomatic contact between the two nations. And it is remotely diplomatic. The rest of the border is not to be crossed under any circumstances.

The bridge in this picture is called "The Bridge of No Return" for its role in two major operations in which soldiers were allowed to return North or return South some time after the war.

The above picture shows the North Korean 'propaganda village' built near the demarcation to demonstrate (to envious South Korean eyes) the grandeur and lavish living enjoyed by the communists. In reality, much of the world fears that North Koreans starve to death in droves, suffer in poverty and probably receive little or nothing of the aid that is sent there from the rest of the world. Our guide informed us that the village is generally deserted and some of the buildings are only facades. The south has a similar village that exaggerates the green grass of democracy. A feisty little show of escalating nationalism left each village with an enormous flagpole.

Joie and I appreciated the chance to see this situation, this relic of a recent war. It boggles the mind to witness the tension there and the profound effort that is needed to

*keep*a peace. The line is so arbitrary and artificial, a division that does not want to be there, and so many forces press to renew and resolve, one way or the other, a suspended conflict. As Robert Frost says, "Good fences make good neighbors."

## Tuesday, July 14, 2009

### more korea pictures

### my favorite will

## Sunday, July 12, 2009

### back from korea

## Thursday, June 4, 2009

### calculus rhapsody video

I'm not sure this will work. I feel really low-tech right now. My internet connection is really slow so YouTube is not a regular part of my life or anything, but I thought that this was well done. I showed it in class and only 4 of 22 students have ever heard the real song, Bohemian Rhapsody by Queen. Occasionally I feel old.

It reminds me of the time my high school math teacher read The Beloit List in our class. This is a list of various cultural phenomena which the current high school graduate would take for granted. Reading it to the current high school graduates is not without its irony, as the students respond (as predicted) to every statement with "yeah, so, hasn't it always been like that?" and the teacher alone has the opportunity to be amused. I am used to being the only one amused in my class.

It also made me realise that it is an ironical yet not uncommon occurrence to be exposed to a parody before you are aware of the original.

## Thursday, May 14, 2009

### milk and honey

Two nights ago, for a Will and Annie bedtime story I read about the twelve spies who went into Canaan. ...ten were bad and two were good... Caleb and Joshua were the fearless minority who considered it worth the risk. They were excited to see what God had for his people.

I can remember reading this before and thinking of Caleb and Joshua as faithful, adventurous, courageous, obedient and righteous in their attitude toward the task. The others always seemed like wet blankets. Cowards.

This time when I read it, I seemed to hear ten reasonable voices concerned about the feasibility of a plan, the numbers and dimensions of the enemies, and the strength of the strongholds. Joshua and Caleb seemed like goofy little kids saying, "Yeah, but look at the size of these grapes! Moses can we go, can we can we can we, PLEEEEEEEEEEEASE!?" And it sounded reasonable to think about not going. And it sounded ridiculous to risk your neck for a taste of milk and honey. And I realized that I have become a coward.

**Numbers 13:27**They gave Moses this account: "We went into the land to which you sent us, and it does flow with milk and honey! Here is its fruit.^{28}But the people who live there are powerful, and the cities are fortified and very large. We even saw descendants of Anak there....

^{30}Then Caleb silenced the people before Moses and said, "We should go up and take possession of the land, for we can certainly do it."^{31}But the men who had gone up with him said, "We can't attack those people; they are stronger than we are."^{32}And they spread among the Israelites a bad report about the land they had explored. They said, "The land we explored devours those living in it. All the people we saw there are of great size."They saw the same things, and there is nothing to indicate that they differed on their assessment of the problem, only on their assessment of the risk. Caleb and Joshua had seen the soldiers and the terrain and the fortifications. But they also saw God's promise as a tangible security, and they breathed richly of the blessings of his plans. I suspect that for Joshua and Caleb, the time in Canaan was an amazing experience, a vibrant and overwhelming exposure to God's provisions for his people, an invigorating and reassuring security. Their comrades on the same trip slept in the same hills, walked on the same paths, crossed the same rivers, ate the same fruit and paced the same valleys to survive a terrifying foray into enemy land. No, they didn't see different things. Joshua and Caleb simply knew the value of milk and honey.

*God, please grant me courage to pursue your blessings.*

## Tuesday, May 5, 2009

### solution: streets and avenues

_{}

There are 729 ways to travel from the corner of 3rd Ave & 12th St to the corner of 8th Ave and 5th St. In the problem statement, I did not specify that north or west made the numbers go up or down. Correct diagrams could therefore differ, but I did not want to distract from the main riddle, that you must travel five blocks in one direction and seven blocks in the perpendicular direction.

Any valid shortest distance by road will need to be 12 blocks total, five of those being one direction and seven being in the other direction. In my diagram, I need to go east and north. As long as I go five blocks east, seven blocks north, zero blocks west and zero blocks south, I will arrive at the specified location. I can mix up the order...

In other words, I need to travel 12 blocks and 5 of them need to be east (the rest north). Which ones should be east? The answer is a combination,

_{12}C

_{5}= 12!/(5!*7!) = 729 .

### solution: burning tent

The clever way to solve this problem is to imagine that the point along the river bank has been chosen and we are watching the reflection of the camper across the line that is the river bank. The camper and his reflection will always be the same distance from the river. In other words, if we choose a target point on the river that gives the camper the shortest distance, it also gives his reflection the shortest route. Therefore, choose the point that is on the line between the camper's reflection and the burning tent. The shortest distance is given in the comments of the question.

## Thursday, April 30, 2009

### deadline online

**"Looking for more great local news?"**

No, I'm looking for SOME great local news. I clicked on the "News" link and it says:

**"E-mail your news**

Email your local news items to the Independent-Register at ... Deadline is noon Friday. "

So I guess it's become kind of a self-service newspaper. And I cannot help but appreciate the audacity of having a deadline for those benevolent (if unproductive) readers. Does the print edition expect a reader to draw their own pictures and call around town to figure out who is having a rummage sale?

*This strikes me as a very sustainable format for a newspaper.*

On that note, my blog has not had anything thought provoking, clever, witty, or otherwise worthwhile in quite some time, so get on that, people. Deadline is noon Friday.

## Tuesday, April 21, 2009

### solution: buried treasure

**Solution: 5*4 - buried treasure**

The answer to this question is that yes, the treasure can be found without knowing the original starting point.

*Solution:* Let us discuss the problem using x,y coordinates, where x represents the east-west direction and y is north-south. Start at (a,b) and let the landmarks be (c,d) and (e,f). To reach the location for the first stake, you will go from (a,b) to (c,d), which takes you c-a in the x-direction and d-b in the y-direction. You then turn and go the same distance in a perpendicular direction, which means that c-a is a vertical distance and d-b is a horizontal distance.

The coordinates of the two stakes can be expressed as (c-(d-b),d-(a-c)) and (e+(f-b),f-(e-a)). Their midpoint, the location of the treasure, is ((c-d+e+f)/2,(c+d-e+f)/2), which is strikingly independent of a and b, the coordinates of the starting point. This means that if we changed the starting point but followed the same directions, we would arrive at the same location and find the treasure.

This does of course assume that the field is a plane.

I first came across this problem at http://www.techinterview.org/. This is a very neat website.

### solution: chords

**Solution: 5*4 - chords**

The shortest chord has length 16 and the longest chord is a diameter and has length 20. The in-between chords (lengths 17, 18, and 19) exist in pairs, giving us a total of eight chords of integer length passing through the given point. This is really an existence question. Constructing the actual chords is a tedious project whose aim concerns particular chords which are numerically but not geometrically of any moment.

## Friday, April 17, 2009

### 5-star challenge #6

**Grades 11-12 5-Star #6**

A group of 475 very democratic pirates are deciding how to distribute a massive pile of plunder. To distribute the booty, the pirates will each cast a vote for one of two options:

(A) divide the treasure evenly amongst everyone in the group, or

(B) make the youngest pirate walk the plank and have the remaining pirates vote again.

If half or more of the pirates vote to divide the plunder, the treasure will be distributed at that time. If not, the youngest pirate will walk the plank and the (slightly smaller) group will vote again. The process will be repeated as long as necessary until the treasure has been divided. How many pirates will share the treasure?

For clarification: No two pirates have exactly the same age. Although (by the pigeonhole principle) some of them must share birthdays, no two of them were born at exactly the same time. That would be inconceivable. The precise ages of all pirates are on record and each pirate has access to this information; no pirate's age is a secret. Each pirate's business savvy is exceeded only by his or her greed. Each pirate will vote only according to their selfish ambitions for wealth and not walking planks. Each pirate will make the best possible decision for himself or herself.

**Grades 09-10 5-Star #6**

A pirate has nine coins, identical to one another in appearance, but one of which is counterfeit. She wants to use an equal arm balance to identify the counterfeit coin, which is heavier than the others. Using an equal arm balance, what is the smallest number of weighings necessary and sufficient to identify the counterfeit coin?

*Note: I have decided to extend the deadline for my students, so I will turn off the comments until the contest is properly over for them.*

### 5-star challenge #5

**Grades 11 & 12 5-Star Challenge #5**

A particular city's roads form a grid. The Avenues run North-South and the Streets run East-West. The Avenues and Streets are named numerically and they are in numerical order. How many distinct shortest routes exist between the corner of 3rd Avenue and 12th Street and the corner of 8th Avenue and 5th Street?

**Grades 9 & 10 5-Star Challenge #5**

A Woodstock student on a camping trip notices that his tent is on fire. At the moment he notices the fire, he is holding an empty bucket and standing only 10 meters away from a river (whose banks are parallel lines). The tent is 30 meters from the river and the student is 60 meters from the tent. The student and the tent are on the same side of the river. The student needs to fill the bucket with water from the river and go to the tent to fight the fire. What is the length of the shortest path to the tent via the river?

## Wednesday, April 8, 2009

### the disillusionment

## Saturday, March 28, 2009

### my impossible project

## Friday, March 27, 2009

### solution: 7-11

The question was posed in terms of tuck-shop coupons, but this problem is classically stated in terms of postage stamps. Essentially,

*What is the largest number which cannot be expressed as a sum of 7's and 11's? *

Consider a different (but related) question: If we have an amount that is possible, how can we increase it by one? Since there is no one-rupee stamp, we would have to trade some appropriate combination of stamps to accomplish an increase. Add a few whose sum is N, take away a few whose sum is N-1. It is also worth mentioning that the trade will only be 7's for 11's or 11's for 7's. We will not have to worry about some complicated mixture. (if we gave a 7 and received a 7 we could ignore the 7 in both cases and accomplish the same change).

The problem becomes: can we find the smallest multiple of 7 which is one less than a multiple of 11? Or, can we find the smallest multiple of 11 which is one less than a multiple of 7? Take 3*7=21, which is one less than 2*11=22. Also, 5*11=55, which is one less than 7*8=56.

What this means is that to take an amount which works and increase it by one, we can either trade three 7's or five 11's. If either of the two options is available to us, then the next amount can be expressed in terms of 7's and 11's.

The amounts which do work but cannot be increased are those numbers which are the sum of fewer than three 7's and fewer than five 11's. The largest of these numbers will have two 7's and four 11's; 2*7+4*11=58 is therefore the largest number which cannot be increased, which means that 59 cannot be constructed as a sum of 7's and 11's. The next number, 60, can be made (with one 11 and seven 7's), so every number greater than or equal to 60 can be made with 7's and 11's.

Therefore 59 is the largest number which cannot be expressed as a sum of 7's and 11's.

## Thursday, March 26, 2009

### prisoner's dilemma

This article was mentioned on the Freakonomics blog. DNA evidence collected from the scene of a jewelry robbery in Germany was matched to two people, identical twins with indistinguishable DNA. Because the evidence failed to incriminate one particular person, both brothers were released. Of course, between the two of them, they probably know which one did it (if either of them did).

The Freakonomics post about this situation alludes to the prisoner's dilemma, which I actually have been pondering lately. Not because I'm a prisoner, but because I read another chapter in my intro to game theory book while grading tests a few nights ago.

The prisoner's dilemma goes like this.

Two prisoners are held in connection with a crime. They are not able to communicate to one another. Each is given the opportunity to confess, with the understanding that the sentencing will occur as follows:

- If one talks, he goes free and the other gets a maximum sentence (because there is evidence against him).
- If both talk, they each get a usual sentence. (evidence against them, but less for cooperating).
- If neither talks, they each get a minimum sentence. (not enough evidence for a conviction).

The outcomes can be arranged in a matrix as follows, showing how many years each prisoner gets as a result of each of the four outcomes:

B talks | B doesn't talk | |

A talks | A:10, B:10 | A:0, B:20 |

A doesn't talk | A:20, B:0 | A:5, B:5 |

Here is the tricky part, as seen by Prisoner A (B's considerations are the same). Prisoner A is trying to make a rational decision with the sole intention of serving the least amount of jail time possible. Prisoner A knows that if B talks, A should talk (to get 10 years instead of 20). If B doesn't talk, A should talk (to get 0 years instead of 5). So while the outcome is uncertain, the strategy is clear. Prisoner A should talk, no matter what B decides.

Likewise, Prisoner B would be better off talking, no matter what A decides. Therefore, they will both be rational and talk. They will each serve 10 years.

The intriguing facet of this situation is that there exists an outcome which is better for both prisoners (they both stay quiet and each serves 5 years), but which would involve each of them acting irrationally. Of course, if their decision were made to avoid jail time, it could hardly be called irrational. That's the catch-22.

At a glance, it seems like a clever illusion and it is tempting to think that after considering the outcomes, each prisoner would be silent and thereby obtain the most favourable outcome available: 5 years and 5 years. But remember that the only reason a prisoner would be quiet is if he were confident that the other prisoner would also be quiet. And if he were confident of that, would he really pass up the chance of immediate freedom?

This leads to a mathematical discussion of why we do not see more cooperation in the world. The best outcome for everyone is usually necessarily artificially imposed or it will not happen.

My simplified rendition assumes that both prisoners are equally guilty and know that they would be convicted by the other's testimony. It also assumes that they do not like being in jail. Honor among thieves could certainly keep them quiet if the jail time were a matter of days, but as the sentence gets more substantial, the reward for informing on the other prisoner grows considerably, in addition to being the only rational choice. This means that the relative magnitudes of punishments and temptations come into play. Here is a more lengthy discussion of the dilemma that explains some of the variables.

### solution: base b & b+3

*The number*n

*expressed in base*b

*has the form 364. In base*(b+3)

*,*n

*is written as 202. Find the decimal values of*n

*and*b

*, which are both positive integers.*

*Solution:*

Without knowing the base, we cannot know the number which is represented by the symbols 364. The place-value system allows us to perceive it as a number having a one's place, a

*b*'s place, and a

*b*

^{2}'s place, just as a three digit decimal number would have a ones' place (10

^{0}), a tens' place (10

^{1}), and a hundreds' place (10

^{2}).

Therefore n=3*b

^{2}+6*b+4

and n also equals 2*(b+3)

^{2}+0*(b+3)+2

so we have

3*b

^{2}+6*b+4=2*(b+3)

^{2}+0*(b+3)+2

3*b

^{2}+6*b+4=2*b

^{2}+12*b+18+2

b

^{2}-6*b-16=0

(b-8)*(b+2)=0

so

*b*=8 or

*b*=-2. The problem says that the base is positive, so we take

*b*=8. Once we have found

*b*, we can put the value into either equation for

*n*.

**We get**

*b*=8,*n*=244.In this problem, I offered the students an easy base that they could find by trial and error. Several students noted that since 364 contains a "6", the base had to be at least 7, a very astute observation. Also, when you solve the quadratic, you get only on positive option.

If the quadratic equation had two positive roots, we could find a number

*n*which had the given representations (for bases

*b*and

*b+3*) for two different values of

*b*. If the base

*b*representation was four digits, there could be as many as three distinct values of

*b*that could solve such a problem. If the base

*b*representation was six digits, we would get a fifth degree equation, which Abel says cannot be solved for the five different

*b*'s that could exist.

## Monday, March 23, 2009

### another rock in the wall

### 5-star challenge #4

**Grades 11 & 12 5-Star Challenge #4**

Captain Cooke the buccaneer buried his treasure at a small Himalayan boarding school. His legendary love of mathematical riddles inspired him to leave this clue, enigmatically encoded in the arrangement of 216 enormous stainless steel cuneiform characters in the school’s Peace Garden:

"The treasure is below Handsome Field. Start at the pile of broken tube-lights. Walk straight to the rock that looks like a flower, counting your steps. Turn 90 degrees to the right and walk the same number of steps in that direction. Put a twig in the ground where you stop. Start again at the pile of broken tube-lights and walk directly to the flower that looks like a rock, counting your steps. Turn 90 degrees to the left and walk that number of steps in that direction. Stick a twig in the ground at that point. Tie twine tautly 'tween the twain twigs and find its halfway point. The treasure is buried beneath the midpoint of the twine."

Centuries later, the clue is discovered by a visiting alumna as she ponders the 5-Star Challenge #971. After decoding the directions, the alumna rushes down to the Handsome Field Coliseum (via the Class of 2009 Memorial Escalator) to discover that the flower and the rock are still inexplicably in their places, but the pile of broken tube-lights has been removed without a trace by CLEAN! Without knowing where the broken tube-lights should be, and without digging at random all over Handsome Field, is it still possible for the alumna to find Captain Cooke's treasure? Explain.

**Grades 9 & 10 5-Star Challenge #4**

Point A is 6 units from the center of a circle of radius 10. How many chords of the circle have integral length and pass through point A?

## Sunday, March 22, 2009

### 5-star challenge #3

**Grades 11 & 12 5-Star Challenge #3**

The number n expressed in base b has the form 364. In base (b+3), n is written as 202. Find the decimal values of n and b, which are both positive integers.

**Grades 9 & 10 5-Star Challenge #3**

The new tuck-shop coupons are printed only for 7 rupee and 11 rupee denominations. What is the largest integer number of rupees which cannot be paid using a combination of 7- and 11- rupee coupons?

## Tuesday, March 17, 2009

### solution: pair-sums

*Grades 9 & 10 5-Star Challenge #2*

Every possible pair within a set of five numbers is summed.

The sums are 0, 3, 11, 12, 20, 21, 23, 29, 32, 41. Find the five numbers.

Every possible pair within a set of five numbers is summed.

The sums are 0, 3, 11, 12, 20, 21, 23, 29, 32, 41. Find the five numbers.

In this problem, the answer may be obtained by trial and error, but there are some neat aspects to the problem if one works to solve it. Let us assume that the five numbers are distinct (as they would need to be if their ten pair-sums were distinct). Let us consider the sums as F < G < H < J < K < L < M < N < P < Q. Let the five numbers be a < b < c < d < e. The order of a, b, c, d, and e offers only an incomplete understanding of the order of the sums. We have

(a+b) < (a+c) < [(b+c),(a+d)] < [(a+e),(b+d)] < [(c+d),(b+e)] < (c+e) < (d+e).

We know that F=a+b and G=a+c, and that Q=e+d and P=c+e. We do not know if the third and fourth smallest sums represent a+d and b+c or b+c and a+d, respectively.

This problem can be approached by solving all of the little equations to establish which is greater of (b+c) and (a+d). Once b+c is known, the system of three equations a+b=F, a+c=G, b+c=(H or J) can be solved for the values of a, b, and c. The values of d and e can be found shortly thereafter by substitution.

There is a less tedious way to solve the problem. By identifying that each number is summed with each possible partner, we know that each number a < b < c < d < e appears four times in the sum F+G+H+J+K+L+M+N+P+Q, so the sum of the ten pair-sums must be equal to 4(a+b+c+d+e). By adding the first and last sum, we know that F+Q=a+b+d+e, and we can therefore find the value of c.

In our problem, the pair-sums are 0, 3, 11, 12, 20, 21, 23, 29, 32, 41, whose sum is 192, which is equal to 4(a+b+c+d+e). This means that 192/4=48=a+b+c+d+e.

We know that F+Q=0+41=a+b+d+e, so

**c=7**.

If c=7, we know that G=3=(a+c)=(a+7), so

**a=-4**. Then F=0=(a+b)=(-4+b) tells us that

**b=4**. P=32=(c+e)=(7+e), so

**e=25**. Since 48=a+b+c+d+e,

**d must be 16**.

### solution: 81^2009

*Grades 11 & 12 5-Star Challenge #2*

Find (a) the number of digits and (b) the last three (least significant) digits in the decimal expression of 81

Find (a) the number of digits and (b) the last three (least significant) digits in the decimal expression of 81

^{2009}.My Solution...

This problem asks for two elementary observations. If the number were written in its entirety, it would be a simple matter to obtain the number of digits and the values of the last three digits. The entire number can be generated with a couple of lines of code using Java's BigInteger class.

BigInteger myBigNumber = new BigInteger("81").pow(2009);

System.out.println("myBigNumber: "+myBigNumber);

This returns (in a fraction of a second):

myBigNumber:

1400886426099001433589715356524325994077360058833291454060331448901202858812711608791505300540205160834871243114967077782896741018493232826119962265403933221408273710682285389474611581003628765532988693839153728368550209031963049953365587333165550684382285106676049916357515617508318430039472665058505400648134895508543610798780057273663322426956561416111481073295564688756106556978220972883768498990439376379038088913512578774433394954966862795937723871349150451305665824022155706009283754336379201724142185351446653196901336911382788170275693693431585571516214076703025655694724313935072160077237502277620633564638041394172823865006761057098692874958064119778303667684220473562875130389095576612598169616570264206698883864712941599975306460033566903701203176613915280808200553190149220172757742382552424264898048660485008953744755857351182328200797217390733117879482736723725387755343016641042324605268387235071317590044699322617486518833978498750446720283318797784379982099655399049514088697411493542735966238355231518335754560005454557858737827355594203256731113150254221184261378594118900660565386875397480998177808153453972240763137726201802935458465644187508973316810617828944777550600037116120613295523595674229092486855978909224433568001602101966137609851452418351933395026445713151813690775772659529245247483081061394734160452917273402957713927998398637008649959045364542625757251174939330779763645565078645414995355444331511328545544587436720247358813300136273063929536760693736894399092656898581391777601176686638814415800605457552137755811561722992947830941361575088520921316840670291945199828480758662688749076445628397158944252925926207253727397615642302175056456168537654926096910594424358310081741719763482063248026418549153981883499716627174273667624458356479660732203553476892308402043990264919201939021708092767869280613832259386192559262656045967546526551060223597953426164586528815240198370930615443469369831397836790511704027247717287613128262970900587798085687044826070427586179676392059739626595037167328563772506422713580328669959080751912111426766214386993833793411310032618393156947481034604475623258966648528615807295339485106694016473355821675133837209206523909378952991095736019452549069793468232090700893085918364572584074859059077156795322914743377215102376435931960712370356874666922951857034687294703109308613860715556328236763180084679159342631746367233847114542831918603472299798321527157441161819532742005968777296078987636685014605803610522533976135083018079462867231622504340685958958775803013385058237912087337518155851768194473603085161979303255925564896683534521901491172404855277443706334679904563837822732299389135616888785840527710491760378625577274127165160723696855383968993354486834189433444754952751349119445485023181677760092071751879339708391793177141272161381338406604416686619826676210135423387944224584209170249358763128906780988581499912792718505330714538446491560748113617647828696553112964608607567406647137734043006583685118169281006120091135549995534312849407690524527234325455560291603364366173667248135691235606237319206864662357808314487913529150433701250314479681846670702891523598161060942612992920037173624206384607196996451365525196548440267693551682140725599199807911935490733624764556262308015951473144301853801136043280112830549607313441641080796896809627284910178979983295107307002907330430332271237131267427131349236806228355581537700780297380111225674100174944973118017202128990296866935839828010719361300152001055622795047713257519014364284326307078184203112517839087782402492861653020274288404432905972207465665985433591495473890988412099059297644788913887941133672356210069355051778825969788920325814207846046437928268923946341521305003727054700978419670287048809561516312934357723512398670440769027697003378905339200718030813912207894907559735934856589959121

Of course you could count the digits by hand or write a couple more lines of java to find the number of digits, or use the character count in a Word document. Each of these processes is admirably resourceful, but disregards a lurking elegance. I would not object to such a direct approach to the problem, but there is certainly room for some more finesse. The sheer size of the number renders useless more accessible tools like calculators and spreadsheets. Microsoft Excel has pitiful accuracy, and the students quickly find out that they cannot even use their TI calculators to find the number of digits (directly).

To find the number of digits, we need to remember that we mean 'decimal' digits. The relationship between exponents and the number of digits is clear if the bases agree. Our number, 81

^{2009}can be written as 10

^{2009*log81}=10

^{3834.146...}, which must be a 3835 digit (base 10) number, as it is situated between 10

^{3834}(which is the smallest 3835-digit number) and 10

^{3835}(which is the smallest 3836-digit number).

The last three digits present more of a challenge (barring the availability of the number in decimal form). The last digit, one may easily observe, is 1.

As in the first part of the question, there is a simple shortcut that most would fail to find, but a few would anticipate or discover. The last three digits of the powers of 81 progress through a repeating pattern. This is because 81

^{25}=515377520732011331036461129765621272702107522001. The important part is that the last three digits of 81

^{25}are 001, which means that when we multiply by 81 to get 81

^{26}, we will be back at 081 for our last three digits, and we will go through the progression again for every 25 factors of 81. By this, we can conclude that 81

^{2000}will have 001 as the last three digits, so 81

^{2009}will have the same three-digit ending as 81

^{9}, which is 121. This idea can be used within Excel, but even 81

^{9}is beyond the precision, so it is necessary to discard the more significant digits, through a formula like:

A2=MOD(A1*81,1000)

which gives the last three digits of the next power of 81. The calculation is always manageable for Excel, and the values never get larger than 3 digits. I do not expect my students to know about modular arithmetic, but the problem certainly supports that type of finding.

**for solving this problem involves the binomial theorem, and I think is very clever.**

*A basic high-school-math-with-scientific-calculator method*If we write 81

^{2009}as (80+1)

^{2009}, we can expand it using the binomial theorem as:

(

_{2009}C

_{0})80

^{2009}*1

^{0}

+(

_{2009}C

_{1})80

^{2008}*1

^{1}

+(

_{2009}C

_{2})80

^{2007}*1

^{2}

+...

+(

_{2009}C

_{2006})80

^{3}*1

^{2006}

+(

_{2009}C

_{2007})80

^{2}*1

^{2007}

+(

_{2009}C

_{2008})80

^{1}*1

^{2008}

+(

_{2009}C

_{2009})80

^{0}*1

^{2009}

Notice that most of the 2010 numbers in this sum end in 000. Any time the exponent on 80 is at least 3, the number will have 1000 as a factor. This means that the last three digits are entirely determined by the terms (

_{2009}C

_{2007})80

^{2}*1

^{2007}, (

_{2009}C

_{2008})80

^{1}*1

^{2008}, and (

_{2009}C

_{2009})80

^{0}*1

^{2009}, which are:

12909030400

160720

1

...and whose sum ends in the digits 121.

This method is more general in that it does not rely on the discovery of a cycle (which may be very long for some bases) or the access to a computer brute-force approach.

## Saturday, March 14, 2009

### 5-star challenge #2

**Grades 11 & 12 5-Star Challenge #2**

Find (a) the number of digits and (b) the last three (least significant) digits in the decimal expression of 81

^{2009}.

**Grades 9 & 10 5-Star Challenge #2**

Every possible pair within a set of five numbers is summed. The sums are 0, 3, 11, 12, 20, 21, 23, 29, 32, 41. Find the five numbers.

## Wednesday, March 11, 2009

### solution: circles

This problem is fairly straightforward with a correct diagram. A hastily sketched diagram may not accentuate the relevant details. Segment ED is 25 units in length. The length of segment BC is 24 units. (how do we know?) To find the length of the altitude to A of triangle ABC, go 9/25 of the way from 9 to 16. Then you have the base and height of a triangle. The area comes to 138.24 square units.

The problem became more interesting when I tried to construct a diagram. A

*drawing*will suffice if you know, for example, that the radii should be perpendicular to the tangents. The

*construction*of a tangent to two circles (but not at their shared point) took me a few minutes to contrive. Also, triangle ABC is a right triangle for any two circles (if we do not keep the radii to 9 and 16) which are tangent in this way. (why?)

My students are always disgusted to learn that I do this stuff for fun.

This problem came from the Georgia Tech Math Olympiad Sample Test.

### solution: vases

If only one vase was available, we would have to begin at 1 foot and proceed upwards by 1 foot increments. If we skipped a height and the vase broke, we could not be certain that the maximum survival height was the last drop survived or a height which was skipped. If and when the first vase breaks, the problem will become a one-vase-scenario.

If two vases are available, we do not at first need to drop from consecutive heights, but we must choose a strategy which allows us to test the intervening heights between the first failure and the previous success.

With two vases, therefore, we can spend our first drop at 13 feet, knowing that we have 12 drops left with which to determine (in case of a failure), which of the heights 1-12 was the maximum. If the vase sustains a drop of 13 feet, we have 12 drops left and we should make our next drop from 25 feet, knowing that we will have 11 drops (in case of a failure) with which to determine the maximum that may be anywhere from 14 to 24.

Therefore, we can skip the first twelve heights, testing at 13. Then we skip the next eleven, testing at 25. By continuing this method, we can determine with certainty the safety of 91 different heights.

We plan to test at:

13 ft.

25 ft. (13+12)

36 ft. (25+11)

46 ft. (36+10)

55 ft. (46+9)

63 ft. (55+8)

70 ft. (63+7)

76 ft. (70+6)

81 ft. (76+5)

85 ft. (81+4)

88 ft. (85+3)

90 ft. (88+2)

91 ft. (90+1)

The winning student discussed 3, 4, and 5 vases. There would be a maximum, of course, if you had 14 vases and 13 drops, you would not benefit from the fourteenth vase.

Robert suspected a twist (in the comments for the question post) such as counting the first part of the fall. For example, if you drop a vase from 98 feet, it may smash at the end but it will safely fall 97 feet. However, a drop from 97 feet may also be fatal (in which case you have spent both of your vases and very little has been learned).

## Friday, March 6, 2009

### 5-star challenge #1

I am trying to start a weekly math contest at my school. I have enjoyed the task of finding problems to use. This contest finishes today for my students, so I will pass on the questions for your own enjoyment. There is no prize but the dignity and warmth that comes of mathematical triumph. I will post answers in the comments when I have the time and inclination.

**Grades 11 & 12 5-Star Challenge #1**

Mr. Burchell has two identical vases and he wants to know exactly how far such a vase could fall without breaking. The vases may be fairly robust. With no more than 13 drops from integer heights (in feet), what is the greatest height (in feet) which could be determined with certainty as the longest drop which such a vase could survive (without breaking)? That is, beginning at 1 foot, what is the greatest number of heights which could be proven safe for the vase?

**Grades 9 & 10 5-Star Challenge #1**

Circle P with radius 9 and circle Q with radius 16 intersect only once, at point A. A certain line is tangent to both circles, touching circle P at point B and circle Q at point C. Find the area of triangle ABC.

## Thursday, February 26, 2009

### these days

Joie has been feeling a lot better now, and we know that God is good.

I think we have a need to attribute. Part of me wants to know what caused our little bitty baby to not make it. I feel like it must be a result of some failure of mine to love it or be a better pappa for it. Anyone could argue against that, I am not saying it is rational. It is just a typical reaction of mine. Advancing beyond that a bit, I might conclude that it is not my fault, it could happen to anyone. ...statistically speaking... But I think that as a follower of Christ, there is a richer perspective.

(from John 9) As he went along, he saw a man blind from birth. His disciples asked him, "Rabbi, who sinned, this man or his parents, that he was born blind?"

Christ's disciples showed that painfully familiar reaction, to complete the picture backwards as though the blind beggar's plight should be explained in terms of the events preceding it. "Neither this man nor his parents sinned," said Jesus, "but this happened so that the work of God might be displayed in his life..." Jesus spoke in terms of what might be.

In a fallen world reeking with the perversions of God's designs, it is impossible to trace a single sorrow to its cause. Jesus did not come to damn the world for its failures, or to untangle the manifold chaos that he found. He came to save [John 3:17], to offer hope and a future [Jeremiah 29:11], and to give himself as a ransom [Matthew 20:28]. From this moment forward.

I think it means that our moment of sorrow can be a source, and not a conclusion only.

In these past few days, I have already become aware of feelings and thoughts that I would not have known otherwise. It is data, observations and findings about life, love, and the character of God. I cannot say I really understand this all of the time. But God gives good gifts to his children.

## Saturday, February 21, 2009

### how i choose movies

A recent Pre-calculus class took a turn for the historic and I found myself mentioning Fourier. Jean Baptiste Joseph Fourier. (He was French). That evening, I cracked open my rather intimidating (almost as thick as it is wide) Stephen Hawking book "God Created the Integers" to read the bit about Fourier. He was a revolutionary in France who narrowly escaped the guillotine. He was a scientific advisor for Napoleon's expedition to Egypt, the discoverers of the Rosetta stone. Most impressively, he wrote a paper on the behaviour of heat and made the bold assertion that every function looks like a mess of trigonometry if you can scrunch your eyes just perfectly. In my class, I was shocked to hear myself relate Fourier, and it carried with it the faintest glimmer of familiarity as I stared into the murky depths of my university memories. But mostly it felt like accidentally scratching off a scab. My Fourier is a bit rusty.

I also recently read "Abel's Proof" by Peter Pesic which is (perhaps appropriately) mostly about Niels Henrik Abel, but which mentions Evariste Galois. Galois was also a Frenchman, presumably a Gaul, by the sound of his name. Also like Fourier, I mean, not also like Abel, who was Norwegian. And also a Frenchman like Fourier, I don't really know if Fourier was a Gaul. But Asterix was. Anyway, Galois was a revolutionary in France, but then it seems like they all were. He once uttered a threat to the king in the presence of Alexandre Dumas, who evidently frequented the same seedy revolutionary locales as Galois. Galois was a world class mathematician by the time of his death at 21, and he died in a duel after a tormented night of scratching down the beautiful (and ponderously novel) math in his head that he had no time to painstakingly articulate in the volumes that others would have to write about it instead.

Anyway, these recent tangents served as sines that I must have subconsciously weighed in my decision to watch "The Count of Monte Cristo" tonight. Dumas, duels, Napoleon... you can secant you?

## Monday, February 9, 2009

### hindustani chai

**Ingredients:**

*Water, Sugar, Tea Leaves, Milk, Cardamom, Cloves, Ginger, Cinnamon.*

First, the term Hindustani Chai is used to refer to a variety of concoctions that are very flexible with the spices. I have been served chai with garlic, and a different time with anise. Tradition classifies spices according to those which give warmth to the body and those which cool. The spices in chai are therefore subject to change throughout the year, as you would not consume a cooling spice in winter or a warming spice in summer. That said, we Burchells enjoy the following recipe all year round.

**Cardamom**is available here in little green pods which should be crushed. We use five pods for a pot of chai for our family (about 1 liter), but more if we make a large pot. If the cardamom pods are not crushed well, they will close up again when they are boiled and less flavor will be derived. Heh... derived.

**Cloves**should also be crushed. Cloves can have a tingly numbing effect on the mouth which I find enjoyable. Sometimes I suck on a clove while I make chai. Maybe I should not be admitting to this. Joie does not like it as much, so we generally use only five or six cloves.

**Ginger**should be available everywhere. We use a piece about the size of an adult big toe. Prior to writing these directions, I did not think of it in those terms. It does seem a bit morbid. We scrape the skin off the ginger before crushing it.

**Cinnamon**is cheaply available here, so we use plenty of it, probably about the equivalent to two of the scrolly looking sticks that sell in other hemispheres. Ours is more recognizably tree bark. If it is crushed well or boiled longer, less cinnamon could do nicely.

The spices should be crushed and put into about a liter of boiling water. This should simmer on the stove for five or ten minutes. It should smell amazing at this point.

After the spices have simmered, put about 1/3 cup of sugar into the pot and stir it so it dissolves. It will dissolve quickly, probably before you finish wondering how much of that sugar you are about to consume.

After the tea, we add the milk. I like to give the tea a couple of minutes to brew because I imagine the milk slows that down. The milk we use is a bit more than two-percent. It is also buffalo milk. Add milk until it is creamy. The chai is now complete. I leave it on the stove for another minute or so to heat it up after adding the milk, but take care not to let it boil again after the milk has been added. Boiling the milk will make the chai stick tenaciously to the pan and the cups, and it will cause your chai to grow one of those nasty milk skins on the surface that sticks to your upper lip when you try to take your first sip. Don't boil it. The local chai is usually boiled, and I suppose that one could come to appreciate the skin.

This recipe is easily varied to taste.

When the chai is done, pour it through a sieve into cups that need not look like rhinos. The chai will become bitter if the tea leaves are left in it for too long. If you want to save chai, strain it.