Sign In

Communications of the ACM

The profession of IT

Back of the Envelope


View as: Print Mobile App ACM Digital Library Full Text (PDF) In the Digital Edition Share: Send by email Share on reddit Share on StumbleUpon Share on Hacker News Share on Tweeter Share on Facebook
handwritten note

Credit: Alicia Kubista / Andrij Borys Associates

In our professional practice, we are often called to perform rapid, approximate calculations without a calculator. Any available scrap of paper such as an envelope will do to scribble on. These calculations are more than guesses but less than accurate mathematical proofs. Such scribblings can become the stuff of legend. How many times have we heard stories about successful and influential startup companies being born on the backs of napkins in the pub?

One consummate performer of such approximate calculations was the physicist Enrico Fermi, who famously estimated the TNT energy release equivalent of the first atomic bomb test in the New Mexico desert in July 1945 by dropping scraps of paper and measuring how far they moved as the shock wave passed by. Fermi had a quick approximation formula and the movement of the paper was its parameter. While his estimate had to be corroborated by more rigorous methods, the use of these so-called "back-of-the-envelope" calculations can often lead to startlingly useful results.

The famous Princeton statistician John Tukey was said by his colleagues to be constantly engrossed in solving problems. One day, a story goes, someone interrupted him to ask for the answer to a calculation. Without looking up, Tukey grumbled, "Would 10 digits of accuracy be sufficient?" The interrupter said, "Of course, that is more than enough!" Tukey reached the bottom drawer of his desk and pulled out a sheaf of computer printout. He said, "This is a printout of all 10-digit numbers. Your answer is in here. Look it up."

Since I knew and admired John Tukey, I believed the part about his irascible reaction to interruptions. But I did not believe the part about the printout in his bottom drawer. So I did a back of envelope calculation to figure out how much paper would be needed to print all the 10-digit numbers on the one-sided printouts of the day. I estimated that they could be printed four columns to a page, 60 lines to a page, for approximately 250 numbers per page. Then I took the number of 10-digit numbers, 1010, and divided by 250, to conclude the printout would contain 4x107 pages. Two reams of paper are 1,000 = 103 pages, so this is 8x104 reams. Clearly, 80,000 reams was much more paper than could possibly fit into the bottom drawer of his desk, much less his office, or even his statistics building. The story is a delightful yarn about Tukey's personality rather than the truth.

This example illustrates a common practice: we perform quick calculations to convert a number representing one thing to another. For instance, how many seconds are in a year? You would perform the following calculation (with the help of your envelope):

ueq01.gif

Notice a few things about these calculations:

  • They are a chain.
  • Each step converts one measurable quantity into another.
  • The units of the ratio of conversation are shown at each step.
  • The successive steps cancel the previous units of measurement, yielding the final unit at the end.

Keeping track of the units is sometimes called "dimensional analysis" and gives us trust in the results of the calculation. In other words, the artful back-of-the-envelope calculation is also an exercise in dimensional analysis.

With the aid of additional examples, I would like to show you how Little's Law, a famous formula from statistics, can arise from dimensional analysis. You do not need to know any statistics to follow what is going on and see how incredibly useful it is.

Back to Top

Little's Law

A certain Monsieur Tillet, retired algebra teacher, opens a gourmet restaurant. He maintains a wine cellar of Bordeaux red wines. He wants to serve his wines at the ideal age of 10 years. He is open 365 days per year and on average sells 50 bottles of wine each day. How big must his cellar be? The answer seems pretty obvious: over the 10-year period an average of 50x365x10 = 18,250 bottles are extracted from his cellar and are all replaced. Therefore, the cellar must hold 18,250 bottles. (At 12 bottles per case, that is 1,521 cases, a fairly large cellar.)

For future reference he represents his calculation with the formula:

ueq02.gif

Where N = average number of bottles, H = holding time, and X output rate. He verifies his formula by checking the dimensions. X is bottles/year, H is years, and therefore N has dimension "bottles." This formula is a law—an invariant relationship between the three measured quantities.

As you can see, Monsieur Tillet found this law by a dimensional analysis of his wine cellar. He just multiplied the averages he could measure and canceled out their units so that the final result had the proper units. Of course, this formula does not account for variations. On some days, Tillet sells more than 50 bottles, other days less. There is no guarantee that he will have enough 10-year-old wine available on any given day.

Tillet's formula is the famous Little's Law.4 In 1961, operations researcher J.D.C. Little demonstrated that, over a long period of time, the average number of items in a queue is the product of the average waiting time and the throughput. Although the proof was difficult, the formula became popular and central in queueing theory. Tillet's Law is not strictly the same as Little's. Despite having the same form, they are different because they rest on different assumptions. Tillet's Law deals with directly measured quantities, Little's Law with steady-state statistical quantities.

Tillet's form is called "operational Little's Law" because it is so simple that it is almost obvious when you are working with real data.2,3 No complicated math is needed to understand. A back-of-the-envelope calculation does the job.

Back to Top

Response Time Law

Further developing the business plan for his restaurant, Tillet was dismayed to discover that loyal customers were complaining about long delays to get a reservation. He had a mailing list of 1,700 customers who returned to make a reservation an average of 30 days after their last meal. He wondered if he could calculate the time it takes for his restaurant to serve the next loyal customer after they called in for a reservation.


The artful back-of-the-envelope calculation is also an exercise in dimensional analysis.


He realized that he could use his wine cellar formula to answer the question. He assumed that each customer consumed one bottle of wine, so bottles per day output became customers per day served. The holding time became the average time for a customer to cycle between average time waiting for a service, R, and average return time 30 days. Filling in Little's Law,

ueq03.gif

Solving gives R = 4 days. Having confirmed there was a problem, Tillet initiated changes in his restaurant to keep these customers coming back.

Like Little's Law, this formula appears in queueing theory for the average response time of a service system that has an average of N users, average away time Z seconds, and throughput X users/sec:

ueq04.gif

The away time is the time a customer spends outside the server part of the system before returning. As you can see, this is a simple rearrangement of Little's Law N=(R+Z)X.

Back to Top

Traffic Analysis

Tillet heard complaints from customers that there was a chronic traffic jam on the highway leading to his restaurant. The highway had a merge point where the road narrowed from two lanes to one. Customers approaching at 60 mph on the two-lane section suddenly had to slow and join a creeping jam 0.2 mi long before the merge, and then after the merge for another 0.1 mi before the speed picked up again to 60 mph—a total of 0.5 mi of jammed cars. Tillet wanted to calculate how long it takes to cross the jam.

Once again he decided to use Little's Law, where now H is the average time to cross the jam, X is the throughput, and N is the average number of cars inside the jam. But first, he needed to calculate X and N.

From the drivers manual and his own driving experience Tillet knew that most people adjust their speed to maintain a three-second distance from the car ahead. This means an observer on the side of the road would see the next front bumper every 3+L seconds, where L is the time for the car to move one car length. At speed r mi/min and standard car length 15 ft.,

ueq05.gif

No complicated math is needed to understand. A back-of-the-envelope calculation does the job.

At r=1 (60 mph), the time between cars is 3.17 sec and throughput is

ueq06.gif

Because the speed is r before and after the jam, all Tillet needs now is N, the average number of cars caught inside the jam. This is easy. Inside the jam, each car occupies 20 ft. of space—15 ft. for its car length and 5 ft. as separation buffer. The total number of cars jammed into a mile would be 5,280/20 = 264 and thus, because the actual jam occupies a total of 0.5 mi, the total in the jam is 132.

Now Tillet has what he needs for the calculation. Little's law says H = N/X = 132/18.9 = 7 mins. Although he was not happy with the jam, he told his customers that a seven-minute slowdown was well worth the fine food and wine they would get when they arrived.

Back to Top

Conclusion

Many back-of-the-envelope calculations involve dimensional analysis—build your own formula by multiplying or dividing known quantities such that the units of the final answer are correct. Dimensional analysis provides the scaffolding for detecting errors in the conversion formula. You need not remember the exact formula because you can easily construct it from dimensional analysis. There is, however, a caveat. Dimensional analysis is a quick check for the reasonableness of a calculation, but need not always yield the correct formula. For example, in physics the formula for distance traveled by an object in time t starting at rest under a constant acceleration a is d = 1/2 at2. Dimensional analysis will confirm the proper units of d but won't generate the factor 1/2.

Nonetheless, dimensional analysis will often permit you to create a formula that relates the quantities you know or can easily measure to the result you want. This column has demonstrated that Little's Law is really quite intuitive. If you know any two of its elements N, H, and X, you can easily calculate the third. I also showed a simple law for calculating the response time of a system that has a fixed number of recycling customers. The response time law is really Little's Law rearranged.

I went a little farther afield by applying Little's Law to simple traffic jams. At reasonable (non-jam) speeds, the throughput depends mostly on the time-separation of cars, but not their speed. Most drivers try to maintain a constant time separation from the driver ahead, except of course when in a traffic jam. It is easy to calculate the number of cars in the jam because they are packed closed together and each car occupies slightly more than a car length of space. The average number in the jam divided by the throughput is the average time a car is held in the jam.

If this method of analysis intrigues you, you can learn more about it. It is called operational analysis.1,2,3 Besides back-of-the-envelope calculations, it enables sophisticated calculations of throughputs and response times in networks of computers.

Clearly, there is more to back-of-the-envelope calculations than simply scribbling numbers on a scrap of paper. It is a useful professional skill and, as Fermi and Tukey showed, even an art form.

Back to Top

References

1. Buzen, J.P. and Denning, P.J. Rethinking randomness: An interview with Jeff Buzen. ACM Ubiquity (Aug. 2016), Article No. 1; doi/10.1145/2986329

2. Denning, P.J. and Martell, C. Great Principles of Computing. MIT Press, 2015.

3. Denning, P.J. and Buzen, J.P. Operational analysis of queueing network models. ACM Computing Surveys 10, 3 (Sept. 1978), 225–261.

4. Little, J.D.C. A proof for the queueing formula: L = λW. Operations Research 9, 3 (1961), 383–387.

Back to Top

Author

Peter J. Denning (pjd@nps.edu) is Distinguished Professor of Computer Science and Director of the Cebrowski Institute for information innovation at the Naval Postgraduate School in Monterey, CA, is Editor of ACM Ubiquity, and is a past president of ACM. The author's views expressed here are not necessarily those of his employer or the U.S. federal government.

Back to Top

Footnotes

My thanks to Jeff Buzen, Britta Hale, and Phil Yaffe for their comments on the drafts.


Copyright held by author.
Request permission to (re)publish from the owner/author

The Digital Library is published by the Association for Computing Machinery. Copyright © 2021 ACM, Inc.


 

No entries found