Suppose we have n people of which we want to pick a subset to form…Suppose we have n people of which we want to pick a subset to form a team. Every person has a non-negative value that they bring to the team, and value of that team is simply the sum of values of those in the subset. However, to complicate things, some people do not get along with some other players, and two people who cannot get along cannot be in the same team. Suppose that conflicts are represented as an undirected graph G whose vertex set is the n people, and an edge ij represents that I and j doesn’t get along. The goal now is to choose a subset of people that maximizes the total value without having any conflicts.a) Why does greedy algorithm doesn’t work in this case? give a counter-example.b) Suppose the graph G is a tree (i.e. connected graph with no cycles). Give an algorithm that finds the optimal subset. This algorithm must run in time polynomial in n. (Hint: recursive formulation given the rooted tree, and use dynamic programming)Engineering & TechnologyComputer ScienceCS 3000
solved : Suppose we have n people of which we want to pick a subset t
How it works
- Paste your instructions in the instructions box. You can also attach an instructions file
- Select the writer category, deadline, education level and review the instructionsÂ
- Make a payment for the order to be assigned to a writer
- Â Download the paper after the writer uploads itÂ
Will the writer plagiarize my essay?
You will get a plagiarism-free paper and you can get an originality report upon request.
Is this service safe?
All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades
LET THE PROFESSIONALS WRITE YOUR PAPER!