Title: Optimal Control of Random Sequences in Problems with Constraints