This article is from the Puzzles FAQ, by Chris Cole chris@questrel.questrel.com and Matthew Daly mwdaly@pobox.com with numerous contributions by others.
A married couple organizes a party. They only invite other married
couples. At least one person of an invited couple is acquainted to
at least the host or the hostess (so between sets {host,hostess} and
{male of invited couple, female of invited couple} there exists at
least one relation, but two, three or four relations is also possible).
Upon arrival at the party, each person shakes hands with all other
guests he/she doesn't know yet (it is assumed everybody knows
him/herself and his/her partner).
When all couples have arrived and all the handshaking has been done,
the host mingles between the guests and ask everybody (including his
wife): "How many hands did you shake?". To his surprise, all responses
are different.
With the above information, you must be able to determine how many
hands the host and hostess each shook.
induction/handshake.s
Assume there were 2n people (including host and hostess)
in the party.
1. When the host asked the question he must have got
2n-1 responses (including from his wife).
2. All of the responses were different.
The responses have to be (0, 1, 2, 3, ..., 2n-2)
to satisfy the above requirements. As 2n-2 is the maximum
possible handshakes any person in this party could have made.
/** Below,
P{x} - means a person who shook x hands.
H - means the host
**/
H: <-------->2n-2 0
2n-3 1
2n-4 2
2n-5 3
. .
. .
. .
n n-1 n-2
 
Continue to: