Computer Science, asked by selahaddinoz, 15 days ago

Suppose there are N people and each has a different piece of information. In this case, there are N different pieces of information. These people want to learn all the information by sending electronic messages to each other. N different information can be added in an electronic message, but a message can be sent to only one person. Design a greedy algorithm so that the least number of messages are sent and people have all the information after the process is finished. Give the design of the algorithm in detail and specify the minimum number of messages.

Answers

Answered by clairarmy
0

if N= 2 (suppose A and B)

A------> B

B------> A

or if there are more than 2 people... they can make a group done

Similar questions