So if we have to select 3 numbers with repetition from a set {1, 2, 3, 4, 5} we would do 5*5*5 right? But wouldn’t this also take multiple count numbers such as 555 thrice or numbers such as 221 twice? When we permute ‘Mississippi’ to find the total number of permutation we also consider repetition, but when we have to choose a 4 digit lock we do 10*10*10*10 but here we don’t consider repetition? So when do i consider repetitions and when do I not? Help please

We won’t.

When you say “with repetition”, we are essentially having three slots

XYZ

and filling one number from that slot (which can be the same digit). That number is unique - we can’t get that number by filling different numbers in that slot.

Oh okay! I think I understand. Because the we are choosing numbers from a set for the where the elements aren’t repeated, we won’t count it multiple times. Like if the set was {m, i, s, t, y} and we had to choose 4 with repetition we would just do 5*5*5*5 but if the set was {m, i, i, s, t, y, y} for the same question then we would have to we would count a certain permutation more than once so we will have to divide out the repetitions.

But if that’s the case, what would you do if the set was {1, 2, 3, 4, 4, 5, 5} instead of just {1, 2, 3, 4, 5} and you had to select 3 with repetition?

Recall that sets cannot have repeats in them. Hence, {1, 2, 3, 4, 4, 5, 5} = {1, 2, 3, 4, 5}.

Oh right. What if was a list not a set then, for {1, 2, 3, 4, 4, 5, 5} and you had to pick 3 distinct numbers with repetition?

Then the problem becomes considerably harder, as you need to consider multiple cases:

- when 5 doesn’t repeat
- when 5 repeats once (i.e, two instances)

and the same for 4.