0% found this document useful (0 votes)
21 views15 pages

Intro: Fibonacci Numbers I: Daniel Kane

This document discusses Fibonacci numbers. It defines the Fibonacci sequence where each number is the sum of the two preceding numbers, starting with 0 and 1. It proves that Fibonacci numbers grow rapidly, with Fn being greater than or equal to 2n/2 for n greater than or equal to 6. A closed-form formula for calculating Fn is presented. Examples are given of calculating several large Fibonacci numbers.

Uploaded by

jose
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views15 pages

Intro: Fibonacci Numbers I: Daniel Kane

This document discusses Fibonacci numbers. It defines the Fibonacci sequence where each number is the sum of the two preceding numbers, starting with 0 and 1. It proves that Fibonacci numbers grow rapidly, with Fn being greater than or equal to 2n/2 for n greater than or equal to 6. A closed-form formula for calculating Fn is presented. Examples are given of calculating several large Fibonacci numbers.

Uploaded by

jose
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Intro:

Fibonacci Numbers I
Daniel Kane
Department of Computer Science and Engineering
University of California, San Diego

Data Structures and Algorithms


Algorithmic Toolbox
Learning Objectives
Understand the definition of the
Fibonacci numbers.
Show that Fibonacci numbers become
very large.
Definition

⎨0, n = 0,


Fn = 1, n = 1,

⎩Fn−1 + Fn−2, n > 1 .

Definition

⎨0, n = 0,


Fn = 1, n = 1,

⎩Fn−1 + Fn−2, n > 1 .

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, . . .


Developed to Study Rabbit
Populations
Rapid Growth
Lemma
Fn ≥ 2n/2 for n ≥ 6 .
Rapid Growth
Lemma
Fn ≥ 2n/2 for n ≥ 6 .

Proof
By induction
Rapid Growth
Lemma
Fn ≥ 2n/2 for n ≥ 6 .

Proof
By induction
Base case: n = 6, 7 (by direct computation).
Rapid Growth
Lemma
Fn ≥ 2n/2 for n ≥ 6 .

Proof
By induction
Base case: n = 6, 7 (by direct computation).
Inductive step:

Fn = Fn−1 + Fn−2 ≥ 2(n−1)/2 + 2(n−2)/2 ≥


2 · 2(n−2)/2 = 2n/2.
Formula

Theorem

(︃(︃ √ )︃n (︃ √ )︃n )︃


1 1+ 5 1− 5
Fn = √ − .
5 2 2
Example

F20 = 6765
Example

F20 = 6765
F50 = 12586269025
Example

F20 = 6765
F50 = 12586269025
F100 = 354224848179261915075
Example

F20 = 6765
F50 = 12586269025
F100 = 354224848179261915075
F500 = 1394232245616978801397243828
7040728395007025658769730726
4108962948325571622863290691
557658876222521294125
Computing Fibonacci numbers

Compute Fn
Input: An integer n ≥ 0.
Output: Fn .

You might also like