Here is a new problem. You have coins worth 1, 4 and 5, and you want to make 8 with as few coins as possible. A tempting rule is to grab the biggest coin first. That gives 5 + 1 + 1 + 1, which is four coins, but 4 + 4 does it in two. Greedy grabbing is not always best, and dynamic programming gives a way to be sure.
Step one: say what a table entry means. Let box a hold the fewest coins needed to make exactly the amount a. The answer we want will be box 8. Step two: say how a box depends on smaller boxes. Pick a last coin c. Then you need one coin, plus the best answer for the amount a minus c. Try every coin that fits and keep the smallest, so box a is 1 plus the minimum, over every coin c that fits, of box a minus c.
Step three: the base case. Making 0 takes 0 coins, so put 0 in box 0, and everything else grows from that. Step four: fill the boxes from left to right. For each one, check every coin and keep the smallest result. The table for coins 1, 4 and 5 reads 0, 1, 2, 3, 1, 1, 2, 3, 2. At box 8 the three options are 4, 2 and 4, and the smallest, 2, is the answer: two coins.
Those four moves are the same every time: define the entry, write its dependency, set the base case, fill in order. Fibonacci and the coins share one recipe. The name has an odd history: Richard Bellman, who developed the method in the 1950s, used “programming” in the older sense of planning, and by his own later account he liked that “dynamic” sounded impressive and was hard to object to. Whatever the name, the idea is four questions you can ask of any problem, and a table that answers them.