Sunday, January 16, 2011

Answer To Handshake Problem

The answer is 8. Its very easy to get to the answer all you need is a little imagination.
Here I have shown a couple of approaches to solving this classic problem.

Well, the easiest way to think of this problem is this way:
Think there are 10 people in a room and each one has to shake hand with 9 people. Thus 10 x 9 handshakes. But that actually double the number of actual handshakes, since A shaking hands with B is same as B with A. Hence we divide the product with 2 do get the actual number of handshakes.

The number of distinct handshakes between 'n' number of people is equal to sum to ( n - 1 ) terms for the arithmetic sequence 1, 2, 3, 4, ..., ( n - 1 ).
For the layman, all it means is that, when you have for instance 5 people, you'll have 4+3+2+1 = 10 distinct handshakes. Now how tough is that to figure out?!! If you really need to know deep and well how that's figured out, check out the exercise below. Or else you can stop here.

Draw five circles. On the first circle just jot 2 points (diametrically). On the second circle 3 dots. On the 3rd four, 4th 5 and 5th 6 dots.
Now in the first circle, join the points. That's 1 handshake. That is when only two people in a room, the total number of distinct handshakes will be 1 !
On the second circle, join the points in all possible ways and hence count the number of distinct 'handshakes'. You should have 3. Easy and cool huh!
On the third you'll have 6 handshakes. Similarly on the fourth you'll have 10 handshakes and for six people you'll have 15 handshakes.

You can even devise a neat and clean formula for this small problem. I happen to be a Math student so, did not have much problem deriving it using Forward Difference Tables and Newton's Forward Interpolation Formula. For x number of people and y handshakes, y = ( x^2 - x ) / 2.
Math students can try it out for themselves and if you need help you are always welcome to comment below.

Comments are always welcome!!

The Handshake Problem

It's been a very very long time. Now I am back again into blogging. Hope I remain interested longer this time. I have something to share with you all:

Imagine there are 'x' no of people in a meeting and they are introduced to each other, i.e. which basically breaks down to the fact that they shake hands. Now the question is if there were a total of 28 distinct shake hands, how many people are there in the meet-up. That is, find 'x'. Post your answers with your explanations in the comments section. I will post the answer tomorrow. All the best ;)