Appendix A: Summations Motivation: Evaluating and/or bounding sums are frequently needed in the solution of recurrences Two types of evaluation problems:

Slides:



Advertisements
Similar presentations
MCA 202: Discrete Mathematics Instructor Neelima Gupta
Advertisements

Integration: “the Definition of Area as a Limit; Sigma Notation”
MA/CSSE 473/474 How (not) to do an induction proof.
Algorithms Recurrences. Definition – a recurrence is an equation or inequality that describes a function in terms of its value on smaller inputs Example.
Checking off homework: 1) Test - Form A - Review Packet 2) Combined Assignment Part 2: 9.1 ( 75, 81, 84, eoo ) and 9.2 ( 1-4, 12-15,
Tirgul 2 Asymptotic Analysis. Motivation: Suppose you want to evaluate two programs according to their run-time for inputs of size n. The first has run-time.
CSCE 411 Design and Analysis of Algorithms Andreas Klappenecker TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAA.
MTH 252 Integral Calculus Chapter 6 – Integration Section 6.4 – The Definition of Area as a Limit; Sigma Notation Copyright © 2005 by Ron Wallace, all.
25 June 2015Comp 122, Spring 2004 Asymptotic Notation, Review of Functions & Summations.
Tirgul 2 Asymptotic Analysis. Motivation: Suppose you want to evaluate two programs according to their run-time for inputs of size n. The first has run-time.
DAST 2005 Week 4 – Some Helpful Material Randomized Quick Sort & Lower bound & General remarks…
Discrete Structures Chapter 5: Sequences, Mathematical Induction, and Recursion 5.2 Mathematical Induction I [Mathematical induction is] the standard proof.
Copyright © 2007 Pearson Education, Inc. Slide 8-1 Warm-Up Find the next term in the sequence: 1, 1, 2, 6, 24, 120,…
Chapter 4: Solution of recurrence relationships
Welcome to Cpt S 450 Design and Analysis of Algorithms Syllabus and Introduction.
Every slope is a derivative. Velocity = slope of the tangent line to a position vs. time graph Acceleration = slope of the velocity vs. time graph How.
Sequences and Series (T) Students will know the form of an Arithmetic sequence.  Arithmetic Sequence: There exists a common difference (d) between each.
Calculus and Analytic Geometry II Cloud County Community College Spring, 2011 Instructor: Timothy L. Warkentin.
Definite Integrals Sec When we find the area under a curve by adding rectangles, the answer is called a Rieman sum. subinterval partition The width.
Example We can also evaluate a definite integral by interpretation of definite integral. Ex. Find by interpretation of definite integral. Sol. By the interpretation.
Copyright © Cengage Learning. All rights reserved.
4-3 DEFINITE INTEGRALS MS. BATTAGLIA – AP CALCULUS.
Constructing the Antiderivative Solving (Simple) Differential Equations The Fundamental Theorem of Calculus (Part 2) Chapter 6: Calculus~ Hughes-Hallett.
Chapter 2 Mathematical preliminaries 2.1 Set, Relation and Functions 2.2 Proof Methods 2.3 Logarithms 2.4 Floor and Ceiling Functions 2.5 Factorial and.
If the partition is denoted by P, then the length of the longest subinterval is called the norm of P and is denoted by. As gets smaller, the approximation.
4-4: The Fundamental Theorems Definition: If f is continuous on [ a,b ] and F is an antiderivative of f on [ a,b ], then: The Fundamental Theorem:
9.4 Mathematical Induction
Chapter 5: Probability Analysis of Randomized Algorithms Size is rarely the only property of input that affects run time Worst-case analysis most common.
Mathematical Background and Linked Lists. 2 Iterative Algorithm for Sum Find the sum of the first n integers stored in an array v : sum (v[], n) temp_sum.
11-4 INTRO TO SERIES DEFINITION A SERIES IS THE SUM OF THE TERMS OF A SEQUENCE. SEQUENCE VS. SERIES 2, 4, 8, … …
CHAPTER 4 SECTION 4.3 RIEMANN SUMS AND DEFINITE INTEGRALS.
 Constructing the Antiderivative  Solving (Simple) Differential Equations  The Fundamental Theorem of Calculus (Part 2) Chapter 6: Calculus~ Hughes-
Warm Up 1) 2) 3)Approximate the area under the curve for 0 < t < 40, given by the data, above using a lower Reimann sum with 4 equal subintervals. 4)Approximate.
12 INFINITE SEQUENCES AND SERIES. In general, it is difficult to find the exact sum of a series.  We were able to accomplish this for geometric series.
Summations COSC 3101, PROF. J. ELDER 2 Recall: Insertion Sort.
Copyright © Cengage Learning. All rights reserved.
MTH253 Calculus III Chapter 11, Part I (sections 11.1 – 11.6) Sequences Series Convergence Tests.
9.5 Testing for Convergence Remember: The series converges if. The series diverges if. The test is inconclusive if. The Ratio Test: If is a series with.
1 2/21/2016 MATH 224 – Discrete Mathematics Sequences and Sums A sequence of the form ar 0, ar 1, ar 2, ar 3, ar 4, …, ar n, is called a geometric sequence.
Logarithmic Functions. Examples Properties Examples.
4.2 Area Definition of Sigma Notation = 14.
1 Review for Quiz 1. 2 Summations 3 Binomial expansion.
Appendix A: Summations Two types of summation problems in algorithms: 1) Prove by induction that formula is correct 2) Find the function that the sum equals.
Chapter 4: Solution of recurrence relationships Techniques: Substitution: proof by induction Tree analysis: graphical representation Master theorem: Recipe.
Lesson 5-2 The Definite Integral. Ice Breaker See handout questions 1 and 2.
4.1 Antiderivatives 1 Definition: The antiderivative of a function f is a function F such that F’=f. Note: Antiderivative is not unique! Example: Show.
5.2 Definite Integrals Objectives SWBAT: 1) express the area under a curve as a definite integral and as a limit of Riemann sums 2) compute the area under.
4.3 Riemann Sums and Definite Integrals Definition of the Definite Integral If f is defined on the closed interval [a, b] and the limit of a Riemann sum.
Lesson 5-2R Riemann Sums. Objectives Understand Riemann Sums.
Assignment 1: due 1/13/16 Geometric sum Prove by induction on integers that.
Problem of the Day The graph of a function f is shown above.Which of the following statements about f is false? A) f is continuous at x = a B) f has a.
Arithmetic Sequences and Series Section Objectives Use sequence notation to find terms of any sequence Use summation notation to write sums Use.
Chapter 9: Selection of Order Statistics What are an order statistic? min, max median, i th smallest, etc. Selection means finding a particular order statistic.
Copyright © Cengage Learning. All rights reserved The Integral Test and Estimates of Sums.
Mathematical Induction. The Principle of Mathematical Induction Let S n be a statement involving the positive integer n. If 1.S 1 is true, and 2.the truth.
SECTION 4-3-B Area under the Curve. Def: The area under a curve bounded by f(x) and the x-axis and the lines x = a and x = b is given by Where and n is.
INFINITE SEQUENCES AND SERIES In general, it is difficult to find the exact sum of a series.  We were able to accomplish this for geometric series and.
Copyright © Cengage Learning. All rights reserved.
Should know some common ones:
Copyright © Cengage Learning. All rights reserved.
Algorithms: the big picture
Quiz 1, Monday 1/28/19 Chapters 1,2 and 3 HW assignments 1-5.
AREA Section 4.2.
Sequences and Summation Notation
Summations Alexandra Stefan.
Assignment 1: due 1/9/19 Geometric sum: Prove by induction on integers that Give a structured proof using the technique if S(n-1) then S(n). Include the.
Chapter 9: Selection of Order Statistics
Chapter 3 Growth of Functions
Mathematical Induction
AREA Section 4.2.
Presentation transcript:

Appendix A: Summations Motivation: Evaluating and/or bounding sums are frequently needed in the solution of recurrences Two types of evaluation problems: Prove by induction that formula is correct Find the function that the sum equals or is bounded by Encountered both types in analysis of insertion sort

Prove by induction that  j=1 to n j = n(n+1)/2 Called the arithmetic sum Text p 1059

Use the arithmetic sum to evaluate the sums in the analysis of insertion sort runtime

Important sums to remember Arithmetic  k=1 to n k = n(n+1)/2 =  (n 2 ) Geometric  k=0 to n x k = (x n+1 – 1)/(x – 1) when x  1 Harmonic  k=1 to n (1/k) = ln(n) +  (1)

Alternate forms of geometric sum useful in tree analysis  k=0 to n-1 x k = (x n – 1)/(x – 1) when x  1 How do we show this is true?  k=0 to ∞ x k = 1/(1 – x) when |x| < 1

Integration and differentiation can be used to evaluate sums derivative: d{  f(x)}/dx =  df/dx integral:  dx {  f(x)} =   dx f(x) Example: eq. A.8 p1148 Show  k=0 to ∞ k x k = x/(1 – x) 2 when 0< |x| < 1

See bottom p1147 for simpler approach

Bounding sums Prove a bound by induction Bound ever term in sum Bound by integration monotone increasing and decreasing summands

Prove by induction on integers that  k=0 to n 3 k = O(3 n )

there exist c=4/3 such that 0<4<3c Similar argument applies n=2, etc. Property of sums independent of what we are trying to prove and (1/3 +1/c) 3/2; therefore, c=3/2 or larger will work in the definition of big O Hence  k=0 to n 3 k = O(3 n ) by definition 3 Base case n=0 is true < c3 n which implies

Example of bound sum by bounding every term Show that (n/2) 2 <  k=1 to n k < n 2

Bound by integration: monotone increasing summand Shaded area is integral of continuous function f(x) Sum equals area of “upper sum” rectangles Same f(x) different limits on integration Sum equals area of “lower sum” rectangles

Note the difference for monotone increasing and decreasing summand Method not applicable if summand is not monotone increasing or decreasing

Use bounding by integrals for informal proof that  k=1 to n k -1 =  (ln(n))

CptS 450 Spring 2015 [All problems are from Cormen et al, 3nd Edition] Homework Assignment 3: due 2/4/15 1.ex A.1-3 p ex A.1-6 p ex A.2-1 p 1156 (hint: use integration) 4.part a of prop A-1 p 1156 using bound each term