Question: Problem 2 (4 points). Suppose you are planning a party. You have set up a guest list of n3 people such that any two guests

 Problem 2 (4 points). Suppose you are planning a party. You

Problem 2 (4 points). Suppose you are planning a party. You have set up a guest list of n3 people such that any two guests either directly know each other or can be introduced to each other via direct/indirect mutual acquaintances. More specifically, for each pair of guests x and y, even if x does not know y,x knows at least one guest who knows at least one guest ... (the degree of connections can be arbitrarily large) ... who knows y. In our case, acquaintanceship is bidirectional - if x knows y, then y knows x. However, you were told at the last minute that you can only invite n1 guests. Design an efficient algorithm to un-invite one guest while still maintaining the above party property. You algorithm should run in O(m+n) time, where m is the number of pairs of guests who know each other

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!