Maths WorkshopMaths problems with full solutions
Exercise 606Combinatorics › Pigeonhole principleM1Added 4 Nov 2026

Two people with the same number of friends

#pigeonhole#graphs#degrees

Statement

At a party with n≥2n\ge2 people, friendship is mutual. Prove that two people have the same number of friends at the party.

Hint

The number of friends of a person is an integer between 00 and n−1n-1. That gives nn possible values for nn people, which is one too many to conclude directly. Can the values 00 and n−1n-1 both occur?

Show solutionHide solution

Solution

Idea. Count the possible values and show that there are really only n−1n-1 of them.

Values. Each person has between 00 and n−1n-1 friends. Suppose some person AA has 00 friends and some person BB has n−1n-1 friends. Then BB is a friend of everybody, in particular of AA, so AA has at least one friend: contradiction. Hence the values 00 and n−1n-1 do not occur together.

Pigeonhole.
- If nobody has 00 friends, all the numbers of friends lie in {1,…,n−1}\{1,\dots,n-1\}.
- If somebody has 00 friends, then nobody has n−1n-1 friends, and all the numbers lie in {0,…,n−2}\{0,\dots,n-2\}.

In both cases the nn people take at most n−1n-1 different values, so two people have the same number of friends.

Remark. The statement is false if we allow a person to be their own friend or friendships to be one-way. The mutuality is used exactly once, in the key step.

Lesson. Pigeonhole: count the boxes carefully, and look for a hidden constraint that removes one box.