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

Similar documents
Summing Series: Solutions

Number Theory. Everything else. Misha Lavrov. ARML Practice 10/06/2013

Math Problem Set #3 Solution 19 February 2001

Chapter 1.6. Perform Operations with Complex Numbers

Math 2142 Homework 5 Part 1 Solutions

Partial Fractions. June 27, In this section, we will learn to integrate another class of functions: the rational functions.

Assignment 16 Assigned Weds Oct 11

Math 475, Problem Set #8: Answers

Algebra Review. Finding Zeros (Roots) of Quadratics, Cubics, and Quartics. Kasten, Algebra 2. Algebra Review

Math 3 Variable Manipulation Part 3 Polynomials A

Power series and Taylor series

CS1800: Sequences & Sums. Professor Kevin Gold

Math Lecture 4 Limit Laws

Math Lecture 18 Notes

Math Lecture 3 Notes

Foundations of Math II Unit 5: Solving Equations

Quiz 3 Reminder and Midterm Results

MATH 3012 N Homework Chapter 9

Lecture 10: Powers of Matrices, Difference Equations

27 Wyner Math 2 Spring 2019

What if the characteristic equation has a double root?

Mathematics (MEI) Advanced Subsidiary GCE Core 1 (4751) June 2010

Grade 7/8 Math Circles. Continued Fractions

5.1 Simplifying Rational Expressions

DIFFERENTIATION RULES

MTH 1310, SUMMER 2012 DR. GRAHAM-SQUIRE. A rational expression is just a fraction involving polynomials, for example 3x2 2

Math 4242 Fall 2016 (Darij Grinberg): homework set 8 due: Wed, 14 Dec b a. Here is the algorithm for diagonalizing a matrix we did in class:

Section Example Determine the Maclaurin series of f (x) = e x and its the interval of convergence.

Algebra 1: Hutschenreuter Chapter 10 Notes Adding and Subtracting Polynomials

Generating Function Notes , Fall 2005, Prof. Peter Shor

Mathematics (MEI) Advanced Subsidiary GCE Core 1 (4751) May 2010

Some Review Problems for Exam 2: Solutions

5.2 Polynomial Operations

LESSON 8.1 RATIONAL EXPRESSIONS I

Evaluating Limits Analytically. By Tuesday J. Johnson

LESSON 6.1 EXPONENTS LESSON 6.1 EXPONENTS 253

5.6 Solving Equations Using Both the Addition and Multiplication Properties of Equality

= W z1 + W z2 and W z1 z 2

Math 192r, Problem Set #3: Solutions

Chapter 1: Precalculus Review

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.

Math 651 Introduction to Numerical Analysis I Fall SOLUTIONS: Homework Set 1

Section 3.6 Complex Zeros

Before this course is over we will see the need to split up a fraction in a couple of ways, one using multiplication and the other using addition.

Section 4.6 Negative Exponents

Lesson 5: The Distributive Property

Tropical Polynomials

EXTRA CREDIT FOR MATH 39

LESSON 6.2 POLYNOMIAL OPERATIONS I

What is proof? Lesson 1

Recurrence Relations and Recursion: MATH 180

Section 1.x: The Variety of Asymptotic Experiences

Table of Contents. 2013, Pearson Education, Inc.

Spring Nikos Apostolakis

Sequences and infinite series

1. Introduction to commutative rings and fields

O.K. But what if the chicken didn t have access to a teleporter.

Infinite Limits. By Tuesday J. Johnson

Math 320: Real Analysis MWF 1pm, Campion Hall 302 Homework 4 Solutions Please write neatly, and in complete sentences when possible.

Solving Recurrence Relations 1. Guess and Math Induction Example: Find the solution for a n = 2a n 1 + 1, a 0 = 0 We can try finding each a n : a 0 =

Partial Fraction Decomposition

Generating Functions

ABE Math Review Package

Example. How to Guess What to Prove

Sec. 1 Simplifying Rational Expressions: +

A constant is a value that is always the same. (This means that the value is constant / unchanging). o

MATH 301 INTRO TO ANALYSIS FALL 2016

Key Features of a Graph. Warm Up What do you think the key features are of a graph? Write them down.

2. Limits at Infinity

P.6 Complex Numbers. -6, 5i, 25, -7i, 5 2 i + 2 3, i, 5-3i, i. DEFINITION Complex Number. Operations with Complex Numbers

Math 154 :: Elementary Algebra

2 Analogies between addition and multiplication

Unit 7: Factoring Quadratic Polynomials

Divisibility in the Fibonacci Numbers. Stefan Erickson Colorado College January 27, 2006

FN20.2 INDUCTIVE & DEDUCTIVE REASONING. DAY 1 NOTES: Section 1.1 Make a Conjecture by Observing Patterns and Identifying Properties

Lesson 3 Algebraic expression: - the result obtained by applying operations (+, -,, ) to a collection of numbers and/or variables o

Holes in a function. Even though the function does not exist at that point, the limit can still obtain that value.

Equations and Inequalities. College Algebra

2.3 Differentiation Formulas. Copyright Cengage Learning. All rights reserved.

Welcome to Math Video Lessons. Stanley Ocken. Department of Mathematics The City College of New York Fall 2013

AMC Lecture Notes. Justin Stevens. Cybermath Academy

Applications. More Counting Problems. Complexity of Algorithms

Algebra III and Trigonometry Summer Assignment

Sail into Summer with Math!

1.2. Indices. Introduction. Prerequisites. Learning Outcomes

Fractions. Review R.7. Dr. Doug Ensley. January 7, Dr. Doug Ensley Review R.7

FIFTH ROOTS OF FIBONACCI FRACTIONS. Christopher P. French Grinnell College, Grinnell, IA (Submitted June 2004-Final Revision September 2004)

CDM. Recurrences and Fibonacci. 20-fibonacci 2017/12/15 23:16. Terminology 4. Recurrence Equations 3. Solution and Asymptotics 6.

Rational Functions. Elementary Functions. Algebra with mixed fractions. Algebra with mixed fractions

Announcements. CSE332: Data Abstractions Lecture 2: Math Review; Algorithm Analysis. Today. Mathematical induction. Dan Grossman Spring 2010

Limits and Continuity

2017 SUMMER REVIEW FOR STUDENTS ENTERING GEOMETRY

Intro to Algebra Today. We will learn names for the properties of real numbers. Homework Next Week. Due Tuesday 45-47/ 15-20, 32-35, 40-41, *28,29,38

SUMMATION TECHNIQUES

1. Introduction to commutative rings and fields

STEP Support Programme. Hints and Partial Solutions for Assignment 17

Before this course is over we will see the need to split up a fraction in a couple of ways, one using multiplication and the other using addition.

HAMPSHIRE COLLEGE: YOU CAN T GET THERE FROM HERE : WHY YOU CAN T TRISECT AN ANGLE, DOUBLE THE CUBE, OR SQUARE THE CIRCLE. Contents. 1.

Teacher's Page. Mar 20 8:26 AM

1.2. Indices. Introduction. Prerequisites. Learning Outcomes

Transcription:

Solving recurrences Misha Lavrov ARML Practice 2/2/2014

Warm-up / Review 1 Compute 100 k=2 ( 1 1 ) ( = 1 1 ) ( 1 1 ) ( 1 1 ). k 2 3 100 2 Compute 100 k=2 ( 1 1 ) k 2. Homework: find and solve problem Algebra #7 from the February 2009 HMMT.

Warm-up / Review Solutions 1 Write 1 1 k k 1 as k. Then the product becomes 1 2 2 3 3 4 98 99 99 100. Except for the 1 and the 100, every number occurs once in the numerator and once in the denominator, so the final answer is 1 100. 2 Write 1 1 k 2 ( 1 2 3 2 as k2 1 k 2 ) ( 2 3 4 3 = k 1 k k+1 k ) ( 3 4 5 4. Then the product becomes ) ( 99 100 101 ). 100 The second factor of each term is the reciprocal of the first factor of the next. Therefore the adjacent factors cancel, leaving only 1 2 101 100 = 101 200.

Three methods for solving recurrences Method 1: Guess and check Problem If a n = 2a n 1 + 1 and a 0 = 0, find a formula for a n.

Three methods for solving recurrences Method 1: Guess and check Problem If a n = 2a n 1 + 1 and a 0 = 0, find a formula for a n. 1 Find the first few values of a n : 0, 1, 3, 7, 15,... 2 Guess a formula: a n = 2 n 1. 3 We can prove this: { 2 n 1 = 2(2 n 1 1) + 1, 2 0 1 = 0.

Three methods for solving recurrences Method 2: Convert to a sum Problem If a n = 2a n 1 + 1 and a 0 = 0, find a formula for a n. 1 Divide by a suitable function for step 2 to work. a n 2 n = a n 1 2 n 1 + 1 2 n. 2 Make a substitution to write the recurrence as s n = s n 1 +.... s n = s n 1 + 1 2 n where s n = a n 2 n. 3 Solve for s n and reverse the substitution. n 1 s n = 0 + 2 k = 1 1 2 n a n = 2 n s n = 2 n 1. k=1

Three methods for solving recurrences Method 3: Convert to a product Problem If a n = 2a n 1 + 1 and a 0 = 0, find a formula for a n. 1 Add or subtract something that makes step 2 work. a n + 1 = 2a n 1 + 2 = 2(a n 1 + 1). 2 Make a substitution to write the recurrence as p n =? p n 1. p n = 2p n 1 where p n = a n + 1. 3 Solve for p n and reverse the substitution. p n = 2 n p 0 = 2 n a n = p n 1 = 2 n 1.

Exercises 1 Solve the recurrences: x n = 2x n 1 + 2 n, x 0 = 0. y n = 3y n 1 + 2n 1, y 0 = 0. z n = 3z 2 n 1, z 0 = 1. 2 In preparation for the next topic, solve the recurrence a n = a n 1 + 2a n 2 with a 0 = 2 and a 1 = 1.

Exercises Solutions: # 1 We solve x n by the method of sums. Dividing by 2 n, we get x n 2 n = x n 1 2 n 1 + 1. This leads to the recurrence s n = s n 1 + 1, with s 0 = 0, where s n = x n /2 n. This is easy to solve: s n = n. Therefore x n = n 2 n.

Exercises Solutions: # 1 We solve x n by the method of sums. Dividing by 2 n, we get x n 2 n = x n 1 2 n 1 + 1. This leads to the recurrence s n = s n 1 + 1, with s 0 = 0, where s n = x n /2 n. This is easy to solve: s n = n. Therefore x n = n 2 n. We solve y n by the method of products. Add n + 1 to both sides and factor to get y n + n + 1 = 3(y n 1 + n). This means that for p n = y n + n + 1 we have the recurrence p 0 = 1 and p n = 3p n 1, so p n = 3 n and therefore y n = 3 n n 1.

Exercises Solutions: # 1 We solve x n by the method of sums. Dividing by 2 n, we get x n 2 n = x n 1 2 n 1 + 1. This leads to the recurrence s n = s n 1 + 1, with s 0 = 0, where s n = x n /2 n. This is easy to solve: s n = n. Therefore x n = n 2 n. We solve y n by the method of products. Add n + 1 to both sides and factor to get y n + n + 1 = 3(y n 1 + n). This means that for p n = y n + n + 1 we have the recurrence p 0 = 1 and p n = 3p n 1, so p n = 3 n and therefore y n = 3 n n 1. Finally, for z n, we take the log of both sides. The recurrence z n = 3z 2 n 1 becomes log 3 z n = 2 log 3 z n 1 + 1, with log 3 z 0 = 0. This is the recurrence we took great pains to solve earlier, so log 3 z n = 2 n 1, and therefore z n = 3 2n 1.

Exercises Solutions: # 2 One way to approach the two-term recurrence is to begin with the method of products. Add a n 1 to both sides; then a n + a n 1 = 2a n 1 + 2a n 2 = 2(a n 1 + a n 2 ). If p n = a n + a n 1, we have p n = 2p n 1, with p 1 = 3. Therefore p n = 3 2 2n. However, this doesn t solve the problem fully: a formula for p n only tells us that a n = a n 1 + 3 2 2n.

Exercises Solutions: # 2 One way to approach the two-term recurrence is to begin with the method of products. Add a n 1 to both sides; then a n + a n 1 = 2a n 1 + 2a n 2 = 2(a n 1 + a n 2 ). If p n = a n + a n 1, we have p n = 2p n 1, with p 1 = 3. Therefore p n = 3 2 2n. However, this doesn t solve the problem fully: a formula for p n only tells us that a n = a n 1 + 3 2 2n. We can solve this by the method of sums. Let s n = ( 1) n a n ; then we have the recurrence s n = s n 1 + 3 2 ( 2)n, with s 0 = 2. Therefore s n = 2 + 3 2 n k=1 ( 2)k = ( 2) n + 1. Finally, because a n = ( 1) n s n, we get a n = 2 n + ( 1) n.

Solving linear recurrences Recurrences such as a n = a n 1 + 2a n 2 come up so often there is a special method for dealing with these. 1 Find all solutions of the form a n = r n. We will need to solve a quadratic equation, since r n = r n 1 + 2r n 2 just means r 2 = r + 2. In this case, the solutions are r = 2 and r = 1. 2 Find a combination of these solutions that satisfies the initial conditions. Here, if a n = x 2 n + y ( 1) n, we have { x 2 0 + y ( 1) 0 = a 0 = 2, So a n = 2 n + ( 1) n. x 2 1 + y ( 1) 1 = a 1 = 1. In general, if a n is a linear combination of a n 1,..., a n k, we d have to solve a degree-k polynomial to get what we want.

Example of solving linear recurrences The Fibonacci numbers are defined by F 0 = 0, F 1 = 1, F n = F n 1 + F n 2. Find a formula for F n.

Example of solving linear recurrences The Fibonacci numbers are defined by F 0 = 0, F 1 = 1, F n = F n 1 + F n 2. Find a formula for F n. 1 To find the exponential solutions, we solve r 2 = r + 1 to get r = 1 ± 5. Call these two solutions φ 1 and φ 2. 2

Example of solving linear recurrences The Fibonacci numbers are defined by F 0 = 0, F 1 = 1, F n = F n 1 + F n 2. Find a formula for F n. 1 To find the exponential solutions, we solve r 2 = r + 1 to get r = 1 ± 5. Call these two solutions φ 1 and φ 2. 2 2 Now we know F n = xφ n 1 + yφn 2. To find x and y, we solve: { { F 0 = xφ 0 1 + yφ0 2, x + y = 0, F 1 = xφ 1 1 + yφ1 2. ( ) ( ) 1 2 + 5 2 x + 1 2 5 2 y = 1.

Example of solving linear recurrences The Fibonacci numbers are defined by F 0 = 0, F 1 = 1, F n = F n 1 + F n 2. Find a formula for F n. 1 To find the exponential solutions, we solve r 2 = r + 1 to get r = 1 ± 5. Call these two solutions φ 1 and φ 2. 2 2 Now we know F n = xφ n 1 + yφn 2. To find x and y, we solve: { { F 0 = xφ 0 1 + yφ0 2, x + y = 0, F 1 = xφ 1 1 + yφ1 2. ( ) ( ) 1 2 + 5 2 x + 1 2 5 2 y = 1. 3 So x = 1 5, y = 1 5, and F n = ( 1+ 5 2 ) n ( 1 5 2 ) n 5.

One thing that can go wrong Consider the recurrence a n = 4a n 1 4a n 2, with a 0 = 0 and a 1 = 2. What goes wrong? Try to solve this using our previous methods.

One thing that can go wrong Consider the recurrence a n = 4a n 1 4a n 2, with a 0 = 0 and a 1 = 2. What goes wrong? Try to solve this using our previous methods. The problem is that r 2 = 4r 4 only has one solution: r = 2. But multiples of 2 n aren t enough to fit the initial conditions.

One thing that can go wrong Consider the recurrence a n = 4a n 1 4a n 2, with a 0 = 0 and a 1 = 2. What goes wrong? Try to solve this using our previous methods. The problem is that r 2 = 4r 4 only has one solution: r = 2. But multiples of 2 n aren t enough to fit the initial conditions. Writing a n 2a n 1 = 2(a n 1 2a n 2 ) yields the one-term recurrence a n = 2a n 1 + 2 n. We have already solved this today; the solution is a n = n 2 n. In general, when a root r is repeated k times, it yields the solutions a n = r n, a n = n r n,..., a n = n k 1 r n, and we solve for their combination as usual. (Here, all solutions to the recurrence are a combination of 2 n and n 2 n.)

Exercises 1 Solve the recurrence x n = 2x n 1 + x n 2 with x 0 = x 1 = 1. 2 Solve the recurrence y n = y n 1 + 2y n 2 + 2 with y 0 = 0 and y 1 = 1. 3 Solve the recurrence z n = z n 1 + z n 2 z n 3 with z 0 = 1, z 1 = 0, and z 2 = 3.

Exercises Solutions 1 The characteristic equation is r 2 = 2r + 1, which yields r = 1 ± 2. Determining the constants, we see that x n = (1 + 2) n + (1 2) n. 2 2 By a trick analogous to the method of products, we write y n + 1 = (y n 1 + 1) + 2(y n 2 + 1). Then y n + 1 is some combination of 2 n and ( 1) n ; from y 0 + 1 = 1 and y 1 + 1 = 2, we can deduce y n + 1 = 2 n, so y n = 2 n 1. 3 Here we must first solve the cubic r 3 = r 2 + r 1, whose three roots are 1, 1, 1. This means z n is a combination of 1, n, and ( 1) n. From the initial conditions, we see that z n = n + ( 1) n.

More math problems Inspired by 1990 VTRMC, #6. The sequence (y n ) obeys the recurrence y n = y n 1 (2 y n 1 ). Solve for y n in terms of y 0. 2005 AIME II, #11. For a positive integer m, let a 0, a 1,..., a m be a sequence such that a 0 = 37, a 1 = 72, a k+1 = a k 1 3 a k for k = 1,..., m 1, and finally, a m = 0. Find m. 2007 PUMαC, Algebra A #7. Two sequences x n and y n are defined by x 0 = y 0 = 7 and { x n = 4x n 1 + 3y n 1 y n = 3y n 1 + 2x n 1. Find lim n x n y n. [Or just solve for x n and y n.] 2011 VTRMC, #2. The sequence (a n ) is defined by a 0 = 1, a 1 = 0, and a n = a 2 n 1 n2 a n 2 1. Find a 100.

More math problems Solutions 1990 VTRMC, #6. Rewrite the recurrence as 1 y n = (1 y n 1 ) 2. It follows that 1 y n = (1 y 0 ) 2n, so y n = 1 (1 y 0 ) 2n. 2005 AIME II, #11. Let b k = a k a k+1. From the recurrence, we have b k = b k 1 3, with b 0 = 37 72. So b k = 37 72 3k. We have b 888 = a 888 a 889 = 0; but a 888 0 because b 887 = a 887 a 888 = 3. Therefore m = 889. 2007 PUMαC, Algebra A #7. Note that x n y n = 2x n 1, so we can write x n as 7x n 1 6x n 2. Solving this, we get x n = 42 5 6n 7 5, so y n = 28 5 6n + 7 xn 5. In the limit, y n 42/5 28/5 = 3 2. 2011 VTRMC, #2. From computing the first few terms, we guess that a n = n 2 1, which is confirmed by induction: n 2 1 = ((n 1) 2 1) 2 n 2 ((n 2) 2 1) 1.