n people know each a different piece of gossip.
They can phone each other and exchange all they know so that after the call the parties know anything that either of them knew before the call.
What is the smallest number of calls needed so that everyone knows everything and how is this number achieved?
(In reply to
solution by Dej Mar)
I have some doubts regarding the 2n-3 formula.
According to the formula, 4 people should need 2*4-3 = 5 calls
Let the 4 people be A, B, C and D
Call 1
A calls B
A has info A+B
B has info B+A
Call 2
C calls D
C has info C+D
D has info D+C
Call 3
A calls C
A has info A+B+C+D
C has info C+D+A+B
Call 4
B calls D
B has info B+A+D+C
D has info D+C+B+A
|
Posted by Hugo
on 2012-07-26 13:36:13 |