Throughout these lessons we will advocate a five-step approach to solving
computational problems. Below, we outline the approach and relate it to the
problem at hand.
- Problem. We begin with a clear statement of the problem. Ours is
to calculate the number of square feet of the earth's surface that every human
would receive if the surface were divided up evenly.
- Model. Before we can employ a computer we must find a
mathematical model for the problem. We will model the earth as a perfect
sphere of radius 4000 miles and the earth's population as 5.5 billion people.
As is almost always the case, we are making some significant simplifications in
moving from the problem to the model.
- Method. Once a problem can be described in mathematical terms, we
must settle upon a method for solving it on a computer. This requires knowing
what a computer can and cannot do. Our method here is quite simple: we will
use the formula for the surface area of a sphere to calculate the earth's area,
and then divide by the earth's population.
- Implementation. Once we have a method, we need to carry it out
with a computer, whether human or silicon. The method that we have just
devised could be carried out with pencil and paper, by punching buttons on a
pocket calculator, or by writing and running a C program on a supercomputer, to
give just three examples. We will use Maple to carry out the computations,
primarily because we want you to start learning how to use it.
- Assessment. The assessment step is usually the most important.
We must think carefully about the answers that we obtain to see if they make
sense, and try to identify the places where errors or unwarranted assumptions
crept into our solution. We might have made mistakes in describing the
problem, coming up with a model, designing a computational approach, and/or
implementing that approach. As we identify errors, we must try to fix the
problems and come up with an improved solution using the revised approach.
When we are finished applying the five-step approach to a problem, we'll have
the best solution we were able to derive along with some ``fine print''
detailing any problems turned up by the assessment step that we were unable to
resolve. Remember: almost any computational solution to a physical
problem will be approximate.
Joseph L. Zachary
Hamlet Project
Department of Computer Science
University of Utah