Text this: A Method for Solving the Monge–Kantorovich Problem Using an Automaton and Wavelet Analysis.