200 likes | 618 Views
Sequences and Summations. CSE 260. Outline. Sequences Special Integer Sequences Summations Cardinality: countable, uncountable infinite sets Exercise 1.7. Sequences. Definition A sequence is a function from a subset of N , the set of natural numbers, to a set S . Notation
E N D
Sequences and Summations CSE 260
Outline • Sequences • Special Integer Sequences • Summations • Cardinality: countable, uncountable infinite sets • Exercise 1.7
Sequences • DefinitionA sequenceis a function from a subset of N, the set of natural numbers, to a set S. • Notation • an, called term of the sequence, denotes the image of the integer n. • {an} denotes the sequence. • Do not confuse the above with set notation.
Examples • For the sequence {an}, where an=1/n for n=1,2,3… a1=1, a2=1/2, a3=1/3, a4=1/4, … • The sequence {bn}, where bn= (-1)n for n=0,1,2,3… starts with: 1, -1, 1, -1, 1, … • The sequence {cn}, where cn= 2n for n=0, 1, 2, 3… starts with: 1, 2, 4, 8, 16, … • Strings are sequences of the form a1a2…an. • The length of the string is the number of its terms. • The empty string is the string that has no terms.
To deduce a possible formula (rule) for the terms of a sequence from initial terms, ask the following: Are there runs of the same value? Are terms obtained from previous terms by adding the same amount or an amount that depends on the position in the sequence? Are terms obtained from previous terms by multiplying by a particular amount? Are terms obtained by combining previous terms in a certain way? Special Integer Sequences
Consider the sequence 1, 2, 2, 3, 3, 3, 4, 4, 4, 4… Rule? An integer n appears exactly n times. Consider the sequence 5, 11, 17, 23, 29, 35, 41, 47, 53, 59… Rule? 5 + 6n Arithmetic progression: a + nd Consider the sequence 1, 7, 25, 79, 341, 727, 2185, 6559, 19681, 59047… Rule? 3n-2 Examples
Summations • Consider the sequence {an}. We define the following summation: j=mnaj = am+ am+1+ … +an. • Terminology: j is called the index of summation, m is the lower limit, n is the upper limit.
Examples • The sum of the first 100 terms of the sequence {an}, where an = 1/n for n=1, 2, 3… can be expressed as: j=1100 1/j • The value of k=48 (-1) k is k=48 (-1) k = (-1)4 + (-1)5 + (-1)6 + (-1)7 + (-1)8 = 1 + (-1) + 1 + (-1) + 1 = 1 • The value of j=15 j2is j=15j2 = 12 + 22 + 32 + 42 + 52 = 1 + 4 + 9 + 16 + 25 = 55
Summations – Cont. • Shifting the index of summation: • Let’s consider the sum j=15j2 • Let k = j-1 (i.e. j = k+1) • j=15j2 = k=04(k+1)2 • A geometric progression is a sequence of the form a, ar, ar2, …, ark • A geometric series is the sum of terms of a geometric progression: S= j=0n arj • It can be shown that if r0, j=0n arj= (arn+1 – a) / (r -1)
Double Summation • i=14j=13ij = i=14(i + 2i + 3i) = i=14(6i) = 6 + 12 + 18 + 24 = 60
Summation over an Indexed Set • sSf(s) represents the sum of the values f(s) for all elements s of S. • Example • s{0,2,4}s2 = 0 + 4 + 16 = 20
Example • k=50100 k2 = ? • k=1100 k2 = k=149 k2 + k=50100 k2, then • k=50100 k2 = k=1100 k2 - k=149 k2 = 100101201/6 - 495099/6 = 338,350 – 40,425 = 297,925.
Cardinality - Countable/Uncountable Sets • Definition The sets A and B have the same cardinality if and only if there is a one-to-one correspondence (bijection) from A to B. • DefinitionA set that is either finite or has the same cardinality as the set N of natural numbers is called countable. That is, an infinite set is countable if it is possible to list its elementsin a sequence (indexed by the natural numbers). • A set that is not countable is called uncountable.
Countable/Uncountable Sets • Notes • The union of two countable sets is countable. • A subset of a countable set is countable. • If A is uncountable and AB then B is uncountable.
Examples • The set O ={1, 3, 5, 7, …} of all odd positive integers is countable. Proof. Consider the function f(n)=2n+1 from N to O. It can easily be shown that f is a bijection. • The set Z of integers is countable. • The set Q of rational numbers is countable. • The set R of real numbers is uncountable.