Optimal Control examples continued: Bellman, Dynamic Programming Carl Boettiger, 29 Oct 2011 Discrete-time state…