Download presentation
Presentation is loading. Please wait.
Published byColeen Shelton Modified over 9 years ago
1
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen Chapter 3 Mathematical Reasoning, Induction and Recursion
2
2 Section 3.2 Sequences & Summations
3
3 Sequences A sequence is a function from a subset of the set of integers (usually either the set {0,1,2,…}, or the set {1,2,3,4,…}) to a set S. We use the notation a n to denote the image of the integer n. We call a n a term of the sequence. {a n } is used to describe the sequence
4
4 Examples {a n } = 2n-1 n 0 1 2 3 4 5 a n -1, 1, 3, 5, 7, 9 {a n } = 2 n-1 n 1 2 3 4 5 a n 1 2 4 8 16
5
5 Examples {a n } = 5 n 0 1 2 3 4 5 a n 5, 5, 5, 5, 5, 5 n 1 2 3 4 5 a n 0 1 1 2 2 {a n } =
6
6 Summation Notation Given the sequence: a m, a m+1, …, a n represents a m + a m+1 + …+ a n
7
7 index of summation, upper limit, lower limit
8
8 Example 1 k 1 2 3 4 5 a k 2 3 4 5 6 = 2+3+4+5+6= 20 sum = 0; for(k=1; k<=5; k++) sum += k+1;
9
9 Example 2 j 0 1 2 3 4 a j 1 -2 4 -8 16 = 1-2+4-8+16= 11 sum = 0; for(j=0; j<=4; j++) sum += pow(-2,j);
10
10 Example 3 k 0 1 2 3 a k 4 4 4 4 = 4+ 4+ 4+ 4= 16 sum = 0; for(k=0; k<4; k++) sum += 4;
11
11 Example 4 sum = 0; for(i=1; i<=4; i++) for(j=1; j<=5; j++) sum += i+j;
12
12 finished
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.