Discrete Structures & Algorithms Summations EECE 320 — UBC.

Slides:



Advertisements
Similar presentations
Chapter 10 Infinite Series by: Anna Levina edited: Rhett Chien.
Advertisements

22C:19 Discrete Math Sequence and Sums Fall 2011 Sukumar Ghosh.
Sequences, Induction and Probability
Complexity Analysis (Part I)
Discrete Structures Chapter 2 Part A Sequences Nurul Amelina Nasharuddin Multimedia Department.
25 June 2015Comp 122, Spring 2004 Asymptotic Notation, Review of Functions & Summations.
1 Section 3.2 Sequences and Summations. 2 Sequence Function from a subset of Z (usually the set beginning with 1 or 0) to a set S a n denotes the image.
Lec 5 Feb 10 Goals: analysis of algorithms (continued) O notation summation formulas maximum subsequence sum problem (Chapter 2) three algorithms image.
CSC 2300 Data Structures & Algorithms January 30, 2007 Chapter 2. Algorithm Analysis.
Copyright © 2007 Pearson Education, Inc. Slide 8-1 Warm-Up Find the next term in the sequence: 1, 1, 2, 6, 24, 120,…
Understanding 8.1… Use sigma notation to write the sum of.
Geometric Sequences and Series Part III. Geometric Sequences and Series The sequence is an example of a Geometric sequence A sequence is geometric if.
Asymptotic Notations Iterative Algorithms and their analysis
Homework Questions.
MATH 224 – Discrete Mathematics
Sequences & Summations CS 1050 Rosen 3.2. Sequence A sequence is a discrete structure used to represent an ordered list. A sequence is a function from.
Sequences Informally, a sequence is a set of elements written in a row. – This concept is represented in CS using one- dimensional arrays The goal of mathematics.
Sequences and Summations
Unit 6: Modeling Mathematics 3 Ms. C. Taylor. Warm-Up.
Geometric Sequences and Series Unit Practical Application “The company has been growing geometrically”
Section 2.4. Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations.
Warm up 1. Change into Scientific Notation 3,670,900,000 Use 3 significant figures 2. Compute: (6 x 10 2 ) x (4 x ) 3. Compute: (2 x 10 7 ) / (8.
Copyright © 2007 Pearson Education, Inc. Slide 8-1.
Copyright © 2011 Pearson Education, Inc. Slide
Sequences and Summations
Fall 2002CMSC Discrete Structures1 … and now for… Sequences.
Section 2.4. Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations.
Sequences & Series. Sequences  A sequence is a function whose domain is the set of all positive integers.  The first term of a sequences is denoted.
By Sheldon, Megan, Jimmy, and Grant..  Sequence- list of numbers that usually form a pattern.  Each number in the list is called a term.  Finite sequence.
Sequence – a function whose domain is positive integers. Section 9.1 – Sequences.
Defining and Using Sequences and Series
1 o-notation For a given function g(n), we denote by o(g(n)) the set of functions: o(g(n)) = {f(n): for any positive constant c > 0, there exists a constant.
Sequences and Summations Section 2.4. Section Summary Sequences. – Examples: Geometric Progression, Arithmetic Progression Recurrence Relations – Example:
CSC401 – Analysis of Algorithms Lecture Notes 2 Asymptotic Analysis Objectives: Mathematics foundation for algorithm analysis Amortization analysis techniques.
Warm up 1. Find the sum of : 2. Find the tenth term of the sequence if an = n2 +1: =
Section 9-4 Sequences and Series.
Sequences and Series!! !. Finding the Degree of a Sequence Begin by finding the difference between adjacent numbers.
Algorithm Analysis. What is an algorithm ? A clearly specifiable set of instructions –to solve a problem Given a problem –decide that the algorithm is.
ALGEBRA 2 – CHAPTER 5 QUADRATICS. 5-2 PROPERTIES OF PARABOLAS.
Lecture#15 Discrete Mathematics. Summation Computing Summation Let a 0 = 2, a 1 = 3, a 2 = -2, a 3 = 1 and a 4 = 0. Compute each of the summations: =
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 Basic Structure : Sets, Functions, Sequences, and Sums Sequences and Summations.
Unit 10: Sequences & Series By: Saranya Nistala. Unit Goal: I can find and analyze arithmetic and geometric sequences and series. Key Concepts:  Define.
Section 2.4. Section Summary  Sequences. o Examples: Geometric Progression, Arithmetic Progression  Recurrence Relations o Example: Fibonacci Sequence.
Number Sequences Lecture 7: Sep 27 (chapter 4.1 of the book and chapter of the notes) ? overhang.
Lecture # 20 Sequence & Series
8.1 – Sequences and Series. Sequences Infinite sequence = a function whose domain is the set of positive integers a 1, a 2, …, a n are the terms of the.
Section 1: Sequences & Series /units/unit-10-chp-11-sequences-series
Quadratic Formula Finding solutions to quadratic equations can be done in two ways : 1. Factoring – it’s a short cut. Use it if you can 2. Using the Quadratic.
Arithmetic Sequences and Series Section Objectives Use sequence notation to find terms of any sequence Use summation notation to write sums Use.
Essential Question: How do you find the nth term and the sum of an arithmetic sequence? Students will write a summary describing the steps to find the.
Asymptotic Complexity
CSE15 Discrete Mathematics 03/01/17
Splash Screen.
©2001 by R. Villar All Rights Reserved
Solve the problem progression and series
Accel PRecalc Unit #4: Sequences & Series Lesson #3: Finite Geometric Sequences and Series
Mathematical Induction Recursion
Discrete Math (2) Haiming Chen Associate Professor, PhD
Sequences and Summations
Sequences and Series 4.7 & 8 Standard: MM2A3d Students will explore arithmetic sequences and various ways of computing their sums. Standard: MM2A3e Students.
ICS 253: Discrete Structures I
Geometric Sequences and Series
10.2 Arithmetic Sequences and Series
Geometric Sequences.
9.1 Sequences Sequences are ordered lists generated by a
Sequences and Summation Notation
DAY 32 AGENDA: Back on Track!! This class registers at 9:55.
Warm Up Use summation notation to write the series for the specified number of terms …; n = 7.
Sequences.
Presentation transcript:

Discrete Structures & Algorithms Summations EECE 320 — UBC

2 Sequences Sequence: an ordered list of elements –Like a set, but: Elements can be duplicated. Elements are ordered.

3 Sequences A sequence is a function from a subset of Z to a set S. –Usually from the positive or non-negative integers. –a n is the image of n. a n is a term in the sequence. {a n } means the entire sequence. –The same notation as sets!

4 Example sequences a n = 3n –The terms in the sequence are a 1, a 2, a 3, … –The sequence {a n } is { 3, 6, 9, 12, … } b n = 2 n –The terms in the sequence are b 1, b 2, b 3, … –The sequence {b n } is { 2, 4, 8, 16, 32, … } Note that these sequences are indexed from 1 –Not always, though! You need to pay attention to the start of a sequence.

5 Summations Why do we need summation formulae? For computing the running times of iterative constructs (is a simple explanation). Example: Maximum Subvector Given an array A[1…n] of numeric values (can be positive, zero, and negative) determine the subvector A[i…j] (1  i  j  n) whose sum of elements is maximum over all subvectors

6 Summations How do you know this is true? Use associativity to separate the bs from the as. Use distributivity to factor the cs.

7 Maximum Subvector MaxSubvector(A, n) maxsum  0; for i  1 to n do for j = i to n sum  0 for k  i to j do sum += A[k] maxsum  max(sum, maxsum) return maxsum n n j T(n) =    1 i=1 j=i k=i NOTE: This is not a simplified solution. What is the final answer?

8 Summations you should know What is S = … + n? You get n copies of (n+1). But we’ve over added by a factor of 2. So just divide by 2. S=1+2+…+n S=n+n-1+…+1 2S=n+1+ +…+ Write the sum.Write it again.Add together.

9 Summations example/picture We now have a square 10 (n) by 11 (n+1) with area 110 units We need half of that (10x11)/2

10 Summations you should know What is S = … + (2n - 1)? Sum of first n odds.

11 Summations you should know What is S = … + (2n - 1)? Sum of first n odds.

12 Summations you should know What is S = 1 + r + r 2 + … + r n Geometric SeriesMultiply by rSubtract 2 nd from 1 st factordivideDONE!

13 Summations you should know What about: If r  1 this blows up. If r < 1 we can say something.

14 In-class exercise Find an expression for the following summation. –S = (1x2) + (2x3) + (3x4) + … + n(n+1) = ?

15 In-class exercise Consider the binomial series expansion, and ponder what happens when you differentiate both sides…

16 Important summations and techniques Constant Series: For integers a and b, a  b, Linear Series (Arithmetic Series): For n  0, Quadratic Series: For n  0,

17 Important summations and techniques Cubic Series: For n  0, Geometric Series: For real x  1, For |x| < 1,

18 Important summations and techniques Linear-Geometric Series: For n  0, real c  1, Harmonic Series: n th harmonic number, n  I +,

19 Important summations and techniques Telescoping Series: Differentiating Series: For |x| < 1,

20 Important summations and techniques Approximation by integrals: –For monotonically increasing f(n) –For monotonically decreasing f(n) How?

21 Important summations and techniques nth harmonic number

22 Wrap-up Summations –Basic summations (formulae) –Tricks for certain series Telescoping Differentiation …