Discrete Structures Lecture Sequences and Summations

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

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

Definition: A sequence is a function from a subset of the integers (usually either the set

Sec$on Summary. Sequences. Recurrence Relations. Summations. Ex: Geometric Progression, Arithmetic Progression. Ex: Fibonacci Sequence

Sequences and Series. College Algebra

Section Summary. Definition of a Function.

Sequences A sequence is a function, where the domain is a set of consecutive positive integers beginning with 1.

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

Chapter 5: Sequences, Mathematic Induction, and Recursion

8. Sequences, Series, and Probability 8.1. SEQUENCES AND SERIES

CSCE 222 Discrete Structures for Computing. Dr. Hyunyoung Lee

9.1 SEQUENCES AND SERIES

Sequences and Series. Copyright Cengage Learning. All rights reserved.

Recurrence Relations

Advanced Counting Techniques. Chapter 8

Chapter 8: Recursion. March 10, 2008

3.3 Accumulation Sequences

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

Learning Objectives

16. . Proceeding similarly, we get a 2 = 52 1 = , a 3 = 53 1 = and a 4 = 54 1 = 125

Functions. Given a function f: A B:

Section 4.1: Sequences and Series

Sequences and the Binomial Theorem

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.

1.1.1 Algebraic Operations

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

Advanced Counting Techniques

Fall 2017 Test II review problems

or the number of bacteria in a colony after each hour, if the colony starts with one bacteria and each bacteria divides into two every hour

Sequences and series UNCORRECTED PAGE PROOFS

Fantastic Factoring. Difference of Cubes. Difference of Squares. Sum of Cubes. Binomial Squares. Factor the following expressions

Ex. Here's another one. We want to prove that the sum of the cubes of the first n natural numbers is. n = n 2 (n+1) 2 /4.

Sequences are ordered lists of elements

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

5. Sequences & Recursion

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

Chapter 2 - Basics Structures

Math Circle: Recursion and Induction

COM S 330 Lecture Notes Week of Feb 9 13

Algebra I+ Pacing Guide. Days Units Notes Chapter 1 ( , )

Complex numbers. Learning objectives

Outline. Part 5. Computa0onal Complexity (3) Compound Interest 2/15/12. Recurrence Rela0ons: An Overview. Recurrence Rela0ons: Formal Defini0on

2017 Year 10 General Mathematics Topic 4: Number Patterns and Recursion

Algebra. Mathematics Help Sheet. The University of Sydney Business School

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

Exponential and Logarithmic Functions

12 Sequences and Recurrences

Algebra I Curriculum Crosswalk

8. 2 3x 1 = 16 is an example of a(n). SOLUTION: An equation in which the variable occurs as exponent is an exponential equation.

General Mathematics Topic 4: Number Patterns and Recursion

Recurrence Relations and Recursion: MATH 180

Binomial Coefficient Identities/Complements

Discrete Structures for Computer Science

Discrete Mathematics

Chapter 8. Sequences, Series, and Probability. Selected Applications

Unit 3: Linear and Exponential Functions

West Windsor-Plainsboro Regional School District Advanced Algebra II Grades 10-12

Mathematics. Number and Quantity The Real Number System

Learning Module 1 - Basic Algebra Review (Appendix A)

SEQUENCES AND SERIES

INFINITE SEQUENCES AND SERIES

Degree of a polynomial

Radical Expressions and Graphs 8.1 Find roots of numbers. squaring square Objectives root cube roots fourth roots

Comparison of Virginia s College and Career Ready Mathematics Performance Expectations with the Common Core State Standards for Mathematics

Vocabulary. Term Page Definition Clarifying Example. arithmetic sequence. explicit formula. finite sequence. geometric mean. geometric sequence

Algebra I Number and Quantity The Real Number System (N-RN)

Algebra 1 Standards Curriculum Map Bourbon County Schools. Days Unit/Topic Standards Activities Learning Targets ( I Can Statements) 1-19 Unit 1

The exponent of a number shows you how many times the number is being multiplied by itself.

Unit 3: Linear and Exponential Functions

Honors Algebra I

Answers (Lesson 11-1)

ALGEBRA I CCR MATH STANDARDS

MCR3U Unit 7 Lesson Notes

1 Examples of Weak Induction

Introduction to Techniques for Counting

EECS 1028 M: Discrete Mathematics for Engineers

Dublin City Schools Mathematics Graded Course of Study Algebra I Philosophy

Mathematics 228(Q1), Assignment 2 Solutions

Warm-up Simple methods Linear recurrences. Solving recurrences. Misha Lavrov. ARML Practice 2/2/2014

The prime number is a natural number greater than 1, is divisible by itself and the only one.

SEVENTH EDITION and EXPANDED SEVENTH EDITION

Glossary. Also available at BigIdeasMath.com: multi-language glossary vocabulary flash cards. An equation that contains an absolute value expression

Curriculum Map Algebra I Quarter 1

1 Sequences and Summation

Algebra I, Common Core Correlation Document

Lecture 5: Loop Invariants and Insertion-sort

SECTION 9.2: ARITHMETIC SEQUENCES and PARTIAL SUMS

ALGEBRA I. 2. Rewrite expressions involving radicals and rational exponents using the properties of exponents. (N-RN2)

Generating Functions (Revised Edition)

Sequences, Series, and Probability

Mathematics. Algebra II Curriculum Guide. Curriculum Guide Revised 2016

Why do we need math in a data structures course?

Sequences and Summations ICS 6D. Prof. Sandy Irani

Objectives 1. Understand and use terminology and notation involved in sequences

ICS141: Discrete Mathematics for Computer Science I

Topic 17. Analysis of Algorithms

Sequences of Real Numbers

ALGEBRA 2. Background Knowledge/Prior Skills Knows what operation properties hold for operations with matrices

N-Q2. Define appropriate quantities for the purpose of descriptive modeling.

Geometric Sequences and Series

Transcription:

Introduction Good morning. In this section we study sequences. A sequence is an ordered list of elements. Sequences are important to computing because of the iterative nature of computer programs. The time complexity of recursive functions and for loops are computed by means of sequences and summations. Sequences DEFINITION 1 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 ) to a set S. We use the notation to denote the image of the integer n. We call a term of the sequence. We use the notation to describe the sequence. EXAMPLE 1 Consider the sequence, where 1 List the first four terms of the sequence denoted,,, 1,,, DEFINITION 2 A geometric progression is a sequence of the form,,,,, where the initial term a and the common ratio r are real numbers. Remark: A geometric progression is a discrete analogue of the exponential function. EXAMPLE 2.1 EXAMPLE 2.2 Consider the sequence, where 1 List the first four terms of the sequence denoted,,, 1, 1, 1, 1 Consider the sequence, where 2 5 List the first four terms of the sequence denoted,,, 2, 10, 50, 250 EXAMPLE 2.3 Consider the sequence, where 6 1 3 List the first four terms of the sequence denoted,,, 6, 2,, 1

DEFINITION 3 An arithmetic progression is a sequence of the form,,2,,, where the initial term a and the common difference d are real numbers. Remark: An arithmetic progression is a discrete analogue of the linear function. EXAMPLE 3.1 EXAMPLE 3.2 EXAMPLE 4 Consider the sequence, where 14 List the first four terms of the sequence denoted,,, 1, 3, 7, 11 Consider the sequence, where 73 List the first four terms of the sequence denoted,,, 7, 4, 1, 2 The string is a string of length four. Recurrence Relations Another way to specify a sequence to provide one or more initial terms together with a rule for determining subsequent terms from those that precede them. DEFINITION 4 A recurrence relation for the sequence is an equation that expresses in terms of one or more of the previous terms of the sequence, namely,,,,, for all integers with where is a nonnegative integer. A sequence is called a solution of a recurrence relation if its terms satisfy the recurrence relation. (A recurrence relations is said to recursively define a sequence. We will explain this alternative terminology in Chapter 5.) 2

EXAMPLE 5 Let be a sequence that satisfies the recurrence relation 3 for 1,2,3,, and suppose that 2. What are,,and? We see from the recurrence relation that 323 5. It then follows that 3538 and 8311 Excel is an ideal tool for solving these kinds of exercises. Please review the excerpted worksheet below. i a[i] Value 0 a[0} 2 1 a[1] 5 2 a[2] 8 3 a[3] 11 4 a[4] 14 EXAMPLE 6 Let be a sequence that satisfies the recurrence relation for 2,3,4,, and suppose that 3 and 5 What are,and? We see from the recurrence relation that 53 2. It then follows that 253. We can find,, and each successive term in a similar way as shown below. i a[i] Value 0 a[0} 3 1 a[1] 5 2 a[2] 2 3 a[3] 3 4 a[4] 5 DEFINITION 5 The Fibonacci sequence,,,,,is defined by the initial conditions 0, 1, and the recurrence relation for 2, 3, 4,. 3

EXAMPLE 7 Find the Fibonacci numbers,,,,and. The recurrence relation for the Fibonacci sequence tells us that we find successive terms by adding the previoius two terms. Because the initial conditions tell us that 0 and 1, using the recurrence relation in the definition we find that 101 112 213 325 538 As in our previous recurrence relations, we can employ Excel to find the values of the desired terms i f[i] Value 0 f[0] 0 1 f[1] 1 2 f[2] 1 3 f[3] 2 4 f[4] 3 5 f[5] 5 6 f[6] 8 7 f[7] 13 8 f[8] 21 EXAMPLE 8 Suppose that is a sequence of integers defined by!, the value of the factorial function at the integer, where 1,2,3,. Because! 12 2 11!, we see that the sequence of factorials satisfies the recurrence relation, together with the initial condition 1. EXAMPLE 9.1 Determine whether the sequence, where 3 for every nonnegative integer, is a solution of the recurrence relation 2 for 2,3,4,. Suppose that 3 for every nonnegative integer. Then, for 2, we see that 2 23132 3. Therefore,, where 3, is a solution of the recurrence relation. 4

EXAMPLE 9.2 Determine whether the sequence, where 2 for every nonnegative integer, is a solution of the recurrence relation 2 for 2,3,4,. Suppose that 2 for every nonnegative integer. Note that 1, 2, and 4. Because 2 2 213, we see that, where 2, is not a solution of the recurrence relation. EXAMPLE 9.3 Determine whether the sequence, where 5 for every nonnegative integer, is a solution of the recurrence relation 2 for 2, 3, 4,. Suppose that 5 for every nonnegative integer. Then, for 2, we see that 2 2 555. Therefore,, where 5, is a solution of the recurrence relation. EXAMPLE 10 Solve the recurrence relation and initial condition in Example 5. Recall the recurrence relation in Example 5. 3 for 2,3,4,, and suppose that 2. We can successively apply the recurrence relation in Example 5, starting with the initial condition 2, and working upward until we reach to deduce a closed formula for the sequence. We see that 23 23323 2 22 3323 3 323 23 2 3 1 We can also successively apply the recurrence relation in Example 5, starting with the term and working downward until we reach the initial condition 2 to deduce this same formula. The steps are: 3 33 3 2 33 2 3 3 33 3 4 3 32 332 231 5

EXAMPLE 11 Compound Interest Suppose that a person deposits $10,000 is a savings account at a bank yielding 11% per year with interest compounded annually. How much will be in the account after 30 years? To solve this problem, let denote the amount in the account after years. Because the amount in the account after years equals the amount in the account after 1 years plus interest for the th year, we see that the sequence satisfies the recurrence relation 0.11 1.11. The initial condition is 10,000. We can use an iterative approach to find a formula for. Note that 1.11 1.11 1.11 1.11 1.11 1.11 1.11 When we insert the initial condition 10,000, the formula 1.11 is obtained. Inserting 30 into the formula 1.11 10,000 shows that after 30 years the account contains 1.11 10,000 $228,922.97. Special Integer Sequences Questions for identifying the algebraic representation for a sequence of numeric terms: Are there runs of the same value? That is, does the same value occur many times in a row? Are terms obtained from previous terms by adding the same amount or an amount that depends on the position in the sequence? Are terms obtained from previous terms by multiplying by a particular amount? Are terms obtained by combining previous terms in a certain way? Are there cycles among terms? EXAMPLE 12.1 Find a formula for the sequence whose first five terms are: 1, 1 2, 1 4, 1 8, 1 16 We recognize an exponential sequence where powers of 2 appear in the denominators 2, 4, 8, and 16. Hence, the sequence is a geometric progression with 1and. 6

Recall that a geometric progression has the form,,,,,. In this case: 1 1 1 1 1 1 EXAMPLE 12.2 EXAMPLE 12.3 Find a formula for the sequence whose first five terms are: 1, 3, 5, 7, 9 We recognize a common difference between terms. The difference is two (2). Recalling that the form of an arithmetic progression is,, 2,,, we can see that 1 and 2. 1 123 212 25 313 27 414 29 Find a formula for the sequence whose first five terms are: 1,1,1,1,1 We recognize an exponential sequence where powers of 1 are the terms of the sequence. Odd powers of 1 produce 1 and even powers of 1 produce 1. Hence, the sequence is a geometric progression with 1 and 1. Recall that a geometric progression has the form,,,,,. In this case: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 EXAMPLE 13 How can we produce the terms of a sequence if the first 10 terms are 1, 2, 2, 3, 3, 3, 4, 4, 4, 4 In this sequence, the integer 1 appears once, the integer 2 appears twice, the integer 3 appears three times, and the integer 4 appears four times. A reasonable rule for generating this sequence is that the integer appears exactly times, so the next five terms of the sequence would all be 5, the following six terms would all be 6, and so on. The sequence generated this way is a possible match. 7

EXAMPLE 14 How can we produce the terms of a sequence if the first 10 terms are 5, 11, 17, 23, 29, 35, 41, 47, 53, 59 We need to speculate. Is this an arithmetic progression? Is this a geometric progression? Is this a combination of an arithmetic and geometric progression? Let us guess that the progression is arithmetic and employ the table below to discover the pattern of the sequence. 1. Find the difference between successive terms of the sequence. 0 11 5 6 1 17 11 6 2 23 17 6 3 29 23 6 We see that this is an arithmetic progression where 6 and 5. 56, for 0,1,2,. EXAMPLE 15 How can we produce the terms of a sequence if the first 10 terms are 1, 3, 4, 7, 11, 18, 29, 47, 76, 123 Observe that each successive term of this sequence, starting with the third term, is the sum of the two previous terms. That is, 4 31,7 4 3, 11 7 4, and so on. Consequently, if is the th term in the sequence, we guess that the sequence is determined by the recurrence relation with initial conditions 1 and 3 (the same recurrence relation as the Fibonacci sequence, but with different initial conditions). This sequence is known as the Lucas sequence, after the French mathematician Francois Édouard Lucas. Lucas studied this sequence and the Fibonacci sequence in the nineteenth century. 8

EXAMPLE 16 Find a formula for the sequence whose first few terms are: 1, 7, 25, 79, 241, 727, 2185, 6559, 19681, 59047 1. Find the difference between successive terms of the sequence. 0 7 1 6 1 25 7 18 2 79 25 54 3 241 79 162 2. Find a common factor in the differences Common Factor Remaining Factor 0 6 2 3 1 18 2 9 2 54 2 27 3 162 2 81 3. Find a pattern in the remaining factors. Common Factor Remaining Factor 0 6 2 33 1 18 2 93 2 54 2 27 3 3 162 2 81 3 4. Propose a geometric progression 3 2, 1,2,3, 5. Test the geometric progression 3 21 3 27 3 225 3 279 9

Summations DEFINITION 3.1 Summation notation is used to express the sum of a sequence and any one of the following forms may be used. or Here, the index of the summation runs through all integers starting with its lower limit m and ending with its upper limit n. A large uppercase Greek letter sigma,σ, is used to denote summation. EXAMPLE 17 Use summation notation to express the sum of the first 100 terms of the sequence, where 1 for 1,2,3,. 1 EXAMPLE 18 What is the value of? We have or from the formula 1 2 3 4 5 1491625 55 12 1 6 5512 5 1 6 5 6 11 6 55 10

EXAMPLE 19 What is the value of 1? We have 1 1 1 1 1 1 11 11 1 1 55 EXAMPLE 20 Suppose we have the sum but want the index of summation to run between 0 and 4 rather than from 1 to 5. To do this, we let 1. Then the new summation index runs from 0 (because 110 when 1) to 4 (because 514 when 5, and the term becomes 1. Hence, 1 It is easily checked that both sums are 149162555 THEOREM 1 If a and r are real numbers and 0, then 1 1 if 1 if 1 11

EXAMPLE 21 Evaluate the double sum 1. First evaluate the inner sum and find a function where i is the index of the outer sum. In other words, eliminate both the inner summation and the inner index variable. 23 6 2. Next evaluate the outer sum. 6 6 6 4 5 2 60 TABLE 2 Some Useful Summation Formulae. Sum, 1, 1 Closed Form, EXAMPLE 23 Evaluate 1. 2. 3. 338,350 4. 40,425 5. 338,350 40,425 297,925 12

1. Find these terms of the sequence, where 2 3 5 Part Expression Final Value a) 3 b) 1 c) 787 d) 2,639 9. Find the first five terms of the sequence defined by each of these recurrence relations and initial conditions. Part a), 2 12 72 432 2592 b), 2 4 16 256 65536 c), 1 2 5 11 26 d), 1 1 6 27 204 e),, 1 2 0 1 3 17. Find the solution to each of these recurrence relations with the given initial conditions. Use an iterative approach such as that used in Example 10. a) 3, 2 b) 2, 3 13

c), 1 d) 23, 4 e) 2 1, 1 f) 3 1, 1 g), 5!! h) 2, 1!!! 14

19. Suppose that the number of bacteria in a colony triples every hour. a) Set up a recurrence relation for the number of bacteria after hours have elapsed. Since the number of bacteria triples every hour, the recurrence relation should say that the number of bacteria after hours is 3 times the number of bacteria after hours. Letting denote the number of bacteria after hours, this statement translates into the recurrence relation b) If 100 bacteria are used to begin a new colony, how many bacteria will be in the colony in 10 hours? The given statement is the initial condition (the number of bacteria at the beginning is the number of bacteria after no hours have elapsed). We solve the recurrence relation by iteration: Hence, the number of bacteria in the colony after 10 hours is,, 15