At a gathering of people, there are people who all know each other and people who know no one. People who know each other hug, and people who do not know each other shake hands. How many handshakes occur?
- A)
- B)
- C)
- D)
- E)
Answer
B
Key insight
A pair shakes hands exactly when at least one of the two is one of the 10 strangers. Count stranger-with-group pairs, then stranger-with-stranger pairs.
Solution
Every pair of people either hugs or shakes hands. The only pairs who hug are two people from the group of friends. So a pair shakes hands exactly when at least one of them is a stranger. Count those pairs in two groups.
1. One stranger and one friend. Each of the strangers shakes hands with each of the friends:
2. Two strangers. The strangers do not know each other either, so they shake hands too. Each of the strangers shakes other strangers' hands, giving . But that counts every handshake twice (once from each person), so divide by :
3. Total: .
The answer is .
Why this works
Sort the pairs by how many strangers they contain: zero (a hug), one, or two. Every pair falls into exactly one of these, so nothing is missed or double counted. "One from each group" is a simple multiplication, while "two from the same group" needs the divide-by-2 step because each pair gets counted from both ends.
Alternative approach
Count all pairs and take away the hugs. With people there are pairs. The hugging pairs are pairs of friends: . Everyone else shakes hands: .
The trap
Forgetting that the 10 strangers also shake hands with each other (giving 200), or counting each handshake twice (giving 490).
Concise solution
The only pairs who know each other are pairs drawn from the group of . Every other pair shakes hands, so a handshake occurs exactly when the pair contains at least one of the strangers.
Pairs with one stranger and one member of the : .
Pairs of two strangers: .
Total handshakes: .
The answer is .
Review in the AoPS books
- Introduction to Counting & Probability, Chapter 1: Counting Is Arithmetic
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.3)
- Introduction to Counting & Probability, Chapter 8: Basic Probability Techniques (§8.3)
- Introduction to Counting & Probability, Chapter 4: Committees and Combinations
Techniques
Count the complement and subtract from the total · Set up the equation/formula and compute; no special trick needed