1. A method for creating a Markov process that generates sequences, each sequence having a finite length L, comprising items from a set of a specific number n of items, and satisfying one or more control constraints specifying one or more requirements on the sequence, the method comprising: receiving data defining an initial Markov process of a specific order d and having an initial probability distribution; receiving data defining one or more control constraints; generating, by processing circuitry, data defining intermediary matrices, each matrix being of dimension n d by n, by zeroing out transitions in the initial Markov process data that are forbidden by the one or more control constraints, wherein generating data defining the intermediary matrices comprises defining a control satisfaction problem using the initial Markov process and the control constraint data, and filtering out transitions in the control satisfaction problem that are forbidden by the one or more control constraints using a local consistency algorithm; generating, by the processing circuitry, data defining a final non-homogeneous Markov process by processing the intermediary matrices data, generating, by the processing circuitry, the sequences having the finite length L by using the final non-homogeneous Markov process data with random walk.