Text this: Optimization of Stochastic Discrete Systems and Control on Complex Networks