Imagine you%u2019re planning an end-of-the semeter party, and are trying to deci
ID: 3535644 • Letter: I
Question
Imagine you%u2019re planning an end-of-the semeter party, and are trying to decide which of your n friends to invite. This time, the limit is not the size of your house, since you%u2019ll be outside. Instead, the problem is that some of your friends just don%u2019t get along, and inviting any two who don%u2019t get along is a recipe for disaster. Luckily, it turns out each of your friends has a problem with at most three of your other friends.
Give a 1/3 approximation algorithm for this problem.
Explanation / Answer
start from the person whos has least number of enemies then make ai of his enemies as 1 indicating that they are not to be invited so proceed in this way and keep on eliminnating the enemies and reach till the end
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.