Generating a smaller permutation