# What is the fastest way to solve this combinatorics problem?

I have eight sets, $$A_1$$, $$A_2$$, $$A_3$$, $$A_4$$, $$B_1$$, $$B_2$$, $$B_3$$, $$B_4$$ and I know that:

• $$|A_i| = |B_j| = 4$$ for all $$i, j$$
• $$|B_i \cap B_j| = |A_i \cap A_j| = 2$$ whenever $$i \neq j$$
• $$|A_i \cap B_j| = 3$$ for all $$i, j$$

and I want to determine if this situation can actually occur, and if yes the possible number of elements of the union of all eight sets. Is there a fast way to approach this? (it is a sub-problem of a general problem I am working on, where $$2$$ could be replaced by $$4$$ for certain $$i$$, $$j$$, and $$3$$ could be replaced by $$1$$. I plan to consider all the cases and list how many elements the union of all of them has).

No, this is not possible. For any $$i$$, since $$A_i \cap B_1$$ and $$A_i \cap B_2$$ must share at least 2 elements -- they both have size 3, drawn from $$A_i$$ of size 4 -- we have that each $$A_i$$ must also contain the two elements that $$B_1, B_2$$ share. But then each $$A_i$$ must consist of those two elements, plus two elements which are not shared by any of the other $$A_i$$. By a symmetric argument, those two elements must also be in each $$B_j$$.
For $$A_1$$, call the two other elements $$a, a'$$. We have that precisely one of $$a, a'$$ is in each of the $$B_j$$, which means there must either be at least two $$B_j$$ containing $$a$$, or at least two $$B_j$$ containing $$a'$$. But this contradicts the pairwise intersection among the $$B_j$$ having precisely 2 elements.
We may as well let $$A_1=\{1,2,3,4\}$$, in which case we may as well let $$B_1=\{1,2,3,5\}$$, $$B_2=\{1,2,4,6\}$$, $$B_3=\{1,3,4,7\}$$, and $$B_4=\{2,3,4,8\}$$. Starting next with $$B_1=\{1,2,3,5\}$$, we may as well let $$A_2=\{1,2,5,x\}$$, with $$x\gt5$$. But now we're stuck, because $$A_2\cap B_3$$ can have at most $$2$$ elements. So the three criteria for the eight sets cannot all be satisfied.