# Number of handshakes

32 people were invited at a party and started exchanging handshakes. Because of the confusion, each of them shook hands with each other multiple times: at least twice and up to X times. However, every two people exchanged different number of handshakes from every other two. What is the minimum possible number X, so that the above condition is met?

• OK all possible pairs are 32!/2!30! = 496, thus we must have at least 496 different numbers, starting from 2? – Samuel Apr 26 '16 at 9:10
• So maybe the sum 2+3+...+496? – Samuel Apr 26 '16 at 9:21
• The last sentence states the question clearly, whereas "the minimum number $X$ that each invitee shook hands with each of the others" is unclear and doesn't sound to me like what the last sentence is asking; I think you should rephrase that. – joriki Apr 26 '16 at 11:44
• @joriki: Does it now make more sense? – Samuel Apr 26 '16 at 13:30
• @Samuel: Yes, much clearer now. – joriki Apr 26 '16 at 14:12

With 32 people the number of pairs is, as you said, 496. So let one pair have 2 handshakes, another pair have 3 handshakes, another pair have 4 handshakes, etc, with the last pair having $2+496-1 = 497$ handshakes. Then X = 497.