I've been working on this stupid fucking problem for nearly 6 months. it doesn't help I'm shithouse at graph theory and combinatorics.
You have a set of 3 sets named A, B, and C. Each set must contain 4 elements, and at least two pairs of these sets (AB, AC, BC) must share at least one element.
If I gave you three sets that meet those constraints we can see that (A and B share 2 elements, A and C share 0 elements, etc). The graph theory part of this is that the three sets can be converted into the bipartite graph in pic related.
So one could give you the reverse challenge: generate a valid set of {A,B,C} given the numbers . For example, if given the pairings {3,1,1}, there are two unique sets of {A,B,C} that are valid:
One variant with total 7 elements
A = {1,2,3,4}
B = {1,2,3,5}
C = {4,5,6,7}
Second variant with total 8 elements
A = {1,2,3,4}
B = {1,2,3,5}
C = {3,6,7,8}
I've been trying to write a python script that can generate every possible set {A,B,C} that satisfies the constraints above, and I've gotten nowhere. I've managed to find 20 of them by hand, and I'm almost certain that for 3 sets there is only 20 valid sets. Finding all valid sets {A,B} with the same constraints is fairly trivial (there's 3). I won't even bother finding sets {A,B,C,D} by hand since there's gotta be hundreds.