monge1980 wrote:Hi Whit, I tried the same at the beginning, but when I extended to 5 people I didn't get the same rule:
A, B, C, D, E
A: AB, AC, AD
B: BC, BD, BE
C: CD, CE, CA
D: DE, DA, DB
E: EA, EB, EC
Noe eliminate doubleconting ...
A: AB, AC, AD
B: BC, BD, BE
C: CD, CE
D: DE
E: EA
The total now is 10 ... which cannot result from the previous rule
Still doubt on how to approach that...
So here comes the fun with your example - there is actually NO WAY for 5 people in a room to shake hands with exactly 3 people each. Let's look at your original list:
A: AB, AC, AD (This is 3 handshakes for A, and 1 each for B, C, D)
B: BC, BD, BE (But we know that A has shaken hands with B, so B must have shaken hands with A. This means that we have our first problem - according to this list, B has shaken with 4 people - w just didn't list A again)
C: CD, CE, CA (Problem again, you have C shaking hands with D, E and A but according to B's list, C has shaken hands with B as well - we have not counted correctly!)
This is going to continue, so I need to think of a better way to count to see the actual number of possibilities. If I go person by person and assign handshakes, I can see this. Note that all handshakes MUST turn up as duplicates or they can not have occurred. So I will list the handshakes under BOTH people's lists, but put duplicates in parenthesis.
A: AB, AC, AD
B: (AB), BC, BD
C: (AC), (BC), CE (wanted to get E in on the action here)
D: (AD), (BD), DE (can't shake D with C because it isn't in C's list)
E: (CE), (DE)
If there are 5 people, then E will only get to shake hands with 2 people, NOT 3, so the assignment is not possible!
SO - the rule is that the total number of people MUST be evenly divisible by the number of people involved in the action. If the handshake was some strange 3-person handshake, then the total number of people in the room would have to be divisible by 3 in order for everyone to have the same number of events.
Because our handshake is between 2 people, we must have the number of people in the room be divisible by 2 in order for them to each get the same number of handshakes.
So, if there are 20 people shaking hands with 5 people each, then we calculate that as 20*5 (total number of hands shaking) divided by 2 (the number of hands involved in each handshaking event) = 50 (because the number of people, 20, is divisible by the number of people involved in each event, 2 per handshake).
Ah - the fun of weird restrictions!

Whit