This is a blog where NU Math faculty post mathematical comments on the television show "Numb3rs".
Pascal's Law has already been discussed in the blog "Pascal's Law and fire hoses" from two years ago. Pressure means force per unit area; it is a vector quantity, so has magnitude and direction.
Pascal's law says that, at a given point, the pressure upward is the same as the pressure downward, or to the left or to the right. This is illustrated in the diagram below. The red arrows give the direction and magnitude of the pressure at the point P: they may point in different directions, but their magnitudes (lengths) are all the same.

I guess you may have noticed that I've been talking about pressure (force over area), but the diagram is labelled with forces. Let me explain. The pressure can vary from point to point; in fact, the deeper you go in the water, the greater the pressure. The diagram shows a small piece of area -- so small that it is nearly all on the same level in the water, so the pressure on it is pretty much constant. Since pressure is pretty nearly force/area for our tiny surface, we see that the force = pressure × area (pretty nearly). The diagram shows the pressures (different directions, same magnitudes) each multiplied by the area of S. Thus, the forces on S have different directions but pretty much the same magnitudes.
In the diagram I highlighted the particular force which is perpendicular to the small surface S. I then took the "upward" component of the force, shown in blue. This is the part of the force on S which acts upward, and is called the buoyancy of S. If S is completely surrounded by water then there is an equal and opposite force to this buoyancy which cancels it out. However, if S isn't completely surrounded by water -- for example, S is part of the hull of a ship or part of the skin of a floating person -- then this buoyancy is countered only by the weight of S.
OK, now let's apply this idea to a vertical cylinder immersed in water. We will suppose that it does not sink, so the picture looks like this:

Since it does not sink, the downward force of its weight equals the upward force of the buoyancy. As you can see from the picture, the forces of the water on the sides (perpendicular to the sides) cancel (or, equivalently, the buoyancy components on the vertical sides are zero). Thus, the buoyancy is caused completely by the force of the water upward on the bottom of the cylinder. As shown in the diagram, this is equal to the weight of the cylinder. But we can compute this buoyancy from Pascal's Law. Since the pressure on the bottom is constant (it is all at the same depth), this upward force is simply the pressure at that depth times the area A. But this pressure is simply the weight of the volume of water which lies over a unit area (since pressure is force/area = weight/area and we're letting the area be = 1). This is equal to the volume of the water times the water's weight per unit volume, which we'll call p (e.g. A cubic meter of water weighs about 9800 Newtons; a cubic foot of water weighs about 62.4 pounds: p depends on your units). Thus, the pressure is simply Volume × p = Area (which is 1) × h × p. Thus, the upward force is given by:
buoyancy = A × h × p = Volume of displaced water × p = Weight of displaced water.
Since our object, a cylinder, is floating, buoyancy = weight of object. This gives us the very famous and very old result.
Of course, we have just demonstrated Archimedes' Principle for a simple cylinder; it is true for any object which floats, however. To prove it in this more general case, one possibility is to picture the floating object as encased in a cylinder, where the space outside the object and inside the cylinder is filled with water up to the level of the surrounding water. I'll leave it to you to "fill in" the rest of the argument (I'll post it in a later blog if there is demand to see it).
Another way to generalize Archimedes' Law to arbitrary-shaped floating objects is to think of them as making a "hole" in the surrounding water. The upward force (buoyancy) just depends on the size and shape of the hole (this is an integral calculus argument motivated by dividing the surface of the hole into small surfaces as in the first diagram above, then adding all the buoyant forces for each of them). But the volume of this hole is just the volume of the water displaced. If we fill the hole back with this water, the water will exactly "float" in the surrounding water, so its buoyancy (which equals the weight of the original object making the hole) will equal the weight of this filled in water, and we get Archimedes' Law again.
Here's a question: When will an object sink, and if it does, what can you say about the water it displaces?
Your blogmeister
Tue, 9 Oct 2007 00:00:00 -0400
In the 17th century, the great mathematician Pierre de Fermat enunciated his optical law:
In the simple case of just two points separated by air, this just means that light travels in a straight line -- the shortest distance between the two points. But there are more complicated situations. One of the easiest to deal with is reflection.
In the diagram below, we apply Fermat's Principle to light rays (red and green) being reflected from a mirror (blue). They both start at point A and end at point B, but which is the correct path of a light ray that must hit the mirror?

Please refer to this diagram. The special point P is constructed so that the angles shown, labelled α, are equal; this not true for any other point Q. We now reflect the point B across the mirror to get point B'. Because of congruent triangles, the lengths PB and PB' are equal; so are QB and QB'. Thus the paths APB and APB are equal, as are the paths AQB and AQB'. Elementary geometry shows that, because of the equal angles, path APB' is a straight line. Since the straight line APB' between points AB' is the shortest distance between them, it follows that path APB' is shorter than path AQB'. From this we see that reflected path APB (the one with equal angles) is shorter than any other reflected path AQB.
Now we apply Fermat's Principle. Since the speed of light is constant within a particular medium, say air, the path that is the shortest distance also takes the shortest time. So, APB, the shortest (in distance) path, is the one taking least time: the "Fermat path." This is the one that light actually takes. Thus, Fermat's Principle, together with a little bit of Euclidean geometry, has enabled us to deduce the following:
(If you play pool or billiards you know that light is not the only thing that behaves this way.)
Now we come to a more complicated example. Suppose light starts at a point A and travels through some medium -- say air -- then enters another medium -- say water -- where it travels until it reaches point B. We assume it travels at a constant speed through medium A and at a constant speed through medium B. If these speeds are equal, then the Fermat path must be a straight line, since it is the shortest distance between A and B. But what if the speeds are not equal? Then within each medium light will travel in a straight line, but the entire path may not be straight: it may take a "bend" at the junction of the two mediums. How can we predict it? Here is a picture of the situation:

The light follows the green path through medium A till it reaches the boundary between the two mediums at point P. It then follow the straight path in red till it reaches B. How is P to be chosen?
Let us denote by SA the speed of light in medium A and by SB the speed in medium B.
We now have to take time into account in applying Fermat's Principle. For each P we compute the length of the line AP and divide it by SA to get the time light takes through medium A. Similarly, the length of PB divided by SB is the time light takes on the leg of its journey through medium B. The total time is then
Surprisingly, it turns out that is is a fairly easy problem in first-year calculus. P has to be chosen in such a way that the angles that the two lines of the path make with the perpendicular, α and β in the diagram, must satisfy a simple relationship of great importance in optics:
Once again, Fermat's Principle, together with some math (more advanced this time), enables us to deduce an important law of physics. Incidentally, Fermat's Principle itself is a consequence of an entirely different approach to the behavior of light that is a part of physics called Quantum Electrodynamics. Richard Feynman's wonderful book "QED" (Princeton University Press) is a great intro to this subject -- and it's not too hard to read.
So we return to Charlie's problem. If we knew exactly what the victim's face looked like, we could take each point on that face and trace it through the water out into the air, using Snell's Law, and thus predict where it would end up in the picture. This idea is called "ray tracing" in computer graphics (it is also applied to reflected and scattered light). However, we have the inverse or opposite problem. We have the picture and we have to "go back" and figure out what the victim's features were that produced it. I have discussed these "inverse" problems before, most notably in the blog "An ear to the ground", about reflection seismology. These inverse problems are tough to solve, and the math involved varies from one kind to another. Yet, the general ideas are well-known and a lot of successful work has been done by applied mathematicians in reconstructing images when you know how they were formed.
Well, that's it for today. I'll try to write about some other math from this episode later.
Your blogmeister
Sat, 6 Oct 2007 00:00:00 -0400
Wolfram, makers of the powerful computer algebra system Mathematica is one of the paid consultants to Numb3rs, providing the writers and producers with many of its mathematical ideas. You should definitely check out Wolfram's site. It is more technical than this blog, but it also has fascinating graphics developed using Mathematica. I am in correspondance with some of the folks at Wolfram, and we hope to work together to provide interesting and understandable math background to the show at all levels.
Last Friday's show, Trust Metric, mentions lots of different topics. One of the first is the idea of a "trust metric." This is a term used in mathematical psychology and sociology. In mathematics, the word "metric" has a very precise meaning: a metric d is a way of measuring distance between two points P and Q in some mathematical "space":
If you've taken analytic (or coordinate) geometry, you've seen the most elementary example of a metric, where the distance between two points is the sum of the squares of the differences between their x and y coordinates:
Another metric is the "taxi-cab" metric: simply take |x2 - x1| + |y2 - y1|. (It's called taxi cab because it simply measures the total east-west + north-south distances that you cover if you drive on rectangularly laid out city streets.)
It is clear that the Pythagorean metric has to be generalized, since if you measure distances between points on a bending or curved surface, you must measure "along the surface" to get an intuitively true distance. For example, the distance between New York and Chicago must be measured along the surface of the earth. Since the earth is not even a perfect sphere, this can get complicated. The mathematics of precise earth measurement is called "geodesy." The great mathematicians C. F. Gauss (1777-1855) and Bernard Riemann (1826-1866) began the modern study of metrics for non-flat surfaces.
Anyway, returning to "trust metrics": These metrics are ways of measuring the "magnitudes" or sizes of "trust vectors." A trust vector, like many examples of vectors, is an ordered "list" or "n-tuple" of numbers. These numbers are various parameters (numerical variables) which measure qualities that are associated with "trust." (For other examples of vectors outside of physics, see the blog Face Recognition Algorithms which describes "face vectors.")
At this point we leave the realm of precise mathematics and enter the domains of psychology and sociology. A trust vector is like a report card, having various categories which might vary from school to school. For example, a corporate trust vector might have (numerical) ratings for percentages of team meetings attended, or projects successfully completed, or company resources handled dependably, or ratings by fellow employees or managers. You can imagine what kind of categories Charlie might have used in constructing a trust vector for an FBI agent like Colby Granger. A trust vector might have only a handful of components, or a hundred or more.
Next, we have to construct a "metric" or measure which combines the various components of a trust vector into a single number measuring "total" trustworthiness. We could simply take the sum of the squares of the components of the trust vector, then the square root of that. This might be called a "Pythagorean" trust metric. However this probably wouldn't be a very good indicator of trustworthiness, since some factors are more important than others. Thus, we would be more likely to add "weighting" factors to some of the components of the trust vector. The relative sizes of these weights would depend on a careful statistical analysis, say of all employees and their behavior, over a number of years. We would want to correlate the different components with their historical significance in terms of employees who, it turned out, were or were not trustworthy. The more data, the more the trust metric can be fine-tuned to have good predictive value. Very sophisticated branches of mathematical statistics are used to make these analyses.
So, can we trust "trust vectors"? My guess is that we can if the evidence is overwhelming, and the consequences of mistakes are not too serious. For example, if the "average" trustworthy person has a trust metric of 0.80, and a particular person scores a 0.04, then it might not be prudent to trust that person with your life savings (or with a highly responsible position in your company). On the other hand, firing a person with a 0.72 metric -- or worse, threatening bodily harm to such a person -- seems to go beyond what a single number should be used for. Similar abuses took place (and still do) in using "IQ" scores to pigeon-hole people. Charlie is pretty careful not to push his score for Colby; in fact, he refused to even give it.
Charlie also mentions a related concept: Fuzzy Logic. Contrary to its name, this is a very precisely defined and carefully developed mathematical/logical concept, but its popular useage has distorted its meaning. (In a similar way, Einstein's theory of relativity has been attacked over the years by opinionated but ignorant people as advocating moral relativism and general permissiveness -- positions Einstein himself abhorred.) Here's a simple example. Consider a circle of radius 1 and a point P. In traditional logic, the statement "P lines inside the circle" is either true or false. However, in the "real world," we can't always determine by measurement whether P lies in the circle because we may not have complete knowledge or accurate enough tools. Thus, we may define the "INSIDE" fuzzy set as those points which lie within 0 to 0.87 of the center and the "RIM" fuzzy set to be those with distances between 0.87 and 1.13. Instead of saying the a point lies inside the circle or not, we might say that the statement that it lies "inside" is 87% true and 13% false. There are precise rules for combing fuzzy statements using the logical operators "AND", "OR", "NOT" etc. This is a field which has had many useful applications in engineering, and many controversies regarding its philosophy and independence from other fields such as probability theory.
Charlie also mentions, in passing, Game Theory and Nash equilibria. We have mentioned Game Theory several times before, in discussing The Prisoner's Dilemma and Tit For Tat. I have also pointed out that Game Theory has been much used by the "military-industrial complex" -- especially the Rand Corporation -- to devise various war games, scenarios for nuclear attack/deterrance, and other supposedly mathematical arguments to advance the cause of "defense" spending and certain foreign policy stances. I doubt that many mathematicians outside the influence of the Pentagon have much to say in support of the efficacy of this use of Game Theory. Readers' comments are invited.
I have discussed "pursuit curves" in the blog "Spree": Pursuit Curves and the two succeeding blogs from May of this year (2007).
The "Set Covering" and "Set Deployment" problems are discussed fairly technically on the Wolfram blog mentioned above. Unfortunately, the general-purpose algorithms for dealing with this, which are part of Mathematica, are not really described because they are too complicated. Let me try to offer a somewhat simplified description of how they work. Say you are given a map of a small city which, for the sake of simplicity, is a 10" x 10" square (area = 100 square inches). Say you are given 8 paper disks, each of diameter 4". Each disk has area somewhat greater than 12.5 square inches, so their combined area is more than 100 square inches. We should think of each disk, in the context of the show, as the area coverable by a police officer. Is it possible to completely cover the city square with these police disks; i.e. can we have every area of the city covered by the police?
You should try this with some paper disks and a square. You'll soon see that because of the circular shapes, the disks don't fit together with either each other or with the square: they will overlap each other and the edges of the square -- causing "waste." How much of the 100 square inches of area can you cover, and how? This is a "set covering" problem.
Certainly you can fit 4 of the disks nicely inside the square, since their diameters allow them to fit inside an 8" x 8" square. But what to do with the remaining 4 disks? You might start by putting them in some nice symmetrical but overlapping position. But will this be optimal? Although our eyes and brain have wonderful global perspective and multitasking skills, they are not so good at estimating areas and overlaps quantitatively; computers, however, can do this quite well. So we have to write a program where the computer can place the disks (i.e. specify their centers C1,...,C8), then compute the actual area they cover (say as a percentage of the area of the square): A(C1,...,C8), This is not so difficult to do. What we would now do, as humans, is to try to "perturb" or move the disks slightly in the hope of improving this coverage. We need some systematic way of doing this -- some strategy or algorithm. What the computer can do is try a small perturbation: move a few disks to the left or right or up or down, and recalculate the area. Try a few systematic moves and see which are more or less successful. The computer can "learn" what seems to be a good idea, then follow it up, or combine several good ideas, always discarding schemes which have low or negative yield, and emphasizing ones that are most productive. In some sense, the computer can modify its own strategy on the basis of what it learns. This is sometimes called genetic programming -- devising a genetic algorithm -- and is the subject of much computer-science/mathematics research these days. The computer doesn't have to "know" what it is doing, it just needs some "objective" function A(C1,...,C8) which is tries to maximize as it shifts around the values of its variables. See the Wolfram website for a more technical description and references.
OK, my blogging muscles have atrophied from a summer of disuse, so I'll stop here while I savor the success of the Red Sox (and watch their last regular season game). More later.
Your blogmeister
Sun, 30 Sep 2007 00:00:00 -0400
Your blogmeister
Tue, 25 Sep 2007 00:00:00 -0400
One of the problems with this algorithm or recipe is that it can take a long time to run since distance computations have to be made for each pair of "nodes" or intersections of routes. In computer science -- a field that uses a lot of mathematics and mathematical reasoning -- there is often a "trade-off" between speed and data. Often, a lot of time can be trimmed by "precomputing" certain quantities and saving them in computer memory or on a hard disk or other storage medium.
In a recent note in the journal Science (April 27, 2007), authors H. Bast, S. Funke et. al. describe a routing method which identifies various levels of roads, from very local streets (level 0) through high-speed large highways (level 4). Nodes are connections between lower levels and higher ones, and transit nodes are connections between highest levels and lower levels. According to the authors, a highway map for Western Europe will have about 18,000,000 nodes, which include only about 11,000 transit nodes. For given cities A and B, transit nodes are determined which are "near" A and which are near B. (In an example they give, they find 4 transit nodes for A and 4 for B). Their algorithm computes all possible distances between pairs of nodes (16 pairs in their example, many billions for all possible source and target cities). It also computes ideal paths between, say, A and its "nearby" transit nodes. All this information is computed for all possible cities A and B, once and for all, and stored efficiently in a monster "lookup" table. The authors say that constructing the table took three hours of high-speed computer time, and the table occupies about 4.5 gigabytes of space. 10 years ago this storage would have been unfeasible, but now it is no problem
With all this pre-computation of distances, evaluating route times for a particular pair of terminals A and B is very fast, so finding optimal routes is much speedier.
Of course, there is still a problem: the shortest route in terms of distance is not necessarily the route you want to take, even if it involves major highways. Recently, several motorists died when they followed their computer-chosen route in the winter: it led them onto a road that didn't exist during major snowfalls.
Your blogmeister
Sun, 15 Jul 2007 00:00:00 -0400