lesson 8 - weeblygvmath.weebly.com/uploads/5/6/5/3/56539921/chapter.08.02...lesson 8.2 • finite...

9
Previous lessons discussed two approaches to the problem of finding a closed-form solution to the handshake problem: 1. Trial and error followed by an induction proof of the hypothesized formula 2. Counting techniques This lesson considers an approach known as the method of finite differences, which can be used to find a closed-form solution to the handshake problem and a variety of other problems. Recall that the handshake problem is described recursively by H 1 = 0, H n = H n–1 + (n – 1). The following is a table generated by this recurrence relation. The third column contains the differences between successive values in the second column. The fourth column contains the differences between successive values in the third column. Differences Number of Number of People Handshakes First Second 1 0 ___ ___ 2 1 1 ___ 3 3 2 1 4 6 3 1 5 10 4 1 6 15 5 1 7 21 6 1 8 28 7 1 Lesson 8.2 Finite Differences

Upload: others

Post on 26-Mar-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lesson 8 - Weeblygvmath.weebly.com/uploads/5/6/5/3/56539921/chapter.08.02...Lesson 8.2 • Finite Differences 457 Solve this system using the matrix techniques in Chapter 7. The finite

Previous lessons discussed two approaches to the problem of finding aclosed-form solution to the handshake problem:

1. Trial and error followed by an induction proof of the hypothesizedformula

2. Counting techniques

This lesson considers an approach known as the method of finitedifferences, which can be used to find a closed-form solution to thehandshake problem and a variety of other problems.

Recall that the handshake problem is described recursively by H1 = 0,Hn = Hn–1 + (n – 1). The following is a table generated by this recurrencerelation. The third column contains the differences between successivevalues in the second column. The fourth column contains the differencesbetween successive values in the third column.

DifferencesNumber of Number of People Handshakes First Second

1 0 ___ ___

2 1 1 ___

3 3 2 14 6 3 15 10 4 16 15 5 17 21 6 18 28 7 1

Lesson 8.2

Finite Differences

DM08_Final.qxp:DM08.qxp 5/10/14 9:03 AM Page 455

Page 2: Lesson 8 - Weeblygvmath.weebly.com/uploads/5/6/5/3/56539921/chapter.08.02...Lesson 8.2 • Finite Differences 457 Solve this system using the matrix techniques in Chapter 7. The finite

456 Chapter 8 • Recursion

The constant second differences indicate that the closed-formsolution for this recurrence relation is a second-degree polynomial, whichhas the general form an2 + bn + c.

Consider what happens when the general second-degree polynomialis evaluated for consecutive integral values of n, and first and seconddifferences are found. The following table shows the results.

DifferencesValue ofValue of n Polynomial First Second

1 a + b + c ___ ___

2 4a + 2b + c 3a + b ___

3 9a + 3b + c 5a + b 2a4 16a + 4b + c 7a + b 2a5 25a + 5b + c 9a + b 2a

Notice that the second differences are not only constant, but also thevalue of the difference is twice the value of the coefficient of n2. In the caseof the handshake problem, this result means that the constant differenceof 1 indicates that one term of the closed-form solution is n2.

The remaining terms of the closed-form solution can be found bysubstituting values from the table into the polynomial Hn = n2 + bn + c.

Although the method just demonstrated works well when the closed-form solution is second degree, it is much more tedious for degrees higherthan 2. The following alternative method uses technology and is thereforeeasier to extend to higher degrees.

Reconsider the handshake problem, a situation in which you knowthe solution is second degree: Hn = an

2 + bn + c. Since there are threevalues that you need to know (a, b, and c), select any three pairs of valuesfrom your table. The first three are convenient because of their relativelysmall values. Form three equations by substituting these three pairs intothe general second-degree polynomial Hn = an

2 + bn + c.

When n = 1, 0 = a + b + c.

When n = 2, 1 = 4a + 2b + c.

When n = 3, 3 = 9a + 3b + c.

12

12

DM08_Final.qxp:DM08.qxp 5/10/14 9:03 AM Page 456

Page 3: Lesson 8 - Weeblygvmath.weebly.com/uploads/5/6/5/3/56539921/chapter.08.02...Lesson 8.2 • Finite Differences 457 Solve this system using the matrix techniques in Chapter 7. The finite

457Lesson 8.2 • Finite Differences

Solve this system using the matrix techniques in Chapter 7.

The finite differences method can be used whenever the differencesin consecutive values of the recurrence relation become constant in afinite number of columns. The degree of the closed-form solution is thesame as the number of columns needed to achieve the constantdifferences. The number of equations in the system needed to find theclosed-form solution is 1 more than its degree.

A Finite Differences ExampleConsider a stack of cannonballs at Fort Recurrence (see Figure 8.1).

The following table displays the number of cannonballs in a pyramidof n layers.

DifferencesNumber of Number ofLayers Cannonballs First Second Third

1 1 ___ ___ ___

2 5 4 ___ ___

3 14 9 5 ___

4 30 16 7 25 55 25 9 26 91 36 11 2

1 1 14 2 19 3 1

013

� � 0.50.5

� � 0

1

×

= −

Figure 8.1Cannonballs atFort Recurrence.

DM08_Final.qxp:DM08.qxp 5/10/14 9:03 AM Page 457

Page 4: Lesson 8 - Weeblygvmath.weebly.com/uploads/5/6/5/3/56539921/chapter.08.02...Lesson 8.2 • Finite Differences 457 Solve this system using the matrix techniques in Chapter 7. The finite

458 Chapter 8 • Recursion

The recurrence relation that describes the number of cannonballs ina stack of n layers is Cn = Cn–1 + n

2. The constant differences in the thirdcolumn indicate that the closed-form solution is third degree: Cn = an

3 +bn2 + cn + d. The system created by this general third-degree polynomialand the first four values in the table is:

When n = 1, 1 = a + b + c + d.

When n = 2, 5 = 8a + 4b + 2c + d.

When n = 3, 14 = 27a + 9b + 3c + d.

When n = 4, 30 = 64a + 16b + 4c + d.

The matrix solution is

The closed-form solution, therefore, is Cn = n3 + n2 + n. Note that

unlike the case in which the solution is second degree, the coefficient ofthe first term is not one-half the constant difference.

Unfortunately, the finite difference method does not apply torecurrence relations that never achieve constant differences. In suchcases, other methods that are described in later lessons of this chapter areoften successful.

This lesson’s exercises investigate several situations that can bemodeled with recurrence relations in which the differences eventuallybecome constant.

Including Differences in a SpreadsheetIf your spreadsheet already contains the number of people and thenumber of handshakes in columns A and B, then adding columns fordifferences requires very little effort. You can add a difference column bytyping one additional formula and then copying it into as many cells asnecessary. If, for example, the spreadsheet has the number of handshakesfor a group of 1 in cell B2, for a group of 2 in cell B3, and so forth, place

16

12

13

1 1 1 18 4 2 1

27 9 3 164 16 4 1

15

1430

0.33330.50.16670

1

×

=

.

DM08_Final.qxp:DM08.qxp 5/10/14 9:03 AM Page 458

Page 5: Lesson 8 - Weeblygvmath.weebly.com/uploads/5/6/5/3/56539921/chapter.08.02...Lesson 8.2 • Finite Differences 457 Solve this system using the matrix techniques in Chapter 7. The finite

459Lesson 8.2 • Finite Differences

the first difference in cell C3 by typing the formula B3 – B2. Copy thisformula into other cells of column C. Since the values in column C are notconstant, copy the same formula into the cells of column D starting in cellD4. Because the values in column D are constant, you can stop.

The first spreadsheet below shows the formulas; the second showsthe values that result.

A B C D

1 Number of Number of First Secondpeople handshakes differences differences

2 1 03 = A2 + 1 = B2 + A2 = B3 – B24 = A3 + 1 = B3 + A3 = B4 – B3 = C4 – C35 = A4 + 1 = B4 + A4 = B5 – B4 = C5 – C46 = A5 + 1 = B5 + A5 = B6 – B5 = C6 – C57 = A6 + 1 = B6 + A6 = B7 – B6 = C7 – C68 = A7 + 1 = B7 + A7 = B8 – B7 = C8 – C79 = A8 + 1 = B8 + A8 = B9 – B8 = C9 – C810 = A9 + 1 = B9 + A9 = B10 – B9 = C10 – C9

A B C D

1 Number of Number of First Secondpeople handshakes differences differences

2 1 03 2 1 14 3 3 2 15 4 6 3 16 5 10 4 17 6 15 5 18 7 21 6 19 8 28 7 110 9 36 8 1

DM08_Final.qxp:DM08.qxp 5/10/14 9:03 AM Page 459

Page 6: Lesson 8 - Weeblygvmath.weebly.com/uploads/5/6/5/3/56539921/chapter.08.02...Lesson 8.2 • Finite Differences 457 Solve this system using the matrix techniques in Chapter 7. The finite

460 Chapter 8 • Recursion

Difference Columns on a Graphing CalculatorSome graphing calculators have a function that calculates the differencesbetween successive pairs of values in a list. Note that the calculator usedto create the following screens places a given difference opposite the firstmember of the pair rather than the second.

Exercises1. Use finite differences to determine the degree of the closed-form

formula that generates the given sequence.

a. –3, –2, 3, 12, 25, 42, 63, 88, 117, 150, 187, 228, 273, 322, . . .

b. 0.29, 0.52, 0.75, 0.98, 1.21, 1.44, 1.67, 1.90, 2.13, 2.36, 2.59, . . .

c. 0, –2, –2, 0, 4, 10, 18, 28, 40, 54, 70, 88, 108, 130, 154, . . .

d. 1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049, 177147, . . .

2. For each part of Exercise 1, determine the closed-form formula thatgenerates the sequence.

3. a. Write a recurrence relation for the number of edges Tn in acomplete graph with n vertices, Kn.

b. For your recurrence relation in part a, what is the initialcondition? (That is, how many edges are in a graph with onevertex?)

c. Use finite difference techniques to determine a closed-formformula for the number of edges in a Kn graph.

DM08_Final.qxp:DM08.qxp 5/10/14 9:03 AM Page 460

Page 7: Lesson 8 - Weeblygvmath.weebly.com/uploads/5/6/5/3/56539921/chapter.08.02...Lesson 8.2 • Finite Differences 457 Solve this system using the matrix techniques in Chapter 7. The finite

461Lesson 8.2 • Finite Differences

4. a1 = 1 and an = 3an–1 – 5

a. Find the first few (six to eight) terms.

b. Find the fixed point for this recurrence relation. (Hint: When arecurrence relation has a fixed point, all the terms are the same.Replace an and an–1 with a single variable such as x, then solve.Check your solution by using it as an initial value in therecurrence relation.)

5. A triangle has no diagonal, a quadrilateral has two diagonals, anda pentagon has five diagonals.

a. Write a recurrence relation for the number of diagonals in an n-sided polygon.

b. Use finite difference techniques to find a closed-form formula forthe number of diagonals in an n-sided polygon.

6. An auditorium has 24 seats in the front row. Eachsuccessive row, moving toward the back of theauditorium, has 2 additional seats. The last row has96 seats.

a. Create a table with a column for the number ofthe row and a column for the number of seats inthat row. Complete at least the first six entries inthe table.

b. Write a recurrence relation for the number ofseats in the nth row.

c. Find a closed-form solution for the number of seats in the nthrow. (One way to do this is to use finite differences techniques.)

d. How many rows are in the auditorium? Explain.

e. Add a third column, “Total seats,” to your table from part a.Complete at least the first six sums in this column.

f. Write a recurrence relation for the total number of seats in thefirst n rows of the auditorium.

g. Write a closed-form formula for the total number of seats in thefirst n rows of the auditorium.

DM08_Final.qxp:DM08.qxp 5/10/14 9:03 AM Page 461

Page 8: Lesson 8 - Weeblygvmath.weebly.com/uploads/5/6/5/3/56539921/chapter.08.02...Lesson 8.2 • Finite Differences 457 Solve this system using the matrix techniques in Chapter 7. The finite

462 Chapter 8 • Recursion

7. A house purchased in 2000 increased in value at the rate of 5% per year.

a. If the original cost of the house was $88,000, calculate the valueof the house each year from 2000 to 2015. (A spreadsheet mightbe nice to use here.)

b. Write a recurrence relation for the value of the house at the endof the nth year since 2000.

c. Calculate the finite differences for your numbers in part a. Doyou eventually obtain constant differences?

8. Since 2010, a herd of 50 deer has been increasing at the rate ofapproximately 4% per year.

a. Make a table that gives thenumber of deer at the end ofeach year (T0 = 50).

b. If the herd’s habitat canprovide food for a maximumof 325 deer, in what year willthere not be enough food?

c. Write a recurrence relationfor the number of deer at theend of the nth year.

d. Calculate the finitedifferences for your table inpart a. Do you eventuallyobtain constant differences?

Idaho Officials Fret Over DeerCollision Rise

Claims JournalNovember 28, 2012

Idaho’s wildlifemanagers are startingto worry about thegrowing number ofcollisions involvingmotorists and deer, elkand moose.

Studies show morethan 5,000 of theanimals were killed byvehicles on Idahoroadways last year,and that total couldbe higher since manycollisions aren’treported to law

enforcement orinsurance companies.

Now, Idaho Fish andGame Departmentmanagers say it’s timeto ramp upmonitoring andwildlife crossingprograms.

Wildlife crossings,which are showingpositive results inother states, mightbecome morecommonplacealong knownanimal migrationcorridors in Idaho.

DM08_Final.qxp:DM08.qxp 5/10/14 9:03 AM Page 462

Page 9: Lesson 8 - Weeblygvmath.weebly.com/uploads/5/6/5/3/56539921/chapter.08.02...Lesson 8.2 • Finite Differences 457 Solve this system using the matrix techniques in Chapter 7. The finite

463Lesson 8.2 • Finite Differences

9. Investigate the number of squares in a stair-step design. If possible,find a recurrence relation and a closed-form formula for thenumber of squares (Sn) at stage n.

10. This lesson includes an analysis of second-degree polynomials thatuncovered a connection between the leading coefficient of asecond-degree closed-form solution and the constant difference.Perform a similar analysis for the third-degree polynomial. How isthe leading coefficient related to the constant difference?

Computer/Calculator Explorations11. Graphing calculators have statistical functions that fit various kinds

of mathematical functions to a set of data. Many of thesecalculators include several kinds of polynomials in this collection offunctions. Prepare a report on the polynomial-fitting capabilities inyour calculator and show how they can be used to find closed-formpolynomial solutions to recurrence relations for which differencesbecome constant.

Stage 1 Stage 2 Stage 3 Stage 4

DM08_Final.qxp:DM08.qxp 5/10/14 9:03 AM Page 463