I have been struggling with this problem and hope someone could help. I am trying a variation of non-repetitive combination scenario. I can use the formula n!/r!x(n-r)! to find non-repetitive combinations of size "r" from "n" numbers. However, these combination have repeating elements.
I have 9 letters - A, B, C, D, E, F, G, H, I I want to find unique sets of three letters such as:
A B C D E F G H I A D G B E H C F I B E G
If I use the standard non-repetitive combination, I might get sets like A B C, A B D, A B E . In this case A and B are repeated in all sets.
Following are my questions: - How to calculate the number of combinations as described above? - How to calculate the available combinations if we allow k repeating elements. Example. For a combination of 4 elements, we set the k to 2. This means A B C D, A B E F are allowed but not A B C D and A B C E.
I read a ton of materials on combinations and permutations but none of them seem to be covering this scenario.
I would really appreciate if you can give some pointers and direction.