+ All Categories
Home > Documents > Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Date post: 19-Dec-2015
Category:
View: 220 times
Download: 2 times
Share this document with a friend
61
Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang
Transcript
Page 1: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Number Sequences

Lecture 7: Sep 28

(chapter 4.1 of the book and chapter 9 of the notes)

?overhang

Page 2: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Interesting Sequences

We have seen how to prove these equalities by induction,

but how do we come up with the right hand side?

Page 3: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Finding General Pattern

a1, a2, a3, …, an, …

1,2,3,4,5,6,7,…

1/2, 2/3, 3/4, 4/5,…

1,-1,1,-1,1,-1,…

1,-1/4,1/9,-1/16,1/25,…

General formula

The first step is to find the pattern in the sequence.

ai = i

ai = i/(i+1)

ai = (-1)i+1

ai = (-1)i+1 / i2

Page 4: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Summation

Page 5: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

A Telescoping Sum

When do we have such closed form formulas?

Page 6: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Sum for Children

89 + 102 + 115 + 128 + 141 + 154 + ··· + 193 + ··· + 232 + ··· + 323 + ··· + 414 + ··· + 453 + 466

Nine-year old Gauss saw

30 numbers, each 13 greater than the previous one.

1st + 30th = 89 + 466 = 5552nd + 29th = (1st+13) + (30th13) = 5553rd + 28th = (2nd+13) + (29th13) = 555

So the sum is equal to 15x555 = 8325.

Page 7: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Arithmetic Series

Given n numbers, a1, a2, …, an with common difference d, i.e. ai+1 - ai =d.

What is a simple closed form expression of the sum?

Adding the equations together gives:

Rearranging and remembering that an = a1 + (n − 1)d, we get:

Page 8: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Geometric Series

2 n-1 nnG 1+x +x + +x::= +x

What is the closed form expression of Gn?

2 n-1 nnG 1+x +x + +x::= +x

2 3 n n+1nxG x +x +x + +x +x=

GnxGn= 1 xn+1

n+1

n

1- xG =

1- x

Page 9: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Infinite Geometric Series

n+1

n

1- xG =

1- x

Consider infinite sum (series)

2 n-1 n i

i=0

1+x+x + +x + =x + x

n+1n

nn

1-lim x 1limG

1- x 1-=

x=

for |x| < 1 i

i=0

1x =

1- x

Page 10: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Some Examples

Page 11: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

The Value of an Annuity

Would you prefer a million dollars today

or $50,000 a year for the rest of your life?

An annuity is a financial instrument that pays out

a fixed amount of money at the beginning of

every year for some specified number of

years.Examples: lottery payouts, student loans, home mortgages.

A key question is what an annuity is worth.

In order to answer such questions, we need to know

what a dollar paid out in the future is worth

today.

Page 12: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

My bank will pay me 3% interest. define bankrate

b ::= 1.03

-- bank increases my $ by this factor in 1 year.

The Future Value of Money

So if I have $X today,

One year later I will have $bX

Therefore, to have $1 after one year,

It is enough to have

bX 1.

X $1/1.03 ≈ $0.9709

Page 13: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

• $1 in 1 year is worth $0.9709 now.

• $1/b last year is worth $1 today,

• So $n paid in 2 years is worth

$n/b paid in 1 year, and is worth

$n/b2 today.

The Future Value of Money

$n paid k years from now

is only worth $n/bk today

Page 14: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Someone pays you $100/year for 10 years.

Let r ::= 1/bankrate = 1/1.03

In terms of current value, this is worth:

100r + 100r2 + 100r3 + + 100r10

= 100r(1+ r + + r9)

= 100r(1r10)/(1r) = $853.02

$n paid k years from now

is only worth $n/bk today

Annuities

Page 15: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Annuities

I pay you $100/year for 10 years,

if you will pay me $853.02.

QUICKIE: If bankrates unexpectedly

increase in the next few years,

A. You come out ahead

B. The deal stays fair

C. I come out ahead

Page 16: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Annuities

In terms of current value, this is worth:

50000 + 50000r + 50000r2 +

= 50000(1+ r + )

= 50000/(1r)

Let r = 1/bankrate

If bankrate = 3%, then the sum is $1716666

If bankrate = 8%, then the sum is $675000

Would you prefer a million dollars today

or $50,000 a year for the rest of your life?

Page 17: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Suppose there is an annuity that pays im

dollars at the end of each year i forever.

For example, if m = $50, 000, then the

payouts are $50, 000 and then $100,

000 and then $150, 000 and so on…

Annuities

What is a simple closed form expression of the following sum?

Page 18: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Manipulating Sums

What is a simple closed form expression of ?

(see an inductive proof in tutorial 2)

Page 19: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Manipulating Sums

for x < 1

For example, if m = $50, 000, then the payouts are $50,

000 and then $100, 000 and then $150, 000 and so on…

For example, if p=0.08, then V=8437500.

Still not infinite! Exponential decrease beats additive increase.

Page 20: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Loan

Suppose you were about to enter college today

and a college loan officer offered you the following

deal:

$25,000 at the start of each year for four years to

pay for your college tuition and an option of

choosing one of the following repayment plans:Plan A: Wait four years, then repay $20,000 at the

start of each year for the next ten years.

Plan B: Wait five years, then repay $30,000 at the

start of each year for the next five years.

Assume interest rate 7% Let r = 1/1.07.

Page 21: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Plan A: Wait four years, then repay $20,000 at the

start of each year for the next ten years.

Plan A

Current value for plan A

Page 22: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Plan B

Current value for plan B

Plan B: Wait five years, then repay $30,000 at the

start of each year for the next five years.

Page 23: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Profit

$25,000 at the start of each year for four years

to pay for your college tuition.

Loan office profit = $3233.

Page 24: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

How far out?

?overhang

Book Stacking

Page 25: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

book centerof mass

One Book

Page 26: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

book centerof mass

One Book

Page 27: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

12

book centerof mass

One Book

Page 28: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

12

n

More Books

How far can we reach?

To infinity??

Page 29: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

centerof mass

12

n

More Books

Page 30: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

need center of mass

over table

12

n

More Books

Page 31: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

center of mass of the whole stack

12

n

More Books

Page 32: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

center of mass of all n+1 booksat table edge

center of mass of top n books at edge of book n+1

∆overhang

12

nn+1

Overhang

center of mass of the new book

Page 33: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

1

n

1/2

Overhang

center of n-stack at x = 0.center of n+1st book is at x = 1/2,so center of n+1-stack is at

Page 34: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

center of mass of all n+1 books

center of mass of top n books

12

nn+1

1/2(n+1)

Overhang

Page 35: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Bn ::= overhang of n books

B1 = 1/2

Bn+1 = Bn +

Bn =

12(n+1)

1 1 1 1

1+ + + +2 2 3 n

n

1 1 1H ::=1+ + + +

2 3 n

nth Harmonic number

Overhang

Bn = Hn/2

Page 36: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Harmonic Number

n

1 1 1H ::=1+ + + +

2 3 nHow large is ?

1 number

2 numbers, each <= 1/2 and > 1/4

4 numbers, each <= 1/4 and > 1/8

2k numbers, each <= 1/2k and > 1/2k+1

Row sum is <= 1 and >= 1/2

Row sum is <= 1 and >= 1/2

Row sum is <= 1 and >= 1/2

The sum of each row is <=1 and >= 1/2.

Page 37: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Harmonic Number

n

1 1 1H ::=1+ + + +

2 3 nHow large is ?

The sum of each row is <=1 and >= 1/2.

k rows have 2k-1 numbers.

If n is between 2k-1 and 2k+1-1,

there are >= k rows and <= k+1

rows,

and so the sum is at least k/2

and is at most (k+1).

Page 38: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

1x+1

0 1 2 3 4 5 6 7 8

1

1213

12

1 13

Harmonic Number

Estimate Hn:

n

1 1 1H ::=1+ + + +

2 3 n

Page 39: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

n

0

1 1 1 1 dx 1 + + +...+

x+1 2 3 n

n+1

n1

1dx H

x

nln(n+1) H

Now Hn as n , so

Harmonic series can go to infinity!

Integral Method (OPTIONAL)

Amazing equality

http://www.answers.com/topic/basel-problem

Proofs from the book, M. Aigner, G.M. Ziegler, Springer

Page 40: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Spine

Shield

Towers

Optimal Overhang?

(slides by Uri Zwick)

Page 41: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Overhang = 4.2390Blocks = 49

Weight = 100

Optimal Overhang?

(slides by Uri Zwick)

Page 42: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Product

Page 43: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Factorial defines a product:

Factorial

How to estimate n!?

Too rough…

Page 44: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Factorial defines a product:

Factorial

How to estimate n!?

Still very rough, but at least show that it is much larger than Cn

Page 45: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Factorial defines a product:

Turn product into a sum taking logs:

ln(n!) = ln(1·2·3 ··· (n – 1)·n)

= ln 1 + ln 2 + ··· + ln(n – 1)

+ ln(n)n

i=1

ln(i)

Factorial

How to estimate n!?

Page 46: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

…ln 2ln 3ln 4

ln 5ln n-1

ln nln 2

ln 3ln 4ln 5

ln n

2 31 4 5 n–2 n–1 n

ln (x+1)ln (x)

Integral Method (OPTIONAL)

Page 47: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

ln(x) dx ln(i) ln (x+1)dxi=1

nn n

1 0

x

lnxdx =xlne

Reminder:

n

i=1

1 nln(i) n+ ln

2 eso guess:

n ln(n/e) ln(i) (n+1) ln((n+1)/e)

Analysis (OPTIONAL)

Page 48: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

exponentiating:

nn

n! n/ e e

n

i=1

1 nln(i) n+ ln

2 e

nn

n! 2πne

~Stirling’s formula:

Stirling’s Formula

Page 49: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

More Integral Method

What is a simple closed form expressions of ?

Idea: use integral method.

So we guess that

Make a hypothesis

Page 50: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Sum of Squares

Make a hypothesis

Plug in a few value of n to determine a,b,c,d.

Solve this linear equations gives a=1/3, b=1/2, c=1/6, d=0.

Go back and check by induction if

Page 51: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Cauchy-Schwarz

(Cauchy-Schwarz inequality) For any a1,…,an, and any b1,…bn

Proof by induction (on n): When n=1, LHS <= RHS.

When n=2, want to show

Consider

Page 52: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Cauchy-Schwarz

(Cauchy-Schwarz inequality) For any a1,…,an, and any b1,…bn

Induction step: assume true for <=n, prove n+1.

induction

by P(2)

Page 53: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Cauchy-Schwarz

(Cauchy-Schwarz inequality) For any a1,…,an, and any b1,…bn

Exercise: prove

Answer: Let bi = 1 for all i, and plug into Cauchy-Schwarz

This has a very nice application in graph theory that hopefully we’ll see.

Page 54: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Geometric Interpretation

(Cauchy-Schwarz inequality) For any a1,…,an, and any b1,…bn

•The left hand side computes the inner

product of the two vectors

• If we rescale the two vectors to be of

length 1, then the left hand side is <= 1

•The right hand side is always 1.

a

b

Page 55: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Arithmetic Mean – Geometric Mean Inequality

(AM-GM inequality) For any a1,…,an,

Interesting induction (on n): • Prove P(2)

• Prove P(n) -> P(2n)

• Prove P(n) -> P(n-1)

Page 56: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Arithmetic Mean – Geometric Mean Inequality

(AM-GM inequality) For any sequence of non-negative numbers a1,…,an,

Interesting induction (on n): • Prove P(2)

Want to show

Consider

Page 57: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Arithmetic Mean – Geometric Mean Inequality

(AM-GM inequality) For any sequence of non-negative numbers a1,…,an,

Interesting induction (on n): • Prove P(n) -> P(2n)

induction

by P(2)

Page 58: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Arithmetic Mean – Geometric Mean Inequality

(AM-GM inequality) For any sequence of non-negative numbers a1,…,an,

Interesting induction (on n): • Prove P(n) -> P(n-1)

Let the average of the first n-1 numbers.

Page 59: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Arithmetic Mean – Geometric Mean Inequality

(AM-GM inequality) For any sequence of non-negative numbers a1,…,an,

Interesting induction (on n): • Prove P(n) -> P(n-1)

Let

Page 60: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Geometric Interpretation

(AM-GM inequality) For any sequence of non-negative numbers a1,…,an,

•Think of a1, a2, …, an are the side lengths of a high-dimensional rectangle.

•Then the right hand side is the volume of this rectangle.

•The left hand side is the volume of the square with the same total side length.

•The inequality says that the volume of the square is always not smaller.

e.g.

Page 61: Number Sequences Lecture 7: Sep 28 (chapter 4.1 of the book and chapter 9 of the notes) ? overhang.

Arithmetic Mean – Geometric Mean Inequality

(AM-GM inequality) For any sequence of non-negative numbers a1,…,an,

Exercise: What is an upper bound on ?

•Set a1=n and a2=…=an=1, then the upper bound is 2 – 1/n.

•Set a1=a2=√n and a3=…=an=1, then the upper bound is 1 + 2/√n – 2/n.

•…

•Set a1=…=alogn=2 and ai=1 otherwise, then the upper bound is 1 + log(n)/n


Recommended