Approximate realization of discrete stochastic processes