It has been a pleasant evening. The company has mostly been good. OK, so-and-so has been pontificating on subjects of which he knows little. The host has excitedly showed us a thousand, almost identical, holiday snaps of sandy beaches and blue seas in various corners of the globe (there! resolve that). Someone else has droned on about his skiing prowess, and how he managed to kit himself out for 6p, by killing wild geese with his bare hands, stuffing the down into used teabags, fashioning them into alpine skiwear and building his skis out of old pallets. Nevertheless, the food was good and plentiful and it was great to catch up with some long-lost friends and beloved siblings. Now it’s time to leave. A tremendous handshaking and kissing ensues. The fond farewells are a site to behold. And I, in the midst of all this bonhomie, am calculating how many unique pairings there are. How many unique handshakes (or kisses) must occur for everyone to personally bid adieu to everyone else?
If there are just two people, then a single handshake is necessary.
If there are three people then the pairings are AB, AC and BC. Three handshakes.
If there are four people then the pairings are AB, AC, AD, BC, BD, CD. That’s six.
What if there are fourteen, or more, people at this much larger gathering? We need an easier method of calculation. There is. The observant among you will have noted a pattern that involves the number of guests (n) minus one. The minus one is there as only the very sad and very lonely person shakes hands with himself. We’ll ignore him. He won’t notice. So the calculation is 1+2+3…n-1.
For small gatherings this is easy to evaluate – just add them up. For large gatherings we need a formula. So here it is:
handshakes = (n(n-1))/2 where n = number of guests.
So for our 14 single people gathering, the number of handshakes = (14x13)/2 = 91
What if all the guests were couples who would not be shaking each others’ hands? I don’t bid my wife farewell before driving off in the car with her.
handshakes = (n(n-2))/2 = (14x12)/2 = 84. Or, our original calculation minus n/2. 91-7 = 84.
If the gathering involves a mix of single people, couples and families, then a little more calculating will be involved.
There! That was boring.
Test. What is the sum of all integers 1…100? Show your working.
There is a story, possibly apocryphal, about Carl Friedrich Gauss (1777 – 1855), the German mathematician. Whilst at primary school, he was given that task. Some versions of the tale say that the entire class was asked to do this because of a lazy teacher wanting a nap. Others suggest that Gauss was being punished for some misdemeanour. Either way, he wasn’t planning on wasting his day. 1+2=3. 3+3=6, 6+4=10… He gave it some thought and devised a formula. Within just a few seconds, much to the dismay of his, otherwise impressed, teacher, he presented the answer.
I would have done it the long way. But I’m not a mathematician.
Back