Dynamic programming algorithms

This chapter introduces the notion of dynamic programming algorithms with the implementation of one algorithm of this kind, which calculates Fibonacci numbers. The historic hero introduced in these notes is Leonardo of Pisa, a.k.a. Fibonacci, who was one of the most prominent mathematicians of the Middle Ages. Historic hero: Fibonacci Leonardo of Pisa​, a.k.a. Fibonacci (depicted in ​Figure 1​), was a mathematician. He first introduced in Europe the ​Hindu-Arabic number system​, which is the numeral system that is commonly used worldwide even today. This introduction was possible thanks to the publication of his book in 1202, ​Liber Abaci (​ Book of Calculation in English) ​[Fibonacci, 1202]​. The book describes how to use such a numeral system for addressing situations related to commerce, and for solving generic mathematical problems. One of the main contributions of Fibonacci in his book was a small note about a particular infinite sequence of numbers​, named after him. The sequence described the number of male-female pairs of rabbits at a given month. The Fibonacci sequence and the numbers it contains (i.e. 1 1 2 3 5 8 13 21 34 55 ...) has very peculiar properties that have been studied in the past by mathematicians and historians of science. It is calculated with a straightforward (and recursive!) approach. The Fibonacci number at a particular month ​n is equal to the sum

[1]  Richard S. Sutton,et al.  Reinforcement Learning: An Introduction , 1998, IEEE Trans. Neural Networks.