Modelling a Permutation Problem