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?
Answer Posted / 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 |
Post New Answer View All Answers
Three neighbours are there. 1st one lends 2nd and 3rd that many no.of tractors that then already each had.After few months , 2nd lends to 1st and 3rd that many tractors then they had. After a few months 3rd lends to 1st and 2nd that many tractors then they had.Now each of them got 24. Find howmany they had initially?
foot is related to man in the same way hoof is related to...........
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
sir i need generalKnowledge previous questions for rrb secunderabad goods guard exam
At 6o'clock ,a watch strokes 6 times.The time between first and last is 30secs.At midnight 12o' clock how much time for all strokes?
In a soap company a soap is manufactured with 11 parts. For making one soap you will get 1 part as crap. At the end of the day u have 251 such scraps. From that how many soaps can be manufactured?
Three members are hunting in a forest.While crossing a streem cartridges of two of them gets wetted up.Then the third person decides his cartidges equally. After 4 shots of each person, total cartridges remaining are equal to what each had initially after sharing.How many total cartridges they initially they shared?
4 cards are placed on a table, each card has two colors. U don't know the color of the back side of eachcard.4 persons A B C and D are sitting on the table before the cards. They can see Red, Green Red and blue.Out of the 4 poeple 2 always lie. They see the color on the reverse side and give the following comment A: Yello/green B: Neither Blue/nor Green c: Blue/Yello D: Blue/ Yello find out the color on the other side of the 4 cards. No. of animals is 11 more than the no. of birds. If the no. of birds were the no. of animals and no. of animals were the no. of birds( ie., interchanging no.s of animals and birds.), the total no. of legs get reduced by one fifth (1/5). How many no. of birds and animals were there?
what job position/s are you currently holding with your current employer?
what three specific job positions do you target from qatar airways group u.k?
What is the syllabus for numerical aptitude exam to be held by the United bank of India. Plz inform me through email. Thanking You!
P pages read in d mins after day p+1 pages read in d+1 mins last day 379 pages done in 317 mins find p+4
how soon can you travel down to start your new job?
4_4_4_4=22 use all sign of maths
In rail road there are some stations. Each station should have tickets to all other stations.If they add some new stations they need 46 more tickets.How many stations are there before and after adding the stations?