Sequences and Summations

https://slides.com/georgelee/ics141-sequences-summations/live

Let's Recap

Chapter 2 So Far

  • Sets
  • Set operations
  • Functions

Sequence

A function from a set of consecutive integers (typically the natural numbers or positive integers) to a set S. We use the notation an  to denote the image of the integer n. an  is also the nth term of the sequence.

 

Can be finite or infinite.

Sequence

A set of integers typically generated by a function. Note that sets are NOT ordered, but we typically talk about sequences being a function of an index n.

Examples of Sequences

  • an = 1 / n
  • an = b * rn (geometric progression) 
  • an = b + (n * d) (arithmetic progression) 

Recurrence Relations

Recurrence Relations

A sequence defined in terms of the sequence's previous values. We can also say that a recurrence relation is recursively defined.

 

Recurrence relations typically have a boundary condition which establishes the initial terms of the sequence.

Examples of Recurrences

  • fn = fn-1 + n where n > 0
  • fn = fn - 1 + fn-2 where f1 = 1 and f2 = 1

Solutions of a Recurrence

A sequence is called a solution if the terms of the sequence satisfy the recurrence relation.

Example: {1, 1, 2, 3, 5, 8, 13, ...}

 

closed formula is a solution to the relation expressed as a non-recursive function of n.

Example: f(n) = n * (n + 1) / 2

 

Summations / Series

Series

A sum of all of the terms in a sequence. Can be a partial sum (a sum of the first n terms). Series can also be finite or infinite.

 

Σni=m sdenotes the sum from m to n.

Closed Formula

Just like sequences, series can have a closed formula where a solution is represented only in terms of its bounds.

 

In mathematical terms,

f(n) = Σni=m s

Examples of Series

  • Σni=0 i = n * (n + 1) / 2 
  • Σi=0 xi = 1/(1 - x) where | x | < 1
  • Σk=1 1/k (The harmonic series)
  • Σ5i=1Σ5j=1 i*j

Sequences and Summations

By George Lee

Sequences and Summations

  • 827