golden ratio: the divine proportion · leonardo fibonacci in 1202, fibonacci proposed a problem...

132
15-251 Great Theoretical Ideas in Computer Science

Upload: others

Post on 22-Mar-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

15-251Great Theoretical Ideas in

Computer Science

Page 2: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Recurrences, Fibonacci Numbers and Continued FractionsLecture 9, September 23, 2008

Page 3: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Happy Autumnal Equinoxhttp://apod.nasa.gov/apod/ap080922.html

Page 4: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Leonardo Fibonacci

Page 5: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Leonardo FibonacciIn 1202, Fibonacci proposed a problem about the growth of rabbit populations

Page 6: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Rabbit Reproduction

Page 7: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Rabbit ReproductionA rabbit lives forever

Page 8: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Rabbit ReproductionA rabbit lives forever

The population starts as single newborn pair

Page 9: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Rabbit ReproductionA rabbit lives forever

The population starts as single newborn pair

Every month, each productive pair begets a new pair which will become productive after 2 months old

Page 10: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Rabbit ReproductionA rabbit lives forever

The population starts as single newborn pair

Every month, each productive pair begets a new pair which will become productive after 2 months old

Fn= # of rabbit pairs at the beginning of the nth month

Page 11: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

month 1 2 3 4 5 6 7

rabbits

Rabbit ReproductionA rabbit lives forever

The population starts as single newborn pair

Every month, each productive pair begets a new pair which will become productive after 2 months old

Fn= # of rabbit pairs at the beginning of the nth month

Page 12: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

month 1 2 3 4 5 6 7

rabbits

Rabbit ReproductionA rabbit lives forever

The population starts as single newborn pair

Every month, each productive pair begets a new pair which will become productive after 2 months old

Fn= # of rabbit pairs at the beginning of the nth month

1

Page 13: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

month 1 2 3 4 5 6 7

rabbits

Rabbit ReproductionA rabbit lives forever

The population starts as single newborn pair

Every month, each productive pair begets a new pair which will become productive after 2 months old

Fn= # of rabbit pairs at the beginning of the nth month

1 1

Page 14: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

month 1 2 3 4 5 6 7

rabbits

Rabbit ReproductionA rabbit lives forever

The population starts as single newborn pair

Every month, each productive pair begets a new pair which will become productive after 2 months old

Fn= # of rabbit pairs at the beginning of the nth month

1 1 2

Page 15: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

month 1 2 3 4 5 6 7

rabbits

Rabbit ReproductionA rabbit lives forever

The population starts as single newborn pair

Every month, each productive pair begets a new pair which will become productive after 2 months old

Fn= # of rabbit pairs at the beginning of the nth month

1 1 32

Page 16: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

month 1 2 3 4 5 6 7

rabbits

Rabbit ReproductionA rabbit lives forever

The population starts as single newborn pair

Every month, each productive pair begets a new pair which will become productive after 2 months old

Fn= # of rabbit pairs at the beginning of the nth month

1 1 3 52

Page 17: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

month 1 2 3 4 5 6 7

rabbits

Rabbit ReproductionA rabbit lives forever

The population starts as single newborn pair

Every month, each productive pair begets a new pair which will become productive after 2 months old

Fn= # of rabbit pairs at the beginning of the nth month

1 1 3 52 8

Page 18: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

month 1 2 3 4 5 6 7

rabbits

Rabbit ReproductionA rabbit lives forever

The population starts as single newborn pair

Every month, each productive pair begets a new pair which will become productive after 2 months old

Fn= # of rabbit pairs at the beginning of the nth month

1 1 3 52 8 13

Page 19: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Fibonacci Numbers

month 1 2 3 4 5 6 7

rabbits 1 1 3 52 8 13

Page 20: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Fibonacci Numbers

Stage 0, Initial Condition, or Base Case:Fib(1) = 1; Fib (2) = 1

month 1 2 3 4 5 6 7

rabbits 1 1 3 52 8 13

Page 21: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Fibonacci Numbers

Stage 0, Initial Condition, or Base Case:Fib(1) = 1; Fib (2) = 1

Inductive Rule:For n>3, Fib(n) =

month 1 2 3 4 5 6 7

rabbits 1 1 3 52 8 13

Page 22: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Fibonacci Numbers

Stage 0, Initial Condition, or Base Case:Fib(1) = 1; Fib (2) = 1

Inductive Rule:For n>3, Fib(n) = Fib(n-1) + Fib(n-2)

month 1 2 3 4 5 6 7

rabbits 1 1 3 52 8 13

Page 23: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Sequences That Sum To n

Page 24: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Sequences That Sum To n

Let fn+1 be the number of different sequences of 1’s and 2’s that sum to n.

Page 25: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Sequences That Sum To n

Let fn+1 be the number of different sequences of 1’s and 2’s that sum to n.

f1 = 1

Page 26: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Sequences That Sum To n

Let fn+1 be the number of different sequences of 1’s and 2’s that sum to n.

f1 = 1 0 = the empty sum

Page 27: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Sequences That Sum To n

Let fn+1 be the number of different sequences of 1’s and 2’s that sum to n.

f1 = 1 0 = the empty sum

f2 = 1

Page 28: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Sequences That Sum To n

Let fn+1 be the number of different sequences of 1’s and 2’s that sum to n.

f1 = 1 0 = the empty sum

f2 = 1 1 = 1

Page 29: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Sequences That Sum To n

Let fn+1 be the number of different sequences of 1’s and 2’s that sum to n.

f1 = 1 0 = the empty sum

f2 = 1 1 = 1

f3 = 2

Page 30: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Sequences That Sum To n

2 = 1 + 1

2

Let fn+1 be the number of different sequences of 1’s and 2’s that sum to n.

f1 = 1 0 = the empty sum

f2 = 1 1 = 1

f3 = 2

Page 31: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Sequences That Sum To n

Let fn+1 be the number of different sequences of 1’s and 2’s that sum to n.

4 =

Page 32: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

2 + 2 2 + 1 + 1 1 + 2 + 1 1 + 1 + 2 1 + 1 + 1 + 1

Sequences That Sum To n

Let fn+1 be the number of different sequences of 1’s and 2’s that sum to n.

4 =

Page 33: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Sequences That Sum To n

Let fn+1 be the number of different sequences of 1’s and 2’s that sum to n.

Page 34: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

fn+1 = fn + fn-1

Sequences That Sum To n

Let fn+1 be the number of different sequences of 1’s and 2’s that sum to n.

Page 35: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

fn+1 = fn + fn-1

# of sequences beginning

with a 2

# of sequences beginning

with a 1

Sequences That Sum To n

Let fn+1 be the number of different sequences of 1’s and 2’s that sum to n.

Page 36: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Fibonacci Numbers Again

fn+1 = fn + fn-1

f1 = 1 f2 = 1

Let fn+1 be the number of different sequences of 1’s and 2’s that sum to n.

Page 37: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Visual Representation: Tiling

Let fn+1 be the number of different ways to tile a 1 × n strip with squares and dominoes.

Page 38: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

1 way to tile a strip of length 0

1 way to tile a strip of length 1:

2 ways to tile a strip of length 2:

Visual Representation: Tiling

Page 39: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

fn+1 = fn + fn-1

fn+1 is number of ways to tile length n.

fn tilings that start with a square.

fn-1 tilings that start with a domino.

Page 40: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Fibonacci Identities

Page 41: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Fibonacci Identities

Some examples:

Page 42: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Fibonacci Identities

Some examples:

Page 43: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Fibonacci Identities

Some examples:

F2n = F1 + F3 + F5 + … + F2n-1

Page 44: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Fibonacci Identities

Some examples:

F2n = F1 + F3 + F5 + … + F2n-1

Page 45: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Fibonacci Identities

Some examples:

F2n = F1 + F3 + F5 + … + F2n-1

Fm+n+1 = Fm+1 Fn+1 + Fm Fn

Page 46: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Fibonacci Identities

Some examples:

F2n = F1 + F3 + F5 + … + F2n-1

Fm+n+1 = Fm+1 Fn+1 + Fm Fn

Page 47: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Fibonacci Identities

Some examples:

F2n = F1 + F3 + F5 + … + F2n-1

Fm+n+1 = Fm+1 Fn+1 + Fm Fn

(Fn)2 = Fn-1 Fn+1 + (-1)n

Page 48: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Fm+n+1 = Fm+1 Fn+1 + Fm Fn

Page 49: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Fm+n+1 = Fm+1 Fn+1 + Fm Fn

m n

Page 50: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Fm+n+1 = Fm+1 Fn+1 + Fm Fn

m n

m-1 n-1

Page 51: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

(Fn)2 = Fn-1 Fn+1 + (-1)n

Page 52: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

(Fn)2 = Fn-1 Fn+1 + (-1)n

n-1

Fn tilings of a strip of length n-1

Page 53: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

(Fn)2 = Fn-1 Fn+1 + (-1)n

n

(Fn)2 tilings of two strips of size n-1

Page 54: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

(Fn)2 = Fn-1 Fn+1 + (-1)n

n

Draw a vertical “fault line” at the rightmost position (<n) possible

without cutting any dominoes

Page 55: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

(Fn)2 = Fn-1 Fn+1 + (-1)n

n

Swap the tails at the fault line to map to a tiling of 2 (n-1)’s to a tiling of an n-2 and an n.

Page 56: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

(Fn)2 = Fn-1 Fn+1 + (-1)n-1

n even

n odd

Page 57: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Sneezwort (Achilleaptarmica)

Each time the plant starts a new shoot it takes two months before it is strong

enough to support branching.

Page 58: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Counting Petals

Page 59: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Counting Petals5 petals: buttercup, wild rose, larkspur, columbine (aquilegia) 8 petals: delphiniums 13 petals: ragwort, corn marigold, cineraria, some daisies 21 petals: aster, black-eyed susan, chicory 34 petals: plantain, pyrethrum 55, 89 petals: michaelmas daisies, the asteraceae family.

Page 60: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

The Fibonacci Quarterly

Page 61: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Definition of φ (Euclid)

Page 62: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Ratio obtained when you divide a line segment into two unequal parts such that the ratio of the whole to the larger part is the same as the ratio of the larger to the smaller.

Definition of φ (Euclid)

Page 63: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Ratio obtained when you divide a line segment into two unequal parts such that the ratio of the whole to the larger part is the same as the ratio of the larger to the smaller.

Definition of φ (Euclid)

A B C

Page 64: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Ratio obtained when you divide a line segment into two unequal parts such that the ratio of the whole to the larger part is the same as the ratio of the larger to the smaller.

Definition of φ (Euclid)

A B Cφ = AC

AB

AB

BC=

Page 65: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Ratio obtained when you divide a line segment into two unequal parts such that the ratio of the whole to the larger part is the same as the ratio of the larger to the smaller.

Definition of φ (Euclid)

A B Cφ = AC

AB

AB

BC=

φ2 =

Page 66: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Ratio obtained when you divide a line segment into two unequal parts such that the ratio of the whole to the larger part is the same as the ratio of the larger to the smaller.

Definition of φ (Euclid)

A B Cφ = AC

AB

AB

BC=

φ2 = AC

BC

Page 67: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Ratio obtained when you divide a line segment into two unequal parts such that the ratio of the whole to the larger part is the same as the ratio of the larger to the smaller.

Definition of φ (Euclid)

A B Cφ = AC

AB

AB

BC=

φ2 = AC

BC

φ 2 - φ =

Page 68: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Ratio obtained when you divide a line segment into two unequal parts such that the ratio of the whole to the larger part is the same as the ratio of the larger to the smaller.

Definition of φ (Euclid)

A B Cφ = AC

AB

AB

BC=

φ2 = AC

BC

φ 2 - φ = AC

BC

AB

BC- =

Page 69: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Ratio obtained when you divide a line segment into two unequal parts such that the ratio of the whole to the larger part is the same as the ratio of the larger to the smaller.

Definition of φ (Euclid)

A B Cφ = AC

AB

AB

BC=

φ2 = AC

BC

φ 2 - φ = AC

BC

AB

BC

BC

BC- = = 1

Page 70: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

φ2 – φ – 1 = 0

Page 71: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

φ2 – φ – 1 = 0

φ = 1 + √5

2

Page 72: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations
Page 73: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Golden ratio supposed to arise in…

Parthenon, Athens (400 B.C.)ba

The great pyramid at Gizeh

Ratio of a person’s height to the height of his/her navel

Page 74: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Golden ratio supposed to arise in…

Parthenon, Athens (400 B.C.)ba

The great pyramid at Gizeh

Ratio of a person’s height to the height of his/her navel

Mostlycircumstantialevidence…

Page 75: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Expanding Recursively

Page 76: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Expanding Recursively

Page 77: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Continued Fraction Representation

Page 78: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

A (Simple) Continued Fraction Is Any Expression Of The Form:

where a, b, c, … are whole numbers.

Page 79: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

A Continued Fraction can have a finite or infinite number of terms.

We also denote this fraction by [a,b,c,d,e,f,…]

Page 80: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

A Finite Continued Fraction

Denoted by [2,3,4,2,0,0,0,…]

Page 81: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

An Infinite Continued Fraction

Denoted by [1,2,2,2,…]

Page 82: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Recursively Defined Form For CF

Page 83: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Continued fraction representation of a standard fraction

Page 84: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

e.g., 67/29 = 2 with remainder 9/29 = 2 + 1/ (29/9)

Page 85: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Ancient Greek Representation:Continued Fraction Representation

Page 86: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Ancient Greek Representation:Continued Fraction Representation

= [1,1,1,1,0,0,0,…]

Page 87: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Ancient Greek Representation:Continued Fraction Representation

Page 88: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Ancient Greek Representation:Continued Fraction Representation

= [1,1,1,1,1,0,0,0,…]

Page 89: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Ancient Greek Representation:Continued Fraction Representation

= [1,1,1,1,1,1,0,0,0,…]

Page 90: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

A Pattern?

Let r1 = [1,0,0,0,…] = 1

r2 = [1,1,0,0,0,…] = 2/1

r3 = [1,1,1,0,0,0…] = 3/2

r4 = [1,1,1,1,0,0,0…] = 5/3

and so on.

Theorem: rn = Fib(n+1)/Fib(n)

Page 91: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

1,1,2,3,5,8,13,21,34,55,….

Page 92: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

1,1,2,3,5,8,13,21,34,55,….

2/1 = 2

Page 93: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

1,1,2,3,5,8,13,21,34,55,….

2/1 = 23/2 = 1.5

Page 94: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

1,1,2,3,5,8,13,21,34,55,….

2/1 = 23/2 = 1.55/3 = 1.666…

Page 95: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

1,1,2,3,5,8,13,21,34,55,….

2/1 = 23/2 = 1.55/3 = 1.666…8/5 = 1.6

Page 96: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

1,1,2,3,5,8,13,21,34,55,….

2/1 = 23/2 = 1.55/3 = 1.666…8/5 = 1.613/8 = 1.625

Page 97: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

1,1,2,3,5,8,13,21,34,55,….

2/1 = 23/2 = 1.55/3 = 1.666…8/5 = 1.613/8 = 1.62521/13 = 1.6153846…

Page 98: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

1,1,2,3,5,8,13,21,34,55,….

2/1 = 23/2 = 1.55/3 = 1.666…8/5 = 1.613/8 = 1.62521/13 = 1.6153846…34/21 = 1.61904…

Page 99: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

1,1,2,3,5,8,13,21,34,55,….

2/1 = 23/2 = 1.55/3 = 1.666…8/5 = 1.613/8 = 1.62521/13 = 1.6153846…34/21 = 1.61904…

φ = 1.6180339887498948482045

Page 100: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Pineapple whorls

Church and Turing were both interested in the number of whorls in each ring of the spiral.

The ratio of consecutive ring lengths approaches the Golden Ratio.

Page 101: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations
Page 102: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Proposition: Any finite continued fraction

evaluates to a rational.

Theorem Any rational has a finite

continued fraction representation.

Page 103: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Hmm.Finite CFs = Rationals.

Then what do infinite continued fractions

represent?

Page 104: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

An infinite continued fraction

Page 105: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Quadratic Equations

• X2 – 3x – 1 = 0

• X2 = 3X + 1• X = 3 + 1/X

• X = 3 + 1/X = 3 + 1/[3 + 1/X] = …

Page 106: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

A Periodic CF

Page 107: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Theorem: Any solution to a quadratic

equation has a periodic continued fraction.

Converse: Any periodic continued

fraction is the solution of a quadratic equation.

(try to prove this!)

Page 108: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

So they express more than just the rationals…

What about those non-recurring infinitecontinued fractions?

Page 109: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Non-periodic CFs

Page 110: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

What is the pattern?

Page 111: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

What is the pattern?

No one knows!

Page 112: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

What a cool representation!

Finite CF: Rationals

Periodic CF: Quadratic roots

And some numbers reveal hidden regularity.

Page 113: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

More good news: Convergents

Let α = [a1, a2, a3, ...] be a CF.

Define: C1 = [a1,0,0,0,0..]

C2 = [a1,a2,0,0,0,...]

C3 = [a1,a2,a3,0,0,...] and so on.

Ck is called the k-th convergent of α

α is the limit of the sequence C1, C2, C3,…

Page 114: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Best Approximator Theorem

• A rational p/q is the best approximator to a real α if no rational number of denominator smaller than q comes closer to α.

Page 115: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Best Approximator Theorem

• A rational p/q is the best approximator to a real α if no rational number of denominator smaller than q comes closer to α.

BEST APPROXIMATOR THEOREM: Given any CF representation of α, each convergent of the CF is a best approximator for α !

Page 116: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Best Approximators of π

C1 = 3

C2 = 22/7

C3 = 333/106

C4 = 355/113

C5 = 103993/33102

C6 =104348/33215

Page 117: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Continued Fraction Representation

Page 118: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Continued Fraction Representation

Page 119: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Remember?

We already saw the convergents of this CF [1,1,1,1,1,1,1,1,1,1,1,…]are of the form Fib(n+1)/Fib(n)

Hence:

Page 120: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

1,1,2,3,5,8,13,21,34,55,….

• 2/1 = 2• 3/2 = 1.5• 5/3 = 1.666…• 8/5 = 1.6• 13/8 = 1.625• 21/13 = 1.6153846…• 34/21 = 1.61904…

• φ = 1.6180339887498948482045...

Page 121: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

As we’ve seen...

Page 122: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Going the Other Way

Page 123: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

What is the Power Series Expansion of z/(1-z-z2) ?

What does this look like when we expand it as an

infinite sum?

Page 124: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Since the bottom is quadratic we can factor it:

Page 125: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Write as a sum of two terms

where

Solving:

Page 126: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

Now use the geometric series

Page 127: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations
Page 128: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

The nth Fibonacci number is:

Leonhard Euler (1765) J. P. M. Binet (1843)A de Moivre (1730)

Page 129: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations
Page 130: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations
Page 131: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

74

Recurrences and generating functions

Golden ratio

Continued fractions

Convergents

Closed form for FibonaccisHere’s What You Need to

Know…

Page 132: Golden Ratio: the divine proportion · Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations