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.


For example:


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


etc


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.


Thanks



Creating a combinations with unique sets
I have deleted what was here as it was based on a misunderstanding of the problem. My current understanding of the problem is that, given positive integers $k\le n$ one wants the largest number of $k$-element subsets of an $n$-element subset, no two intersecting in more than one element. This has indeed been studied as part of coding theory. In the language of coding theory, we want the biggest binary code of length $n$, all codewords being of weight $k$, the code having minimal distance $2k-2$. The case $k=3$ is discussed at <http://oeis.org/A001839> and the notes there also give references to the general case. 


