On the Theory of Optimal Processes in Discrete Systems