Dynamic Programming and Lagrangian Multipliers. Example and Counter example