Title: Deterministic and Stochastic Optimal Control