Maths WorkshopMaths problems with full solutions
Exercise 340Combinatorics › Graph theoryL1Added 31 Oct 2026

The handshake lemma

#graphs#parity

Statement

At a party, some pairs of people shake hands (each pair at most once). Show that the number of people who shake an odd number of hands is even.

Hint

Count the total number of hands shaken in two ways.

Show solutionHide solution

Solution

Let did_i be the number of hands shaken by person ii. Each handshake involves two people, so
∑idi=2h,\sum_id_i=2h,
where hh is the total number of handshakes. This sum is even.

Modulo 22, each did_i is 00 or 11, so the sum is congruent to the number of people with did_i odd. Since the sum is even, that number is even.