implement enumeration of permutations in linear time. This hopefully speeds up all solvers.
Ivy solver finished