Respuesta :
Each person shakes 7 hands, but once you count the handshake between A and B, you don't need to count the handshake between B and A. There are a total of 8*7/2 = 28 handshakes.
Another way to look at it is
7 +6+5 +4 + 3 + 2 + 1 = 28
This problem is like the shaking hands problem having to do with what happens at the end of a hockey team. The winners sometimes stay on the ice and the first player goes down the line and "High Fives" all the other members of the team.
He's done so he goes to the dressing room. No more high 5s for him.
Next the second player does the same thing. Then he leaves the ice and so on down the to the last two players when one high fives the other.
Done.
Your problem is exactly the same.
The formula as you probably know is Sum = (n + 1)*n/2
7 +6+5 +4 + 3 + 2 + 1 = 28
This problem is like the shaking hands problem having to do with what happens at the end of a hockey team. The winners sometimes stay on the ice and the first player goes down the line and "High Fives" all the other members of the team.
He's done so he goes to the dressing room. No more high 5s for him.
Next the second player does the same thing. Then he leaves the ice and so on down the to the last two players when one high fives the other.
Done.
Your problem is exactly the same.
The formula as you probably know is Sum = (n + 1)*n/2