Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete Structures Chapter 2 Part A Sequences Nurul Amelina Nasharuddin Multimedia Department.

Similar presentations


Presentation on theme: "Discrete Structures Chapter 2 Part A Sequences Nurul Amelina Nasharuddin Multimedia Department."— Presentation transcript:

1 Discrete Structures Chapter 2 Part A Sequences Nurul Amelina Nasharuddin Multimedia Department

2 Sequences Sequence is a set of (usually infinite number of) ordered elements: a 1, a 2, …, a n, … Eg: 2, 4, 6, 8, … Each individual element a k is called a term, where k is called an index The example above denotes an infinite sequence Sequences can be computed using an explicit formula: a k = k * (k + 1) for k > 1 a 2 = 2 * (2 + 1) = 6, when k = 2 a 3 = 3 * (3 + 1) = 12, when k = 3 a 4 = 4 * (4 + 1) = 20, when k = 4 2

3 Finding an explicit formula given initial terms of the sequence: 1, -1/4, 1/9, -1/16, 1/25, -1/36, … Ans: a k = (-1) k+1 / k 2 Sequence is (most often) represented in a computer program as a single-dimensional array Sequences a 1 a 2 a 3 a 4 a 5 a 6 3

4 Summation Operations Summation from k equals m to n, of a k where m  n: Computing summation: Let a 1 = -2, a 2 = -1, a 3 = 0 Expanded form Summation notation 4

5 Changing from summation notation to expanded form: Changing from expanded form to summation notation: Summation Operations 5

6 6 Evaluating a 1, a 2, a 3, …, a n for small n : n=1? 1/(1.2) = 1/2 n=2? 1/(1.2) + 1/(2.3) = 2/3 n=3? 1/(1.2) + 1/(2.3) + 1/(3.4) = 3/4 Recursive definition: If m and n are any integers with m < n, then and

7 Summation Operations Separating off the final term: Adding on the final term: Telescoping sum: When writing sums in expanded form, you sometimes see all the terms cancel except for the first and last one. 7

8 Product Operations Product from k equals m to n of a k : Recursive definition: If m and n are any integers with m < n, then and 8

9 Factorial Notation n factorial: n! defined as the product of all integers from 1 to n, n! = n  (n – 1)  …  3  2  1 Zero factorial: 0! = 1 Simplify the factorials: 9

10 Properties If a m, a m+1, a m+2, … and b m, b m+1, b m+2, … are sequence of real numbers and c is any real number, then the following equations hold for any integer n  m: 10

11 Change of Variable 11 Observe that: Transform a sum by changing variable: 1.Calculate new lower and upper limits When k = 0,j = k + 1 = 0 + 1 = 1. When k = 6,j = k + 1 = 6 + 1 = 7. The new sum goes from j = 1 to 7

12 Change of Variable 2.Calculate new general term Since j = k + 1, then k = j – 1. Hence 3.Finally put the steps together 12

13 Exercise Compute: Transform by making the change of variable j = i – 1:  Send in the answers on the next class! 13


Download ppt "Discrete Structures Chapter 2 Part A Sequences Nurul Amelina Nasharuddin Multimedia Department."

Similar presentations


Ads by Google