Implementation of the algorithm Move To Front direct and inverse tranformation