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

Certain words are coded as follows : BEAR-9281, DRUM-0683,PRY- 485 AND DOOR-7899.What is the code for ‘R’?

2 Answers   Satyam,


Wo kay chej hi jo saal may 1 baar aata hai months may 2 baar aata hai weeks may 4 baar aata hai or din may 6 baar

0 Answers   College School Exams Tests,


1 apple = 6 rupees(indian currency)1 orange 3 rupees and 1 lemon 10 paise. i wan to buy 100 fruits(above mentioned)for 100 rupees. tell me how much quantity of apple orange and lemon will be buy for 100 rupees. this is serious qstn.help me plzz????????

13 Answers   Broadridge,


in 10 hrs,if the cistern is filled ,then how much time the outlet takes to empty the cistern

1 Answers   Syntel,


with heavy raining ,At Midnight 12, aap car lekar ja rahe ho aur bus stand par 3 log (80 years woman , ur best friend , ur lover ) khade he....lekin aap kisi ek ko hi apni car me bitha sakte ho..to aap kya karoge aur kyu ????

5 Answers   Parle, Parle G,






In a kingdom far far away, the King decided that the time has come to find a husband for his princess daughter. The King wanted to find a worthy lad for his princess, so he promised to give his daughter away to the first young (or old) man who would solve the puzzle that has stumped the best of his court mathematicians for years. The puzzle is very simple: in a palace, there are 25 rooms arranged in a square--5 rows of rooms with 5 rooms in each row. In every room there is a light switch which not only switches on/off the light in that room, but also switches the lights in the adjacent rooms--the room to the right, to the left, the room above and the room below. Initially, all of the lights are turned off. The goal is to turn the lights on in every room of the palace.

22 Answers   Adobe,


Given the following facts: 1. Dinesh is younger than Farukh and older than Gurmit. 2. Jatin is younger than Chandu and older than Eshrat. 3. Amit is younger than Irfan and older than Chandu. 4. Farukh is younger than Bhavin and older than Hemant. 5. Irfan is younger than Gurmit and older than Jatin. 6. Hemant is older than Gurmit. Who is the Youngest?

1 Answers  


13.333*19.111=?

11 Answers   TCS,


consider 3 by 3 matrix & take 1-9 numbers but not repeat the numbers add each row and column then each row and column has the answer 13 how?

4 Answers  


A man has Ten Horses and nine stables as shown here. [] [] [] [] [] [] [] [] [] The man wants to fit Ten Horses into nine stables. How can he fit Ten horses into nine stables?

3 Answers  


16*2/3*7*3/43*1/3=?

12 Answers   State Bank Of India SBI,


A fish had a tail as long as its head plus a quarter the lenght of its body. Its body was three-quarters of its total length. Its head was 4 inches long. What was the length of the fish?

2 Answers  


Categories