Problem

Source: India Postals 2015

Tags: analytic geometry, combinatorics



Let $S$ be a set of in $3-$ space such that each of the points in $S$ has integer coordinates $(x,y,z)$ with $1 \le x,y,z \le n $. Suppose the pairwise distances between these points are all distinct. Prove that $$|S| \le min \{(n+2)\sqrt{\frac{n}{3}},n\sqrt{6} \}$$