## Task A-1.5.

Spouses Ana and Tomislav came to a party where four other couples were also present. Upon arrival, a certain number of handshakes occurred. No one shook hands with their own spouse or with themselves. Later, when Tomislav asked everyone how many people they had shaken hands with, he received nine different answers. How many people did Ana shake hands with?
## Solution.

No one dealt with more than eight people, so the answers Tomislav received were: "0", "1", "2", "3", "4", "5", "6", "7", "8".

Ana definitely did not deal with eight people. If Ana had dealt with eight people, everyone else (except Tomislav) would have dealt with her, so no one would have answered "0".

Let's say person $A_{1}$ dealt with eight people. We can conclude that the only person who could have dealt with zero people is the spouse of $A_{1}$. Let's call this person $A_{2}$.

Now, if we assume that Ana dealt with seven people, then everyone except Tomislav and person $A_{2}$ would have dealt with Ana and person $A_{1}$, so no one would have answered "1".

Let's say person $B_{1}$ dealt with seven people. We conclude that the person who answered "1" is her spouse $B_{2}$, because all other people dealt with both Ana and person $A_{1}$.

By similar reasoning, we find that the couple $C_{1}$ and $C_{2}$ gave the answers "6" and "2", and the couple $D_{1}$ and $D_{2}$ gave the answers "5" and "3".

Finally, Ana is left, who gave the answer "4".

The following graph shows that this is indeed possible:

![](https://cdn.mathpix.com/cropped/2024_05_30_7166a15529367baa5955g-06.jpg?height=585&width=711&top_left_y=1698&top_left_x=661)

Therefore, Ana dealt with four people.

## NATIONAL MATHEMATICS COMPETITION

2nd grade - high school - A variant
April 3, 2011.