Sums copy 6

Page 1

Sums Jesper Larsson, IT University of Copenhagen Important basic knowledge required for the course Foundations of Computing – Algorithms and Data Structures.

Notation We use the following “capital-sigma notation” for a sum of a number of terms ti : B

∑ ti

= t A + t A +1 + t A +2 + · · · + t B −1 + t B

i= A

We can vary the notation somewhat, as long as the meaning is clear. The variant ∑i∈S ti denotes the sum over all i that belong to some set S. For instance,

B

ti =

ti =

i = A...B

i ∈{ A,...,B}

∑ ti

i= A

If it is clear from the context what it means (or if we want to be less precise) we can even write the following to sum “over all i”:

∑ ti i

When B is a number, a sum ∑iB= A ti is called a finite series. If B approaches infinity, we have an infinite series or just series: intuitively a sum of infinitely many terms. Mathematical pedants would sneer at that idea (because you can’t add up infinitely many terms). We get around that by defining: ∞

B

ti = lim

B→∞

i= A

∑ ti

i= A

This saves our honor by declaring that we are just using a shorthand for the limit of the sum as the number of terms approaches infinity, which is mathematically well-defined.

Powers of two The following sum of inverse powers of two, which is a special case of a geometric series, appears frequently in analyzing algorithms: 1 1 1 1 + + + + ··· = 1 2 4 8 16 Or, using the sigma notation: ∞

1

∑ 2i

=1

i =1

Rather than giving full formal proof, we shall settle for a sketch that shows an intuitive idea, which is often more valuable for remembering and applying something. (But a formal proof is also a good

Important to quickly recall and motivate!


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.