Suppose we want to throw a party for a company whose organization chart is a binary tree. Each employee has an associated fun value, and we want the set of invited employees to have the maximum total fun, which is the sum of the fun values of the invited employees. However, no one has fun if some employee and that employee's direct superior are both invited, so we never invite two employees who are directly connected in the organization chart. (The less whimsical name for this problem is the maximum weight independent set in a tree.)
I was trying to think of an analogous statement if the problem were a graph rather than a tree. Might we say that now we want to throw the largest possible party with ex-girlfriends/ex-boyfriends such that no one's ex-partner is invited?
In this case an edge between two members denotes a ex-relationship. We want to find the largest set such that no two members share an edge.
Is this a correct interpretation of the graph problem and is there a known polynomial time algorithm?