Skip to main content

This might not be a question which you have ever asked, but where would you start in terms of answering it? The number of hairs on your head is so large, that this might seem like a silly question as it seems so unlikely that two people could have the same numbers of hairs on their heads, and you certainly would never have the time to go round counting!

It is however possible to show that it is absolutely guaranteed that at any one time there will be people with the same number of hairs on their head in London.


First of all we need to make some assumptions, using information which is already available.  We need to know how many people there are in London (Around 7.5 million people not counting anyone who is bald.)  We also need to know how many hairs people have on their heads. (People have somewhere between 1 and 150,000 hairs on their heads, also ignoring anyone who is completely bald.)

We therefore have up to 150,000 choices for the number of hairs people have on their heads.  We have 7.5million people to spread out amongst these options.  7.5 million divided by 150,000 equals 50.  There simply isn’t room for everyone to have a unique number of hairs on their head.  In fact for at least one of the options, there will be at least 50 people who share that number of hairs!

10 PigeonsThe Pigeonhole Principle

The method we’ve used to solve the problem above is called the Pigeonhole principle.  The idea is that if you have m pigeons and n pigeonholes, if m is bigger than n, then there will be at least one pigeonhole which contains more than one pigeon. So if you had 10 pigeons and 9 pigeonholes, then there would have to be at least one pigeonhole containing more than one pigeon.

You could use this principle if someone asked you how many people you would need in a room to guarantee that two people have the same birthday. There are 366 days in a leap year, so there are 366 options (pigeonholes) – so in order to guarantee two people with the same birthday you would need 367 people (pigeons) in the room. For another article involving the mathematics of birthdays look at this article on the Birthday Paradox.

handshakeShaking Hands

Let us look at one more example.  Imagine you have 20 people in a room going around shaking hands.  Are there two of them who have shaken the same number of hands?

For each person they could have shaken the hands of between 1 and 19 people.  (Assuming that no person shakes someone else’s hand twice, no one shakes their own hand and that no one refuses to shake hands at all.)  There are 20 people and 19 options for the number of possibilities of hands to shake.  According to the Pigeonhole principle, there must be some people who have shaken the same number of hands.

The Pigeonhole principle turns out not only to be an abstract mathematical principle, but is also useful in the field of computer science. Becoming good at mathematics is about becoming good at solving problems – being able to take what you already know and apply it to different situations. This is one of the reasons that employers like mathematicians – they know that they can present them with an unfamiliar problem and that they will use their mathematical way of thinking to come up with solutions. Whether the problem is something serious like a glitch in a bank’s security or something trivial like the hairs problem, mathematical thinking can help find answers.


Article by Hazel Lewis