BoundingSums

ClassS04CS141 | recent changes | Preferences

Showing revision 2
Difference (from revision 2 to revision 2) (minor diff)
(The revisions are identical or unavailable.)

See also GeometricSums .

Here we explain by example a simple way to get an upper bound on a sum.

For example, consider the sum

1+2+...+n = i=1..n i.

We can bound this sum from above as follows:

1+2+...+n = i=1..n i.
≤ n+n+...+ n (n times)
= {i=1..n} n = n*n = n2.

Thus, the sum is O(n2).

In general, a sum of n terms is at most n times the maximum term.


We can use a similar trick to bound the sum from below. We use the fact that the sum is at least the sum of its n/2 largest terms:

1+2+...+n = i=1..n i
≥ n/2+(n/2+1)+...+ n = i=n/2..n i
≥ n/2+n/2+...+ n/2 (n/2 times)
= i=n/2..n n/2
= (n/2)*(n/2) = n2/4.

Thus, the sum is Ω(n2).


ClassS04CS141 | recent changes | Preferences
This page is read-only | View other revisions | View current revision
Edited May 4, 2004 7:34 pm by Neal (diff)
Search: