FROM SIMPLE GROWTH TO NUMERICAL SIMULATIONS: A PRIMER IN DYNAMIC PROGRAMMING