# 13: Sums and Asymptotics

• Eric Lehman, F. Thomson Leighton, & Alberty R. Meyer
• Google and Massachusetts Institute of Technology via MIT OpenCourseWare

Sums and products arise regularly in the analysis of algorithms, financial applications, physical problems, and probabilistic systems. For example, according to Theorem 2.2.1,

$\label{13.1} 1 + 2 + 3 + \cdots + n = \dfrac{n(n+1)}{2}.$

Of course, the lefthand sum could be expressed concisely as a subscripted summation

$\nonumber \sum_{i = 1}^{n} i$

but the right hand expression $$n(n+1)/2$$ is not only concise but also easier to evaluate. Furthermore, it more clearly reveals properties such as the growth rate of the sum. Expressions like $$n(n+1)/2$$ that do not make use of subscripted summations or products—or those handy but sometimes troublesome sequences of three dots—are called closed forms.

Another example is the closed form for a geometric sum

$\label{13.2} 1 + x + x^2 + x^3 + \cdots + x^n = \dfrac{1 - x^{n+1}}{1-x}$

given in Problem 5.4. The sum as described on the left hand side of (13.2) involves n additions and $$1 + 2 + \cdots + (n - 1) = (n-1)n/2$$ multiplications, but its closed form on the right hand side can be evaluated using fast exponentiation with at most $$2 \log n$$ multiplications, a division, and a couple of subtractions. Also, the closed form makes the growth and limiting behavior of the sum much more apparent.

Equations ($$\ref{13.1}$$) and ($$\ref{13.2}$$) were easy to verify by induction, but, as is often the case, the proofs by induction gave no hint about how these formulas were found in the first place. Finding them is part math and part art, which we’ll start examining in this chapter.

Our first motivating example will be the value of a financial instrument known as an annuity. This value will be a large and nasty-looking sum. We will then describe several methods for finding closed forms for several sorts of sums, including those for annuities. In some cases, a closed form for a sum may not exist, and so we will provide a general method for finding closed forms for good upper and lower bounds on the sum.

The methods we develop for sums will also work for products, since any product can be converted into a sum by taking its logarithm. For instance, later in the chapter we will use this approach to find a good closed-form approximation to the factorial function

$\nonumber n! ::= 1 \cdot 2 \cdot 3 \cdots n.$

We conclude the chapter with a discussion of asymptotic notation, especially “Big Oh” notation. Asymptotic notation is often used to bound the error terms when there is no exact closed form expression for a sum or product. It also provides a convenient way to express the growth rate or order of magnitude of a sum or product.

This page titled 13: Sums and Asymptotics is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Eric Lehman, F. Thomson Leighton, & Alberty R. Meyer (MIT OpenCourseWare) .