Calculate the least amount of needed repetitions to get n different sequences.

I want to calculate the least possible amount of repetitions I need to get n different sequences.

So let's say I have 4 variations. (ex: AA, AB, BA, BB)
And the sequence is 3 variations long. (ex: AA-BA-AB)

A repetition is when any sequence has used the same variation at the same spot as the current one.
So 'BB-BA-AB' and 'AA-AB-AB' has one repetition, but 'BB-BA-AB' and 'BB-AA-AB' has 2

So let's say I only need 4 sequences, then I would not need any repetitions (for the given possible variations and sequence length):

What I want is a formula that would be able to calculate it for any amount of variations, length, and amount of sequences needed.

  • Savionf Savionf

    Questions at this level should come with a bounty, otherwise you may not get an answer.

  • Calculate what exactly?

    • The least amount of repetitions/similarities needed to get n sequences (taking into account the amount of variations, the length of the sequences and the amount of sequences). So with the example given, if I only need 3 sequences, then the sequences don't need to have any repetitions or similarities to get the 3 sequences. But once I go higher to 5+, one of the sequences will have at least one similarity with another sequence.

Join Matchmaticians Affiliate Marketing Program to earn up to a 50% commission on every question that your affiliated users ask or answer.