Go back to previous page
Forum URL: http://www.cut-the-knot.org/cgi-bin/dcforum/forumctk.cgi
Forum Name: This and that
Topic ID: 137
Message ID: 3
#3, RE: Exchanging information between n persons
Posted by alexb on Aug-04-01 at 12:49 PM
In response to message #2
> I don't know if this is the minimum
> number of calls,

Judging by the given examples it's not.

> but I did what I could.

You got a good upper bound. I good problem is seldom solved in a single step. Furthermore, your first solution may suggest improvements.

For example, assume the number of people is 2n. Then your solution gives an estimate of 2(2n - 1) = 4n - 2.

Now, split the fellows into two groups of n people each and mark one fellow in each group. Proceed as follows:


Let the marked fellows call (n - 1) people in their respective groups. This takes 2(n - 1) calls.
Let one of the marked fellows call the other: one more call.
Repeat 1 with 2(n - 1) calls.

This leads to the total of

2·2(n - 1) + 1 = 4n - 3,

which is less than your estimate.

If there are 4n people, we'll split them into 2 groups of 2n people each. In each group we need 4n - 3 with one call in-between between the two groups. This gives you

2(4n - 3) + 1 = 8n - 5,

which is better than 8n - 3 of the previous estimate.