Question: Design a Greedy Algorithm 3. Suppose that there are a group of n people. Some of them meet, some of them don't. Your goal is
Design a Greedy Algorithm

3. Suppose that there are a group of n people. Some of them meet, some of them don't. Your goal is to select m people such that for each person i; i is either among the ones that are selected, or is known by someone in the selected group. a. Please design a greedy algorithm to find such m people among n people where m is minimum. (2 mark) Things to consider: 1. If somebody, say Alice, knows another person, say Bob, then we assume that Bob also knows Alice. 2. Your algorithm might not give the best solution for every input. That is OK. But try to come up with an algorithm which performs really well in terms of finding a small group of people. 3. The format of your algorithm's output is up to you. However, trying to keep it as simple as possible would be easier while describing the algorithm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
