Maths WorkshopMaths problems with full solutions
Exercise 1097Combinatorics › Pigeonhole principleL1Added 3 Nov 2026

The handshake lemma by pigeonhole

#pigeonhole#handshake#graph degrees

Statement

Show that in any group of n≥2n\ge2 people, two have the same number of friends in the group.

Hint

Each person's number of friends is between 00 and n−1n-1. But 00 and n−1n-1 cannot both occur.

Show solutionHide solution

Solution

Degrees. Degrees are in {0,1,…,n−1}\{0,1,\ldots,n-1\}.

Impossible combination. If someone has 00 friends, nobody has n−1n-1 (which would mean being friends with everyone). So at most n−1n-1 distinct degrees occur among nn people.

Pigeonhole. Two people share the same degree.

Conclusion. Two people have the same number of friends.