The Optimal Control Of A Stochastic System