A Puzzle Addict? Love Challenges? We have Visual Puzzles, Logic Puzzles, Physics Puzzles, Math Puzzles, Brain Teaser and Mystery puzzles.

# N secret agents

Puzzle:

There are N secret agents each know a different piece of secret information. They can telephone each other and exchange all the information they know. After the telephone call, they both know anything that either of them knew before the call. What are the minimum number of telephone calls needed so that all of the them know everything?

For Solution SCROLL DOWN...

Solution:

(2N - 3) telephone calls, for N = 2,3
(2N - 4) telephone calls, for N > 3

Divide the N secret agents into two groups. If N is odd, one group will contain one extra agent.

Consider first group: agent 1 will call up agent 2, agent 2 will call up agent 3 and so on. Similarly in second group, agent 1 will call up agent 2, agent 2 will call up agent 3 and so on. After (N - 2) calls, two agents in each the group will know anything that anyone knew in his group, say they are Y1 & Y2 from group 1 and Z1 & Z2 from group 2.

Now, Y1 will call up Z1 and Y2 will call up Z2. Hence, in next two calls total of 4 agents will know everything.

Now (N - 4) telephone calls are required for remaining (N - 4) secret agents.

Total telephone calls require are
= (N - 2) + 2 + (N - 4)
= 2N - 4