Combinations: How many handshakes?

Each of 17 people shakes hands with 14 people (all except themselves and their 2 neighbors), so there are

$$\frac{17\times 14}{2} = 119$$

handshakes (dividing by 2 to account for symmetry, as you would otherwise count "$A$ shaking hands with $B$" and "$B$ shaking hands with $A$" as distinct events).


Here's another way to think about it.

If everyone shook hands with everyone you'd have $\frac {17*16}2 = 136$ handshakes (divide by 2 because the above is double counting A shaking hands with B and so forth).

However, there are $\frac {17*2}2 = 17$ handshakes that aren't happening because neighbors aren't shaking hands (2 neighbors for each of the 17 people, again divided by 2 to remove duplicates).

So $136-17 = 119$

Pew's response is a little more direct, but finding the number by calculating the total possibilities minus the "not allowed" interactions is sometimes a little more intuitive for some people.


You can think of this in graph theory as the following:


$G$ has $17$ vertices with degree $14$, since there are no loops(people self handshaking), and no vertices are adjacent to the vertices beside them. So total degree is $17\times 14$.

We know that degree is equal to $2\times\text{number of edges}$ and hence there are $\frac{17\times 14}{2}=119$ edges in total, where edges represent handshakes.