Solution:
Each set Ai has exactly three pairs of elements. But each unordered pair chosen from {1,2,…,n} can be in at most one such set. Therefore
(2n)≥3m.
This establishes the required upper bound on the size of m.
Let T be the set of all triples, i.e.
T={(a,b,c)∣1≤a<b<c≤n}.
We now partition T into n parts, T=T0∪T1∪T2∪⋯∪Tn−1 based on the residue of a+b+c modulo n, i.e.
Ti={(a,b,c)∣(a,b,c)∈T and a+b+c≡i (mod n)}
So we have (3n) triples (our pigeons) and n pigeonholes (the parts T0,T1,T2,…,Tn−1) therefore by the pigeonhole principle at least one part Tk must have at least
n1×(3n)
triples in it. Now it suffices to show that Tk satisfies the problem. For the sake of contradiction, assume there exists two triples (a,b,c),(a′,b′,c′)∈Tk such that a=a′ and b=b′ but c=c′. This would imply
a+b+c≡j≡a′+b′+c′(modn).
Hence c≡c′ (mod n) and thus c=c′ and so we get (a,b,c)=(a′,b′,c′), contradiction. Therefore no such pair (a,b,c),(a′,b′,c′)∈Tk exists. Therefore, letting the elements of Tk be our sets Ai, we achieve
m≥n1×(3n)=6(n−1)(n−2)
as required.