4. There are 400 students in a school. For New Year, each student sent 200 greetings to other students. What is the minimum number of pairs of students who could have greeted each other? Answer: 200.
Solution: The total number of greetings was $200 * 400=80000$. And the number of different pairs of students is $-400 * 399 / 2=79800$, which is 200 less than the number of greetings. Therefore, at least 200 pairs had 2 greetings. We can show that exactly 200 pairs can be: Let the 1st student greet everyone from the 2nd to the 201st, the 2nd student greet from the 3rd to the 202nd, ... the 200th student greet everyone from the 201st to the 400th, and then the 201st student greet everyone from the 202nd to the 400th and the 1st, the 202nd student greet from the 203rd to the 400th and from the 1st to the 2nd, and so on. Then the paired greetings will only be between students whose numbers differ by exactly 200.

5. Several schoolchildren have 128 identical tokens among them. They play a game according to the following rule: if someone has no less than half of all the tokens, then each of the others takes from this player as many tokens as they already have (if there are two such players, they choose by lot). Seven such exchanges occurred. Prove that now all 128 tokens are with one schoolchild.

Solution: Note that the number of tokens for those who take tokens doubles. Therefore, after the first transfer of tokens, they had a number of tokens that is a multiple of 2, but then the first player also had a number of tokens that is a multiple of two, since their total number is even. Similarly, after the second transfer of tokens, everyone will have a number of tokens that is a multiple of 4. After the 7th exchange, everyone will have a number of tokens that is a multiple of 128, that is, either 0 or 128.