Logistic

Some interesting ways to calculate


Contents

  1. Introduction
  2. Counting Boards and the Abacus
  3. Logarithms and the Slide Rule
  4. Nomography
  5. Checking
  6. References

Introduction

In Greek, logistikh meant arithmetic, or calculating with numbers. In schools, it is dignified as mathematics, of which it is a small part. Now, geometry is real mathematics, but it is not taught any more in American schools. The Greek word appears in logarithms, "things for computing with numbers," another subject no longer making American schools unnecessarily hard. In any case, logistics or arithmetic is very useful; indeed, it is essential to survival in society, and so a proper subject for elementary education. Logistics is probably more familiar in general as the art of moving and quartering troops, the word derived from the French loger, to lodge.

These days, we have the wonderful advantage of the electronic digital computer, notably in the form of the pocket calculator. This powerful device is available at an unbelievably low cost. At the very least, it will peform the four arithmetic functions and take square roots. At only a modest increase in price, trigonometric and exponential functions are added. At other places on this site, the capabilities of the HP-48, an advanced scientific calculator, are discussed in detail. We won't speak of electronic computers in this article, except to note their existence and compare them with other computing resources.

Calculating machines were invented by Blaise Pascal in 1642, by Samuel Morland in 1666, and by Gottfried Liebniz in 1694. These were beyond the constructional skill of the time, and never worked well or became common. Only after about 1820 were calculating machines made practical. Typically, they could add and subtract, and sometimes multiply. They were used chiefly in business; scientific calculations depended on logarithms until recently. In the 20th century, excellent mechanical machines that could perform all four arithmetic operations became available, but were always expensive and heavy. They replaced logarithms to some degree until driven out by the electronic calculator, which not only could be made more capable (giving trigonometric and exponential functions), but, more importantly, were very much cheaper.

Perhaps we should mention first the common method of computing with pen and paper and mental calculations, called algorism, that had its roots in ninth century Baghdad, at the court of Harun-ar-Rashid. This method requires very little equipment, only the educated person's pen and ink, but learning it consumes many years of elementary education, including the memorization of addition and multiplication tables. It is very slow and error-prone, but is still hardly questioned as a fundamental of elementary education. Any really large problem cannot be done without error, unless laboriously checked, so prone are humans to mistakes. In spite of this, it retains a wide currency, and most pupils are brought to a rudimentary level of skill in it. The level is so rudimentary that most people today are capable of only a little addition and subtraction, with multiplication far too much trouble, and long division a mystery. Not many years ago, even the extraction of square roots was taught in American schools; possibly no one is now left there who can perform this wonder. See Square Roots by Hand if you would like to review the procedure. There is an amazing amount of effort expended on algorism in schools with very little result, and it falls almost completely under the despised classification of rote learning. A much smaller amount of effort would produce experts on the pocket calculator. It must, however, be emphasized that mental arithmetic is a very useful skill indeed.

Experience again how cumbersome algorism actually is by reviewing the method of adding a column of multidigit numbers. First, we have to write all the numbers down. Then, we begin at the right-hand column and add the digits mentally, hoping not to forget any of the carries. At the bottom of the column, we write down a digit of the sum, and write the carry at the top of the next column. The addition of single digits in the next column proceeds as before. Finally, we sum the furthest column on the left and have what we hope is the answer. To have any confidence in the result, we then repeat this operation from bottom to top instead, and see if we get the same answer. If some of the numbers in the column are to be subtracted, we must usually add the positive and negative numbers separately, and then do the subtraction with the sums, to avoid insurmountable difficulties in mixing addition and subtraction in the same column (though, of course, it can be done). With subtraction, there is the additional problem of borrows, which have to be explicitly recorded. The order of working is enforced by the requirement that when we write down a number, it cannot be changed. All of this is really very inconvenient and tedious. A good way to check algorism (casting out nines) is explained below.

Counting Boards and the Abacus

Algorism is a rather late development, not widespread in Europe until the 16th or 17th century, and hardly known elsewhere in the world. It began as a learned, not a popular, practice. Scientific and mathematical workers had used similar methods from antiquity, especially in dealing with sexagesimal numbers, but algorism did not penetrate to everyday life until then. The traditional and universal method of computing among the general public was to use movable counters that represented certain values, and actually to add or subtract counters representing the numbers under consideration. Counting on fingers is an obvious example of this, and one that was widely used and elaborated into complex systems, though now totally forgotten. The word "digit" comes from this, though digital computers do not use fingers. Chinese number sticks were another example. The word calculate even comes from calculus, a "pebble," typically used as a marker. The analogous Greek yhfos (psehphos), a "rounded pebble," gave rise to the verb yhfizw (psehfizo), which refers more commonly to voting, which was also done with pebbles, than to calculating. Parallel lines were drawn on a tabletop or scratched in the clay, representing units, tens, hundreds and so forth, creating a counting board, and even giving us the name of the table on which sales were made in a shop, the counter. When ten pebbles accumulated on the units line, they were removed and replaced by one pebble on the 10's line. The method was based on the decimal system (though it could just as well have been based on other radicals). These calculating boards were universal in every place where there was commerce, money and a developed numerical system. They were more accurate, and faster, than algorism, which probably required some time and effort to be accepted.

The number of markers that had to be handled was reduced by introducing markers with multiple values, especially 5 (Chinese number rods had values 1 or 5 depending on their orientation). A much greater advance was making the markers captive beads in the slots or on the rods of a portable counting board, now called an abacus. Abacus is simply the Latin for a counting board, from the Greek abax for the same thing. It is not known when or where the portable abacus was devised, but it was universal in the classical world, and small portable abaci were carried by anyone who had to do arithmetic. Roman numerals are simply an input-output notation for the abacus; no one even thought of doing algorism with them, and there was never any need to do so. Similarly, we use our number symbols with a pocket calculator, but the calculations are done in binary. The Roman abacus had 5 1's markers, and 2 5's markers in each slot, as well as markers for special purposes, such as halves. The markers were called claviculi, "little nails." Only two examples are known to have survived; they are illustrated in Menninger. No examples from earlier times are known.

The abacus is now associated with China and Japan, but it is a relatively late comer there. For information on Chinese numbers and the history of the abacus, see Chinese Numbers. It could have appeared in the 13th century, perhaps with the Mongols, but there are obscure earlier references. Its similarity to the Roman abacus suggests that that was the ultimate source, and this was very possible, since there were direct trade relations between the classical world and China, and Mongol traders were a bridge between East and West. It could even have been introduced by the Roman soldiers captured by the Persians and sold to the Chinese emperor as engineers. Most were later ransomed, but many found China much to their liking. The suan-p'an, the Chinese abacus, superseded the traditional calculating rods, and was transformed into its present form by the introduction of bamboo for the Roman brass, and beads on rods rather than buttons in slots. It retains to this day two 5's markers and 5 1's markers on each rod. The suan-p'an came to Japan as the soroban, which was streamlined and improved there into a very elegant device.

A typical soroban has 21 rods, on each of which is one 5's marker and 4 1's markers (some soroban apparently had 5 1's markers). The 5's marker is above the horizontal dividing bar, while the 1's markers are below it. The markers are given value by being moved to the bar with the index finger or thumb. While away from the bar, they "do not count." When using the soroban, one concentrates on each rod and then passes to the next, working from left to right, as numbers are read. There is no mental arithmetic as in algorism, but only consideration of 10's or 5's complements. The answers appear as if by magic, and are very seldom in error. The addition or subtraction is already done when the number has been entered.

A few examples will make it clear how to use the soroban. If you have access to a soroban, it will be much more interesting to do the examples on it. First, you should practice clearing the soroban, and seeing how each of the digits from 0 to 9 can be set. Note that every third rod is marked with a dot. In any calculation, the unit rod should be selected as one of these. This makes it easier to keep track of the digits in a large number, as by commas when the number is written down. Some operations are very easy to do, since enough markers in the right places may be present. For example, set 3 on the units rod. Now add 5 to it, which simply amounts to pushing down the 5 counter. 8 then appears automatically. You do not have to know that 3 + 5 = 8!

5 + 7 is a little more difficult. Set 5 on the units rod. There are not enough counters there to make up 7, so the only thing to do is add 10 on the next rod (do not do it now!) and subtract 3. To subtract 3, we can only subtract 5, by moving the counter up, and add 2, by moving two 1 counters up. In the first case, we had to know that 7 + 3 = 10, and in the second, that 2 + 3 = 5. Well, after this, move a 1's counter up in the next rod to the left. Since we are working from left to right, this changes the number that was there, something we cannot do in algorism, so we are forced to proceed right to left. Now what we have left is 12 on the two rods, which is the answer. At no time did we have to know what 5 + 7 is, only the tens and fives complements so we could manipulate the markers correctly. The 12 appears automatically! We only have to consider how to add and subtract markers from one rod at a time.

Now set the number 100 on the soroban. Let us subtract 1, or actually 001. There is nothing to do until we get to the third rod. We can't subtract 1 from 0, so we must subtract 10 from the rod on the left and add 9 to the rod under consideration. It is easy enough to add 9. Now we have to subtract 1 from the next 0, which again gives us 9. On the next rod, we do have a 1, so all that is necessary is to move it down. The result is 99. Now let's add 1 back. The units rod is 10 - 9, so we replace the 9 by 0. We have to add 1 to the next rod, which gives 0 again, and we have a 1 to add to the third rod. The result is 100. There is never anything to remember, never anything to write down.

Let's do 78 - 33. On the units rod, 3 can be subtracted immediately. On the tens rod, we must play the trick -3 = -5 + 2, and move the 5 and two 1's up. The answer, 45, appears automatically. Now, how about 73 - 38? Starting at the left, we subtract 3 by subtracting 5 and adding 2, giving 4. We can't subtract 8 from 3 in the units column, so we must subtract 10 in the tens column and add 2 in the units column. This means adding 5 and subtracting 3, which we can do. The 1 comes off of the ten's column at once, leaving 3 there. The answer is 35.

Logarithms and the Slide Rule

Until the development of electronic pocket calculators, logarithms were a great convenience in practical calculations, especially in trigonometry. They perform the operations of multiplication, division and raising to a power with great facility. Multiplication and division are reduced to addition and subtraction, and raising to a power to a simple multiplication or division, often by one digit. Logarithms were taught in the high-school trigonometry course, which gave excellent practice in the use of tables. The first chapters of a trigonometry text were devoted to the use of tables of natural (that is, non-logarithmic) trigonometric functions, and to logarithms. Four- or five-place tables of logarithms and trigonometric functions were at the back of the text. Among other things, the student learned how to interpolate in tables. Much of the algebra in trigonometry was devoted to putting relations in a form that could be calculated easily with logarithms (avoiding sums and differences).

The Scots mathematician John Napier, Baron Merchiston (1550-1617), introduced logarithms as an aid for trigonometric calculations in 1614, at the same period in which Indian (Arabic) numerals were being adopted in Western Europe. These digits are very well adapted to numerical tables, though logarithmic tables are possible in any numerical notation, even Chinese numbers, as was indeed done. Napier's logarithms are not those we use now. Napier did not have the advantage of exponential notation, which makes logarithms easy for us. Logarithmic calculations are very different from the digital calculations that can be done by Napier's Bones, another invention of his for performing multiplication that uses Indian numerals to good effect.

The logarithmic function x = log y is the inverse of the exponential function y = ax, where a is the "base" of the logarithms. Independently of its use in calculations, the logarithmic function is of great importance. If the base a = e = 2.7182818..., then dy/dx = y, a simple and useful result in calculus. Logarithms to the base e are called natural, hyperbolic or Naperian logarithms, often written ln y. An ordinary number can be expressed in "scientific" notation in the form 5.08 x 106, where a number between 1 and 10 is multiplied by a power of 10. If 10 is the base of the logarithms, then log (5 x 106) = log 5.08 + 6. The first part, log 5.08, is the mantissa and the 6 is, of course, the exponent, or characteristic. Then we can find the logarithm of any number using simply a table of mantissas for numbers between 1 and 10 (ranging from 0 to 1), something that is not possible with natural logarithms. These are common, decimal or Briggsian logarithms, often written log y, invented by Lucasian Professor Henry Briggs of Oxford (1561-1631) in 1617. It is clear that the benefits of common logarithms is mainly in the use of a small table and the relation to ordinary decimal numbers. Sometimes the base is written as a subscript to the designation log, especially for other bases than e or 10.

If y = ex and y' = ex', then yy' = exex' = ex + x', or log yy' = log y + log y'. Similarly, log y/y' = log y - log y'. Also, yn = (ex)n = enx, so that log yn = n log y. In particular, log √y = (1/2) log y. These very familiar rules contain all the theory of computations with logarithms. For those who may not have seen logarithmic computations before, let's do 34.5 x 7.48. From 5-figure tables, log 34.5 = 1 + .53782 and log 7.48 = 0 + .87390. The sum of these is 2.41172, or 2 + 0.41172. This is the logarithm of a number between 100 x 2.580 and 100 x 2.581. By interpolation, we get 100 x 2.5806, or 258.06. This happens to be exactly the answer given by a pocket calculator.

It should be said that for numbers smaller than 1, such as 0.0583, or 5.83 x 10-2, the logarithm is written as -2 + 0.76567. Usually, the number was written all together, with a line above the 2. For example, log 1/2 = -log 2 = -0.30103 = -1 + 0.69897, which corresponds to 5.0 x 10-1. Another method, common in trigonometric calculations, was to add 9 and subtract 10 (the -10 might not be explicitly written). The exponents were always handled separately like this, which avoided inconvenience in using the tables, which were always for positive mantissas.

The use of a graduated scale to add and subtract logarithms by taking distances off by dividers (instead of by using numerical tables) was introduced by Edmund Gunter in 1620. (The same that invented the 66-ft chain of iron links for surveying that was much easier to use than poles.) Movable scales that added and subtracted logarithms directly were invented by William Oughtred in 1630. In 1657 these were put into the form of a movable slide in a fixed stock by Seth Partridge. In 1775, the cursor was added by John Robertson. The log-log scale for handling powers was invented by P. M. Roget of France in 1815, but languished until 1900. The modern slide rule is called the Mannheim type, after the French artillery officer who arranged it in convenient form. The history and use of this very important engineer's tool is told in another article, The Slide Rule, to which the reader is referred for further information, and for a picture of a slide rule. The pocket calculator ended the importance of the slide rule, as it did logarithmic tables, in the 1980's. The slide rule is still interesting to look at, calculates rapidly, and does not need batteries.

Nomography

Nomography is graphical computation of a special sort. Instead of solving general problems, as addition can do, very specific problems are solved in such a way that the results can be obtained for different values of the independent variables. A nomographic solution expects the same problem to be solved over and over, and gives the solution practically instantaneously. Nomographs are still as valuable as they always were, especially for complicated relations or finding implicit variables. The word comes from the Greek nomos, for "rule," referring to the functional relationship between the variables that is expressed by the nomograph.

In nomography, quantities are represented by distances in the form of scales. For a linear scale, distances S are proportional to the values of the variable X, or S = xX, where x is the scale factor. This should be quite familiar from maps, where, for example, a scale of 1" to the mile has a dimensionless scale factor x = 1/63,360. We retain this relation even when the quantities are not both distances. A scale in which 40 mm represents 1 atm pressure would have a scale factor of 1/40 atm/mm. Scales may also be nonlinear, as logarithmic scales or square scales. In this case, the scale factor is not constant, but varies with position on the scale. For a logarithmic scale, we may take S = 100 log x mm, so that one cycle corresponds to 100 mm.

The simplest nomograph are stationary adjacent scales. We often see such scales on a thermometer, with Celsius on one side and Fahrenheit on the other. It can be used to read the thermometer on either scale, or just as well to convert between Fahrenheit and Celsius without considering the thermometer. The reader may make adjacent scales of distance from 1" to 10" and commmon logarithms from 0 to 1. Slide rules usually have such scales, which are read by using the cursor to mark corresponding values. Adjacent scales can "solve" the functional relationship f(x,y) = constant, where there are two functionally dependent variables, either of which may be taken as independent.

Much more interesting is the case of three variables, for example X + Y = Z or XY = Z. Such relations are expressed by the alignment nomograph, the typical and characteristic tool of nomography. Indeed, the science of nomography is generally largely restricted to such alignment diagrams, in many different forms. In any such nomograph, we have three scales, one for each variable, and they are very often linear. A straight line intersects the three scales at corresponding points. It is best to have a transparent piece on which an accurate and sharp cursor line has been drawn, so that the scales can be read accurately. Using an opaque straightedge covers the scale asymmetrically, so reading is rendered difficult.

The relationship between distances on three parallel lines is a linear one, regardless of the spacing of the lines or their zero points. However, it is easiest to grasp what is going on in the simplest case of three equally-spaced vertical lines whose zeros are on a horizontal line. Consider an arbitrary line cutting the three lines at points A, B and C. The reader can easily prove that the distances from the zero points (which we shall represent by the same letters for brevity) are related by B = (A + C)/2. Suppose that we choose B = zZ, A = xX and C = yY, in terms of scale factors and values of the variables X,Y,Z. Then, 2zZ = xX + yY. If we choose the scale factors to satisfy x = y = 2z, then we have Z = X + Y. The reader can easily make such a nomograph and test its functioning. We are not restricted to linear scales by any means; X, Y and Z can each be related in a complex way to other variables. If B = 50 log Z, A = 100 log X, and C = 100 log Y, then the nomograph will do log Z = log A + log C. When appropriate, the scales can even be extended to negative values and the nomograph will still be valid. The spacing of the lines and the scale factors can be varied to solve the problem in the most convenient way possible.

The simplest nomograph that does multiplication is formed from two parallel lines and a slant line crossing them at points A and B. It is called an N-diagram from its shape. In one useful form, the scales on the parallel lines are linear and have scale factors x and z. Let the Z-scale be measured downwards from a zero at A, and the X-scale measured upwards from a zero at B. If we consider an arbitrary straight line crossing the parallel lines at D and E, and the slant line at C, it is clear that the triangles ACD and BCE are similar, so their sides are proportional. If K is the total distance AB, and S the distance AC, we see that AD/BE = S/(K - S). Since AD = zZ and BE = xX, we have zZ(K - S) = xXS, or Z = X(x/z)S/(K - S). If we want this nomograph to solve Z = XY, it is clear that we must take Y = (x/z)S/(K - S). That is, choosing the scales for z and x determines the scale for Y, and it is not linear. To draw the nomograph, we need S as a function of Y, and this is easily seen to be S = KY/[(x/z) + Y]. Note that this depends only on the ratio of the scale factors for z and X. V = 0 corresponds to S = 0 (point A), while V = ∞ corresponds to S = K (point B). The scales may be extended to negative numbers if appropriate.

As an example, suppose we require a nomograph to solve Francis's weir equation Q = 3.33LH3/2 cfs, where the width L and the head H are in feet. We take Q as Z, L as X, and 3.33H3/2 as Y. Let's put it in a rectangle 8" high and 4" broad. Let 1" = 10 cfs and 1" = 1'. Then, z = 1/10 and x = 1, so that x/z = 10. Then, S = (8.94")Y/(10 + Y). For H = 2', Y = 3.33(2)3/2 = 9.42, and S = 4.34". Mark this point on the slant line with the value of H. The reader may want to draw this nomograph, and plot enough values to calibrate the slant line. We can enter with any two of the variables Q, H and L and find the third one very quickly. This is not a trivial nomograph, and shows clearly how one is constructed.

Draw three lines meeting in a point O, one horizontal, one at 60° and one at 120°. Suppose these lines are intersected by a straight line at points A, B and C. Draw an equilateral triangle OCD on OC. Side OD will be an extension of line OA, while CD will be parallel to OB. From similar triangles, we see that (OA + OD)/DC = OA/OB. OD = OC since OCD is equilateral. Therefore, we find that 1/OA + 1/OC = 1/OB. This nomograph establishes the given relation between distances measured on the three lines. Each of the three lines can be extended to negative values on the other side of O, giving a hexagonal appearance. This is called a hex nomograph, and it finds the reciprocal of the sum of reciprocals.

One application (which I have never seen in an optics text) is to the Gaussian lens formula 1/u + 1/v = 1/f, where u and v are the object and image distances from the centre of a thin lens of focal length f. For a converging lens, f is positive, while it is negative for a diverging lens. Label, for example, line OA as u, OC as v, and OB as f. The behavior of the object and image distances for a thin lens are easily seen. For example, when the object is at an infinite distance, then the image is at the focal point, or v = f.

As a final example, the circle nomograph also multiplies: Z = XY. Divide the circle with a diameter of length 2a that forms the Z axis, while X is measured along the upper semicircle from 0 at the right to ∞ at the left, and Y is measured similarly on the lower semicircle. Let θ be the angle between the ∞ end of the diameter and the point representing X = tan θ. Let φ be the similar angle determining Y = tan φ. The angle at the center to these points is twice the angle at the end of the diameter, of course, which can make them easier to lay out with a protractor. Once you have calibrated the X and Y semicircles, join the necessary points to calibrate the Z axis. The formula for the distance corresponding to Z is S = 2a/(1 + Z), which can also be used. When Z = 0, we see that S = 2a, and when Z = ∞, S = 0. The proof that this works is left to the reader.

Checking

When a pocket calculator is used to make a calculation, it can best be checked by having two people independently perform the calculation. If the two answers agree, then the result is probably correct. Since the calculators are infallible, the only sources of error are in the keying in of numbers and the operation of the calculator. Two operators are unlikely to make the same mistakes. A single operator can do fairly well by taking great care in entering the numbers, checking each entry on the display, and performing the calculation twice, preferably in a different order. Once you have made a mistake, mere repetition will usually produce the same mistake (the mind thinks it knows what to do without wasting time) if only a small interval has elapsed between the calculations.

Algorism is so error-prone that some check should always be made. A very effective classical method is "casting out nines." The key is the reduction of any number to a single digit, the check digit, by first casting out all 9's, then all pairs of numbers adding to 9, and finally adding the digits remaining until only one digit remains. A skeleton computation is then made with the check digits, and the answer should agree with the check digit of the answer. The theory of this check is the expression of numbers as single digits modulo 9, and performing the calculation with these single digits. This is explained in Algebra.

For example, consider the sum 514 + 208 = 722. In 514, cast out the 5 and the 4, leaving the single digit 1. In 208, add 2 + 0 + 8 = 10, 1 + 0 = 1, which is the check digit. The sum of the check digits is 1 + 1 = 2. In 722, cast out the 7 and the 2, leaving the check digit 2, which agrees with the sum of the check digits of the addends. For the product 5048 x 17 = 85816, the check digit of 5048 is 8, as is that of 17. Their product is 64, 6 + 4 = 10, so the product of the check digits is 1. 85816 becomes 5 + 8 + 6 = 19. Casting out the 9, the check digit of the product is 1. The result checks. In division, the product of the check digits of the divisor and the quotient, plus the check digit of the remainder, should equal the check digit of the dividend. As you can see, this is very easy to do, and a valuable check. See if you can find an arithmetic teacher who knows how to do it! (Some few do, and may they be blessed!)

The most common error in transcribing a number is the transposition of neighboring digits. Once made, it becomes almost undetectable by the victim. The check digit from casting out 9's cannot help here (casting out 11's will, however, detect transpositions; see the link above). For example, 154 and 145 both have the same check digit, 1. One way of forming a check digit that will reliably discover such transpositions is used by the Deutsche Bundesbahn in locomotive numbers. For example, the number 103 001 (the first machine in the 03 series of electric locomotives, whose numbers begin with 1) has the check digit (Kennziffer) 4. To find it, write 121 212 beneath the number and multiply each corresponding digit, then sum the result. Here, we find 1+0+3+0+0+2 = 6. The next higher multiple of 10 is 10, from which we subtract the 6, getting 4, which is the Kennziffer. The number would be reported as 103 001 - 4. Now suppose some idiot reported 103 010 - 4 instead. Now, we have 1+0+3+0+1+0 = 5, and 10-5 = 5, but 4 appears instead, so something is wrong. A check digit like this is used in many circumstances today, for example in banking. It is an example of error detection embedded in the number itself. Elaborate error detection schemes of this type are used for digital data, which also must be checked like algorism results. Here the chance of an error is very small, but there is a very large amount of data.

References

T. Kojima, The Japanese Abacus (Rutland, VT: C. E. Tuttle Co., 1954).

K. Menninger, Number Words and Number Symbols (New York: Dover, 1992). Menninger's work is mainly concerned with language, not mathematics. This book is rich in information, but I do not agree with all of Menninger's conclusions. He is a zero enthusiast, and does not (I think) grasp the nature of Roman numerals.

R. D. Douglass and D. P. Adams, Elements of Nomography (New York: McGraw-Hill, 1947).


Return to Mathematics Index

Composed by J. B. Calvert
Created 6 January 2004
Last revised