Problem

Source:

Tags: combinatorics, double counting



A school has $n$ students and some super classes are provided for them. Each student can participate in any number of classes that he/she wants. Every class has at least two students participating in it. We know that if two different classes have at least two common students, then the number of the students in the first of these two classes is different from the number of the students in the second one. Prove that the number of classes is not greater that $\left(n-1\right)^2$.