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?

Answers were Sorted based on User's Feedback



There are N secret agents each know a different piece of secret information. They can telephone eac..

Answer / guest

(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 reqiured for remaining (N -
4) secret agents.

Total telephone calls require are

= (N - 2) + 2 + (N - 4)

= 2N - 4

Let\'s take an example. Say there are 4 secret agents W, X,
Y & Z. Divide them into two groups of 2 each i.e. (W, X) and
(Y, Z). Here, 4 telephone calls are required.

1. W will call up X.

2. Y will call up Z.

3. W, who knows WX will call up Y, who knows YZ.

4. X, who knows WX will call up Z, who knows YZ.

Take an another example. Say there are 5 secret agents J, K,
L, M & N. Divide them into two groups i.e. (J, K) and (L, M,
N). Here, 6 telephone calls are required.

1. J will call up K.

2. L will call up M.

3. M will call up N. Now M and N know LMN.

4. J, who knows JK will call up M, who knows LMN.

5. K, who knows JK will call up N, who knows LMN.

6. L will call up to anyone of four.

Is This Answer Correct ?    20 Yes 10 No

There are N secret agents each know a different piece of secret information. They can telephone eac..

Answer / harsh

N-1

Is This Answer Correct ?    9 Yes 6 No

There are N secret agents each know a different piece of secret information. They can telephone eac..

Answer / m.n.prakash

N-1
EX:
take N=4 then.....
N1 call to N2,N3,N4.so N1 can know information from those
three.then N2 call N3,N4 and know info from both.finally
N3 call to N4 and know the info from N4.so totally need the
only 4 calls to know each others.
so i can that only they need 4 phone calls.

Is This Answer Correct ?    6 Yes 6 No

There are N secret agents each know a different piece of secret information. They can telephone eac..

Answer / max

The minimum number of calls required are: (n-1)+(n-2) = 2n-3

First agent needs to call n-1 agents to get all the
information. At the end of his last call i.e. (n-1)'th call,
the first and the n'th agent know all the information.
Now, if the first agent calls the remaining (n-2) agents,
all the information is shared between all agents.
It would not matter if the number of agents were even or odd.

Is This Answer Correct ?    0 Yes 1 No

There are N secret agents each know a different piece of secret information. They can telephone eac..

Answer / manish kumar verma

a--->b = a calls to b
let say n peoples are {n1,n2,n3....nN}

step 1:n1--->n2 , n3-->n4 , n5-->n6....
step 2:n1-->n3, n5-->n7, n9-->n11 ..
step 3:n1-->n5, n9-->n13...
.
.
.
so on.
So in total minimum n-1 calls in both n even or odd..

Is This Answer Correct ?    3 Yes 5 No

There are N secret agents each know a different piece of secret information. They can telephone eac..

Answer / fayaz

ANS:2(N-1)

Is This Answer Correct ?    0 Yes 3 No

There are N secret agents each know a different piece of secret information. They can telephone eac..

Answer / abhinay

if we suppose n=2
then minimum 1 call is needed to share the message to each
other.
if n=3 then 2+1 call
if n=4 then 3+2+1 call
similarly for N=n then (n-1)+(n-2)+(n-3)+.........+1 call
needed to share the message to each other

Is This Answer Correct ?    2 Yes 6 No

There are N secret agents each know a different piece of secret information. They can telephone eac..

Answer / guest

N(N-1)

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More Puzzles Interview Questions

At a recent painting competition,Jonny's rendition of a constable was not last.priya only just managed to avoid last place and came third.the lady who paintd a monkey was very successfull and took first place>Mary beat the lady who painted the lady the temple and the lady who painted the flower beat saching.can you determine who painted what and who won

2 Answers   QA,


If you look at a clock and the time is 3:15. What is the angle between the hour and the minute hands? ( The answer to this is not zero!)

4 Answers   Google,


If 5/2 artists make 5/2 paintings using 5/2 canvases in 5/2 days then how many artists r required to make 25 paintings using 25 canvases in 25 days?

7 Answers  


Suppose five bales of hay are weighed two at a time in all possible ways. The weights in pounds are 110, 112, 113, 114, 115, 116, 117, 118, 120, and 121. How much does each bale weigh?

1 Answers  


A man went into a fast food restaurant and ate a meal costing Rs. 105, giving the accountant a Rs. 500 note. He kept the change, came back a few minutes later and had some food packed for his girl friend. He gave the accountant a Rs. 100 note and received Rs. 20 in change. Later the bank told the accountant that both the Rs. 500 and the Rs. 100 notes were counterfeit. How much money did the restaurant lose? Ignore the profit of the food restaurant.

23 Answers   TCS,






If you started a business in which you earned Rs.1 on the first day, Rs.3 on the second day, Rs.5 on the third day, Rs.7 on the fourth day, & so on. How much would you have earned with this business after 50 years (assuming there are exactly 365 days in every year)?

7 Answers   Infosys,


In training for a competition, you find that swimming downstream (with the current) in a river, you can swim 2 miles in 40 minutes, & upstream (against the current), you can swim 2 miles in 60 minutes. How long would it take you to swim a mile in still water?

2 Answers  


if you are running in the race and you overtakes 2nd no player then whats your position?

16 Answers   eClerx,


suppose you build a tower interlocking cubes that is 99 cubes high. And suppose you have to paint each square on the tower. How many squares would you have to paint?

9 Answers  


12 members were present at a board meeting. Each member shook hands with all of the other members before & after the meeting. How many hand shakes were there?

8 Answers   Arena,


x^y+y^x=5298.If x and y are integers find x and y.

1 Answers  


there is one flower in the basket on the frist day and it doubles on each day if it get full on 30th day then on what day it will be half?

14 Answers   eClerx,


Categories