permutation with duplicate numbers