Jessica Waggener-
Counting Problems


THE HANDSHAKE PROBLEM

Suppose there are 50 people at a party, and every person shakes hands with every other person at the party. How many distinct handshakes are there? (If you and I shake hands, that counts as one handshake only.)

I began this problem by thinking about each person individually. In order for every person to shake hands with every other person in the room, each person would have to make 49 handshakes. BUT! Since each handshake involves two people, we wouldn't count 49*50. There are at least two ways to reduce this number to an accurate count. Most directly, take only half of 49*50. i.e. H50 = (49*50)/2. In general, Hn = (n-1)n/2.

Or, look again at each person and consider how many NEW handshakes each one makes. The first person will make 49 new handshakes. Person #2 will make 49 handshakes, but one of those is the one he already made with Person #1. Person #3 makes 49 handshakes, but one is from Person #1 and another is from Person #2. So, each person makes one less new handshake than the person before. In this case, our solution is the summation from 1 to 49, or in general: Hn =. This idea brings us right up to the recursive formula. If each new Hn is the summation up to one higher number, then Hn = Hn-1 + n-1.

The closed formula is a little bit trickier to justify, but we should recall the two other summation problems we have already done. In the lion problem, we summed from 1 to n-2 and had the closed formula: Ln = (n-1)(n-2)/2. In the triangular numbers problem, we summed from 1 to n and had the closed formula: Tn = n(n+1)/2.

Let's consider first the specific situation of H50 and consider how its summation could be generalized.

1 + 2 + 3 + . . . + 23 + 24 + 25 + 26 + 27 + . . . + 47 + 48 + 49

As you can see, each pairing sums up to 50 (or n); and this occurs 24 times (or (n-2)/2, or (n/2) -1). Plus, there is an odd term left to add in: 25 (or n/2). So the summation could be described in general terms as Hn = n[(n/2) -1] +n/2.

Simplified:

It is not necessary to demonstrate that this would also work for an even number of terms as was done in the Lion problem and the triangular numbers problem. Instead, let us reason WHY this should be the formula for the summation from 1 to n-1, based on the patterns found for the summation from 1 to n-2 and 1 to n.

In these cases, a sequence with an odd number of terms can be generalized to the same closed formula as a sequence with an even number of terms, even though the process to arrive there is different. Since it is easier to consider the sequence with an even number of terms, let us consider only those for this discussion. Recall the three formulas we have discovered thus far.

= (n-1)(n-2)/2 (Lion Problem)
= n(n-1)/2 (Handshake Problem)
= (n+1)n/2 (Triangular Numbers)

Let me offer the following analysis of these formulas:
 

Summation problem First factor - the sum of two terms from opposite ends of the sequence = the sum of the first and last terms of the sequence.  Second factor - the number of pairs summed within the sequence = equals the number of terms in the sequence divided by two.  Summation formula = first factor * second factor 
1 to n-2 n - 1 = (n-2) + 1  (n-2)/2 = (n-1)(n-2)/2
1 to n-1 n = (n-1) + 1 (n-1)/2 = n(n-1)/2
1 to n n + 1 = n + 1 n/2 = (n+1)n/2
This should serve as one justification for the closed formula, Hn = (n+1)n/2.

Other students in the class offered two other interesting approaches to finding the closed formula for the number of handshakes. One is more abstracted from the situation, the other is more abstracted in its formulation, but both are intriguing to consider:

Another Approach - part 1.

The handshake problem is a combinatoric problem where two people are chosen from a set of 50 each time. The familiar formula for this is  which is defined as . I can't follow the train of thought from our situation to the development of this formula, but I can show that it leads to the same closed formula that I developed.

= n(n-1)/2

Another Approach - part 2.

Here we are trying to find another way to relate this summation to other summations we've considered. Recall that one alternative way of finding the triangular numbers was to consider n2 and subtract the unnecessary dots, which turned out to be Tn-1. (i.e. Tn = n2 - Tn-1). If you recall that Tn and Tn-1, then you can see that Hn = Tn-1. Or, in terms of n2, it's like subtracting the Tn part instead of the Tn-1 part. So, Hn = n2 - Tn. Or, in terms of n only, replace Tn with its closed formula and you get: Hn = n2 - n(n+1)/2.

SUMMARY OF SOLUTIONS:



Return to Problems page