Pizza pi

2

Happy Pi Day! Every year on March 14th (written 3/14 in the US), people in the mathematical sciences celebrate all things pi-related because 3.14 is the three-decimal approximation to π ≈ 3.14159265358979....

Pi is a mathematical constant defined as the ratio of a circle's circumference (C) to its diameter (D). In symbols, π = C / D. In terms of the circle's radius, the definition is π = C / (2r). Circles are fundamental objects in mathematics, so mathematicians naturally are interested in properties of circles such as their area. As you will recall from grade school, the area of a circle involves π.

Ancient mathematicians did not have accurate approximations to π or even the formula for the area of a circle. That changed when the Greek mathematician, Archimedes, studied these problems circa 250 B.C. Two pi-related results were:

Rearrange Pizza Slices into a Rectangle

Archimedes solved both problems by using the concept of a mathematical limit centuries before calculus was formalized! His derivation of the formula for a circle's area is fascinating. Modern descriptions often use a large round pizza as a visual aid. As the pizza is cut into more and more slices, the slices can be arranged to form a figure that looks more and more like a rectangle, as shown in the figure to the right. You can find many videos that use animation to describe the method. In this article, I write a SAS program to visualize the "pizza pi" method.

The Archimedes method for the area of a circle

To find the formula for the area of a circle, Archimedes reasoned as follows. Suppose you cut a circle along a diameter to create N equal sectors. You can then rearrange the sectors linearly, alternating the points up and down, as shown in the previous pizza image. The resulting shape looks a bit like a rectangle. The height of the almost-rectangle is r, the radius of the circle. As you can see in the pizza image, half the crust forms the rectangle's top and half forms it's bottom. Therefore, the base of the almost-rectangle has length C/2, where C is the circumference of the circle (the crust of the pizza).

This is illustrated by the following graphs. The first shows a circle (or pizza) cut into N=8 equal slices.

You can arrange the slices in a row, alternating the orientation so that half the slices point up and half point down.

Because the left and right edges are slanted, the row of slices resembles a parallelogram more than a rectangle. However, you can make an additional cut to address that concern. Cut the first slice in half, and move one half to the right side of the figure. With that change, the figure has vertical sides and resembles a rectangle that has scalloped edges on the top and bottom, as shown in the following image. This is the mathematical version of the pizza image that was shown previously.

Take it to the limit

Whereas N=8 slices provides a crude approximation to a rectangular, using N=16 slices provides a better approximation, as shown below:

Although the mathematical formalization of limits was still 1,800 years in the future, Archimedes recognized that as the number of slices becomes larger and larger (a technique known as the method of exhaustion, for obvious reasons!), the height of the approximating rectangle approaches r and the base approaches C/2. The area of the rectangle is therefore A = base*height = (C/2)*r. Recall that π is defined as π = C / (2r). Because the area of the rectangle equals (in the limit) the area of the circle, Archimedes substituted πr for C/2 and—Eureka!—the area of the circle is (π*r)*r = π r2.

The method of exhaustion provides a formula for the area of a circle. However, if you want to approximate π numerically, it is better to use Archimedes's method of inscribed and circumscribed regular polygons. Archimedes formally proved that π is in the range (3 + 10/71, 3+10/70) by using a 96-sided regular n-gon. Notice that the right-hand side of the interval is the familiar quantity 22/7, which is an excellent approximation to π by a low-denominator fraction.

A SAS program to visualize the pizza pi approximation

As mentioned previously, you can find videos in which mathematicians literally slice of pizza and rearrange the slices. But as you can imagine, applying the method of exhaustion to a physical pizza is, well, exhausting! Consequently, I wrote a SAS program to illustrate the process.

Not only is running a program more accurate and less messy than cutting a pizza, the program enables you to slice the circle into an arbitrary number of slices. If you use a real pizza, you are almost surely going to slice the pizza into 4, 8, 16, 32, ..., slices. These powers of two occur because of the mechanical limitations of subdividing a real physical object. However, the program has no trouble slicing a circle into 17, 23, or 56 equal slices, a feat that is impossible by using kitchen scissors. For example, here is the picture for 56 slices:

As expected, the image with this many slices looks very much like a rectangle. If you were to zoom in on the upper and lower edges of the rectangle, you would see that the edges are still scalloped, but as the slices get thinner and thinner, the edge of each slice gets flatter and flatter. Consequently, the scalloping diminishes as the number of slices increases.

Summary

Archimedes used the "method of exhaustion" to derive the area of a circle by cutting it along its diameter and rearranging the equally sized sectors into a shape that resembles a rectangle. Although pizza would not be invented for another two millennia, it is fun to visualize Archimedes's method by cutting and rearranging slices of a pizza "pi". Since I am trying to reduce carbs, I chose to write a SAS program that demonstrates Archimedes's method. The program has an advantage over slicing a pizza in that you can slice the virtual circles into an arbitrary number of equally sized slices. The disadvantage is that you do not get to eat the demonstration after it is finished.

Share

About Author

Rick Wicklin

Distinguished Researcher in Computational Statistics

Rick Wicklin, PhD, is a distinguished researcher in computational statistics at SAS and is a principal developer of SAS/IML software. His areas of expertise include computational statistics, simulation, statistical graphics, and modern methods in statistical data analysis. Rick is author of the books Statistical Programming with SAS/IML Software and Simulating Data with SAS.

2 Comments

Leave A Reply

Back to Top