Let An be the set of n-tuples x=(x1,...,xn) with xi∈{0,1,2}. A triple x,y,z of distinct elements of An is called good if there is some i such that {xi,yi,zi}={0,1,2}. A subset A of An is called good if every three distinct elements of A form a good triple.
Prove that every good subset of An has at most 2(23)n elements.
Balkanshortlist2021combinatoricsSetscounting