Eleven Simple Algorithms to Compute Fibonacci Numbers

The Fibonacci numbers are a sequence of integers in which every number after the first two, 0 and 1, is the sum of the two preceding numbers. These numbers are well known and algorithms to compute them are so easy that they are often used in introductory algorithms courses. In this paper, we present eleven of these well-known algorithms and some of their properties. These algorithms, though very simple, illustrate multiple concepts from the algorithms field, so we highlight them. We also present the results of a small-scale experimental comparison of their runtimes on a personal laptop. Finally, we provide a list of homework questions for the students. We hope that this paper can serve as a useful resource for the students learning the basics of algorithms.

research
03/20/2018

Twelve Simple Algorithms to Compute Fibonacci Numbers

The Fibonacci numbers are a sequence of integers in which every number a...
research
02/07/2020

Computational Aspects of Sturdy and Flimsy Numbers

Following Stolarsky, we say that a natural number n is flimsy in base b ...
research
05/16/2019

Speeding up the Karatsuba algorithm

This paper describes an ∼ O(n) pre-compute technique to speed up the Kar...
research
11/06/2022

StuArt: Individualized Classroom Observation of Students with Automatic Behavior Recognition and Tracking

Each student matters, but it is hardly for instructors to observe all th...
research
05/20/2021

Heesch Numbers of Unmarked Polyforms

A shape's Heesch number is the number of layers of copies of the shape t...
research
10/31/2010

Golden and Alternating, fast simple O(lg n) algorithms for Fibonacci

Two very fast and simple O(lg n) algorithms for individual Fibonacci num...
research
10/31/2021

Fine-Grained Cryptanalysis: Tight Conditional Bounds for Dense k-SUM and k-XOR

An average-case variant of the k-SUM conjecture asserts that finding k n...