4. There are 7 students, and it is known that each of them has at least 3 classmates among the remaining 6. Then, the number of pairs of classmates among these 7 students is .
Problem 662
Official solution
4.7.
Proof: 7 people are all classmates.
Take any student , according to the problem, among the remaining 6 people, there are at least 3 classmates, denoted as .
Next, we prove: the remaining 3 people are also classmates of .
If not, there must exist who is not a classmate of , then, are also not classmates of , which means has at most 2 classmates, contradicting the condition that "each person has at least 3 classmates".
Therefore, the 7 people are all classmates.