Problem: At a party there are $n$ people, some people give each other a hand. After the party everyone writes down on a piece of paper how many people he/she shook hands with. It turns out there are $n-1$ different numbers written down.Prove that there were two people at the party, such that every other person has shaken both of their hands or none of their hands.
My attempt: I want to try to prove this with induction on $n$.
Suppose that $n=3$. Then there are two different numbers written down. Without loss of generality, suppose that person 1 ($=p_1$) and person 2 ($=p_2$) have the same amount of handshakes, which is different from the amount of handshakes of $p_3$. Suppose that $p_3$ did a handshake with $p_1$, and not with $p_2$. In order for $p_2$ to get the same amount of handshakes, $p_2$ must shake hands with either $p_1$ or $p_3$. We said that $p_3$ didn't shake hands with $p_2$, so its only possible that $p_1$ shakes hands $p_2$, but then the difference in handshakes between $p_1$ and $p_2$ doesn't change, so contradiction. Conclusion: $p_3$ has either given both $p_1$ and $p_2$ a handshake or none of them.This concludes the induction basis.
Now we suppose that the situation where there are $n$ people, $n-1$ different numbers and $2$ people with the given constraints hold. Now we add another person to the party. The $n-1$ different numbers are numbers from the set $\{0,1,\ldots,n-1\}$ and we see that one number is not used. I will now prove that the number not used is either $0$ or $n-1$. Suppose that the number not used is not $0$ or $n-1$. Then we have a list with both $0$ and $n-1$ on it. But that means that there is a person that has shaken hands with no one and a person that has shaken hands with everyone (except themselves of course), so a contradiction.
My struggle: So at this point I realize that if the new person shakes hands with no one or everyone except themselves, the induction step holds (the same 2 people from the previous situation are the $2$ people in the new situation). But I am not sure how I can show this.
Does someone have suggestions for me about how to prove it/do it differently? I would love the hear feedback/get help.
It is sometimes easier to go in the opposite direction, using the contrapositive. So instead of:
you instead prove:
The above are equivalent, though if you now chain them together you get more of an infinite descent argument (and a proof by contradiction) than an induction argument.
The $n$ people shake hands somewhere from $0$ times to $n-1$ times. Clearly it is impossible for the party to contain someone who shakes no hands and someone who shakes hands with everybody, so the $n-1$ distinct numbers that are written down are either $0,...,n-2$ or $1,...,n-1$, and one of the numbers is written twice.
Suppose (for a contradiction) the two people who wrote the same number did not shake hands with exactly the same set of other people. Clearly that means they can't have written $0$ or $n-1$. Now remove the person who did write $0$ or $n-1$ from the party, and show that you now have a party of $n-1$ people who wrote $n-2$ numbers, and the two who wrote the same number did not shake hands with exactly the same set of other people.
So you can now repeat the argument until there are only $3$ or even $2$ people left. In that case the condition is impossible - it is not possible that the two people who shook the same number of hands did so with a different set of people. Therefore the assumption that this is possible in the party of $n$ people is also false.