Permutation with Repetition R={ r1,r2,... , rn } is the n elements to be arranged. The elements r1, r2, ..., rn may be the same. Try to design an algorithm that lists all the different permutations of R.