Sequences and Summations. CS/APMA 202 Rosen section 3.2 Aaron Bloomfield

Similar documents
Sequences are ordered lists of elements

Discrete Structures for Computer Science

CSCE 222 Discrete Structures for Computing. Dr. Hyunyoung Lee

Chapter 4 ARITHMETIC AND GEOMETRIC PROGRESSIONS 2, 5, 8, 11, 14,..., 101

EECS 1028 M: Discrete Mathematics for Engineers

Announcements. CS243: Discrete Structures. Sequences, Summations, and Cardinality of Infinite Sets. More on Midterm. Midterm.

Section Summary. Sequences. Recurrence Relations. Summations. Examples: Geometric Progression, Arithmetic Progression. Example: Fibonacci Sequence

Sequences and Summations

Examples of Finite Sequences (finite terms) Examples of Infinite Sequences (infinite terms)

Series. Definition. a 1 + a 2 + a 3 + is called an infinite series or just series. Denoted by. n=1

Countable and uncountable sets. Matrices.

CSE 20 DISCRETE MATH. Fall

Introduction to Series and Sequences Math 121 Calculus II Spring 2015

One-to-one functions and onto functions

Week 2: Sequences and Series

Full file at

ICS141: Discrete Mathematics for Computer Science I

Functions. Given a function f: A B:

Countable and uncountable sets. Matrices.

Propositional Logic, Predicates, and Equivalence

Fibonacci Sequence. January 19, 2014

MAT115A-21 COMPLETE LECTURE NOTES

MATH 13 FINAL EXAM SOLUTIONS

This is a listing of common symbols found within all branches of mathematics 1. x = y means x and y represent the same thing or value.

8.1 Sequences. Example: A sequence is a function f(n) whose domain is a subset of the integers. Notation: *Note: n = 0 vs. n = 1.

JUST THE MATHS SLIDES NUMBER 2.1. SERIES 1 (Elementary progressions and series) A.J.Hobson

Sequences and Summations ICS 6D. Prof. Sandy Irani

CSE 20 DISCRETE MATH WINTER

The Fibonacci Sequence

Definition: Let S and T be sets. A binary relation on SxT is any subset of SxT. A binary relation on S is any subset of SxS.

Chapter 5: Sequences, Mathematic Induction, and Recursion

209 Sponsored by NC Math and Science Education Network

Intermediate Math Circles March 11, 2009 Sequences and Series

2.1 Sets. Definition 1 A set is an unordered collection of objects. Important sets: N, Z, Z +, Q, R.

Algorithms: Lecture 2

Math 3361-Modern Algebra Lecture 08 9/26/ Cardinality

University of Toronto Faculty of Arts and Science Solutions to Final Examination, April 2017 MAT246H1S - Concepts in Abstract Mathematics

Section 7.5: Cardinality

Week 9-10: Recurrence Relations and Generating Functions

Standard 2: Algebra Benchmark 1: Patterns

Introduction to Decision Sciences Lecture 6

Polynomial Approximations and Power Series

1 The distributive law

Discrete Structures - CM0246 Cardinality

MATH 3300 Test 1. Name: Student Id:

Section Summary. Sequences. Recurrence Relations. Summations. Examples: Geometric Progression, Arithmetic Progression. Example: Fibonacci Sequence

10.1 Radical Expressions and Functions Math 51 Professor Busken

MCR3U Unit 7 Lesson Notes

CS100: DISCRETE STRUCTURES

Sequence. A list of numbers written in a definite order.

The natural numbers. The natural numbers come with an addition +, a multiplication and an order < p < q, q < p, p = q.

ABSTRACT INTEGRATION CHAPTER ONE

JUST THE MATHS UNIT NUMBER 2.1. SERIES 1 (Elementary progressions and series) A.J.Hobson

Algorithms: Background

14 Uncountable Sets(Denial of Self Recursion)

Every subset of {1, 2,...,n 1} can be extended to a subset of {1, 2, 3,...,n} by either adding or not adding the element n.

MTS 105 LECTURE 5: SEQUENCE AND SERIES 1.0 SEQUENCE

AP Calculus Testbank (Chapter 9) (Mr. Surowski)

Ch 9/10/11/12 Exam Review

Section 9.8. First let s get some practice with determining the interval of convergence of power series.

Chapter 2 - Basics Structures MATH 213. Chapter 2: Basic Structures. Dr. Eric Bancroft. Fall Dr. Eric Bancroft MATH 213 Fall / 60

Grade 7/8 Math Circles October 28/29, Series

DO NOT USE WITHOUT PERMISSION

SEQUENCES AND SERIES

Chapter 2 - Basics Structures

Sequences. 1. Number sequences. 2. Arithmetic sequences. Consider the illustrated pattern of circles:

Unit 5: Sequences, Series, and Patterns

Functions and cardinality (solutions) sections A and F TA: Clive Newstead 6 th May 2014

Algebra II. Table of Contents. Sequences and Series. Slide 1 / 153. Slide 2 / 153. Slide 3 /

Functions in Tables 2.0

3.3 Accumulation Sequences

SERIES

Mathathon Round 1 (2 points each)

12 Sequences and Recurrences

SEVENTH EDITION and EXPANDED SEVENTH EDITION

CS1800: Sequences & Sums. Professor Kevin Gold

Section 11.1 Sequences

Cantor and Infinite Sets

Full file at

11.4 Partial Sums of Arithmetic and Geometric Sequences

1.4 Cardinality. Tom Lewis. Fall Term Tom Lewis () 1.4 Cardinality Fall Term / 9

Math 105A HW 1 Solutions

In N we can do addition, but in order to do subtraction we need to extend N to the integers

UNIT 3 VOCABULARY: SEQUENCES

Section Summary. Sequences. Recurrence Relations. Summations Special Integer Sequences (optional)

Advanced Counting Techniques

A Short Review of Cardinality

Infinite Sequences and Series Section

arxiv: v2 [math.nt] 23 Sep 2011

Example. How to Guess What to Prove

In N we can do addition, but in order to do subtraction we need to extend N to the integers

Economics 204 Fall 2011 Problem Set 1 Suggested Solutions

MTH 299 In Class and Recitation Problems SUMMER 2016

KINDERGARTEN Correlation of Project Learning Tree s PreK 8 Environmental Education Activity Guide with the Common Core Standards for Mathematics

6. The transfinite ordinals*

JUST THE MATHS UNIT NUMBER DIFFERENTIATION APPLICATIONS 5 (Maclaurin s and Taylor s series) A.J.Hobson

Sequences and Series, Induction. Review

ASSIGNMENT 12 PROBLEM 4

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 27

Real Analysis - Notes and After Notes Fall 2008

Transcription:

Sequences and Summations CS/APMA 202 Rosen section 3.2 Aaron Bloomfield 1

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

Sequences A sequence is a function from a subset of Z to a set S Usually from the positive or non-negative negative ints 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! 3

Sequence examples a n = 3n3 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 sequences are indexed from 1 Not in all other textbooks, though! 4

Geometric vs. arithmetic sequences The difference is in how they grow Arithmetic sequences increase by a constant amount a n = 3n3 The sequence {a{ n } is { 3, 6, 9, 12, } Each number is 3 more than the last Of the form: f(x) ) = dx + a Geometric sequences increase by a constant factor b n = 2 n The sequence {b{ n } is { 2, 4, 8, 16, 32, } Each number is twice the previous Of the form: f(x) ) = ar x 5

Fibonacci sequence Sequences can be neither geometric or arithmetic F n = F n-1 + F n-2, where the first two terms are 1 Alternative, F(n) ) = F(n-1) + F(n-2) Each term is the sum of the previous two terms Sequence: { 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, } This is the Fibonacci sequence Full formula: F( n) = ( ) n 1+ 5 ( 1 5) 5 2 n n 6

Fibonacci sequence in nature 13 8 5 3 2 1 7

Reproducing rabbits You have one pair of rabbits on an island The rabbits repeat the following: Get pregnant one month Give birth (to another pair) the next month This process repeats indefinitely (no deaths) Rabbits get pregnant the month they are born How many rabbits are there after 10 months? 8

Reproducing rabbits First month: 1 pair The original pair Second month: 1 pair The original (and now pregnant) pair Third month: 2 pairs The child pair (which is pregnant) and the parent pair (recovering) Fourth month: 3 pairs Grandchildren :: Children from the baby pair (now pregnant) Child pair (recovering) Parent pair (pregnant) Fifth month: 5 pairs Both the grandchildren and the parents reproduced 3 pairs are pregnant (child and the two new born rabbits) 9

Reproducing rabbits Sixth month: 8 pairs All 3 new rabbit pairs are pregnant, as well as those not pregnant in the last month (2) Seventh month: 13 pairs All 5 new rabbit pairs are pregnant, as well as those not pregnant in the last month (3) Eighth month: 21 pairs All 8 new rabbit pairs are pregnant, as well as those not pregnant in the last month (5) Ninth month: 34 pairs All 13 new rabbit pairs are pregnant, as well as those not pregnant in the last month (8) Tenth month: 55 pairs All 21 new rabbit pairs are pregnant, as well as those not pregnant in the last month (13) 10

Reproducing rabbits Note the sequence: { 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, } The Fibonacci sequence again 11

Fibonacci sequence Another application: Fibonacci references from http://en.wikipedia.org/wiki/fibonacci_sequence 12

Fibonacci sequence As the terms increase, the ratio between successive terms approaches 1.618 F( n + 1) 5 + 1 lim = φ = = 1.618933989 n F( n) 2 This is called the golden ratio Ratio of human leg length to arm length Ratio of successive layers in a conch shell Reference: http://en.wikipedia.org/wiki/golden_ratio 13

The Golden Ratio 14

15

Determining the sequence formula Given values in a sequence, how do you determine the formula? Steps to consider: Is it an arithmetic progression (each term a constant amount from the last)? Is it a geometric progression (each term a factor of the previous term)? Does the sequence it repeat (or cycle)? Does the sequence combine previous terms? Are there runs of the same value? 16

Determining the sequence formula Rosen, question 9 (page 236) a) 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, The sequence alternates 1 s 1 s and 0 s, 0 increasing the number of 1 s s and 0 s 0 s each time b) 1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 8, 8, This sequence increases by one, but repeats all even numbers once c) 1, 0, 2, 0, 4, 0, 8, 0, 16, 0, The non-0 0 numbers are a geometric sequence (2 n ) interspersed with zeros d) 3, 6, 12, 24, 48, 96, 192, Each term is twice the previous: geometric progression a n = 3*2 n-1 17

Determining the sequence formula e) 15, 8, 1, -6, -13, -20, -27, Each term is 7 less than the previous term a n = 22-7n f) 3, 5, 8, 12, 17, 23, 30, 38, 47, The difference between successive terms increases by one each time a 1 = 3, a n = a n-1 + n a n = n(n+1)/2 + 2 g) 2, 16, 54, 128, 250, 432, 686, Each term is twice the cube of n a n = 2*n 3 h) 2, 3, 7, 25, 121, 721, 5041, 40321 Each successive term is about n times the previous a n = n!! + 1 My solution: a n = a n-1 * n - n + 1 18

Useful sequences n 2 = 1, 4, 9, 16, 25, 36, n 3 = 1, 8, 27, 64, 125, 216, n 4 = 1, 16, 81, 256, 625, 1296, 2 n = 2, 4, 8, 16, 32, 64, 3 n = 3, 9, 27, 81, 243, 729, n!! = 1, 2, 6, 24, 120, 720, Listed in Table 1, page 228 of Rosen 19

Summations A summation: upper limit n j= m j or a n j= m a j lower limit is like a for loop: index of summation int sum = 0; for ( int j = m; j <= n; j++ ) sum += a(j); 20

Evaluating sequences Rosen, question 13, page 3.2 5 k = 1 4 j= 0 8 ( k + 1) ( 2) 10 i= 1 3 ( j + 1 j 2 2 ) j= 0 j 2 + 3 + 4 + 5 + 6 = 20 (-2) 0 + (-2)( 1 + (-2)( 2 + (-2)( 3 + (-2)( 4 = 11 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 = 30 (2 1-2 0 ) + (2 2-2 1 ) + (2 3-2 2 ) + (2 10-2 9 ) = 511 Note that each term (except the first and last) is cancelled by another term 21

Evaluating sequences Rosen, question 14, page 3.2 S = { 1, 3, 5, 7 } What is Σ j S j 1 + 3 + 5 + 7 = 16 What is Σ j S j 2 1 2 + 3 2 + 5 2 + 7 2 = 84 What is Σ j S (1/j) 1/1 + 1/3 + 1/5 + 1/7 = 176/105 What is Σ j S 1 1 + 1 + 1 + 1 = 4 22

Summation of a geometric series Sum of a geometric series: n j= 0 ar j = n+ 1 ar a r 1 ( n + 1) a if if r r 1 = 1 Example: 10 j= 0 2 n = 10+ 1 2 1 2 1 = 2048 1 1 = 2047 23

Proof of last slide If r = 1, then the sum is: S n = a j= 0 = ( n + 1) a S rs = = = = j= 0 r n n n j= 0 j= 0 n+ 1 k = 1 ar ar ar j ar j+ 1 k j rs S( r rs S 1) S = = = = = n k = 0 ar k + ( n+ 1 ar a) ( n+ 1 S + ar a) ( n+ 1 ar a) ( n+ 1 ar a) ( n+ 1 ar a) r 1 24

Double summations Like a nested for loop i= 1 j= 1 Is equivalent to: 4 3 ij int sum = 0; for ( int i = 1; i <= 4; i++ ) for ( int j = 1; j <= 3; j++ ) sum += i*j; 25

Useful summation formulae Well, only 1 really important one: n k = 1 k = n( n + 1) 2 26

Cardinality For finite (only) sets, cardinality is the number of elements in the set For finite and infinite sets, two sets A and B have the same cardinality if there is a one-to to-one one correspondence from A to B 27

Cardinality Example on finite sets: Let S = { 1, 2, 3, 4, 5 } Let T = { a, b, c, d, e } There is a one-to to-one one correspondence between the sets Example on infinite sets: Let S = Z+ Let T = { x x = 2k2 and k Z+ + } One-to to-one one correspondence: 1 2 2 4 3 6 4 2 5 10 6 12 7 14 8 16 Etc. Note that here the symbol means that there is a correspondence between them, not the biconditional 28

More definitions Countably infinite: elements can be listed Anything that has the same cardinality as the integers Example: rational numbers, ordered pairs of integers Uncountably infinite: elements cannot be listed Example: real numbers 29

Showing a set is countably infinite Done by showing there is a one-to to-one one correspondence between the set and the integers Examples Even numbers Shown two slides ago Rational numbers Shown in Rosen, page 234-235 235 Ordered pairs of integers Shown next slide 30

Showing ordered pairs of integers A one-to-one correspondence are countably infinite 31