title: Dynamic Programming Optimal Solution
body: <p>A company is planning a party for its employees. A fun rating is assigned to every employee.
  The employees are organized into a strict hierarchy, i.e. a tree rooted the president. There is one
  restriction, though, on the guest list to the party: an employee and his/her immediate supervisor
  (parent in the tree) cannot both attend the party. You wish to prepare a guest list for the party that
  maximizes the sum of fun ratings of the guests. Show that greedily choosing guests according to fun
  rating, will not work. Then, formulate a dynamic programming solution</p>
  
  <p>I could not understand some of the conditions like is the fun rate of the president higher than that of his descendants and how many employees are there for each of his supervisor. Can someone help me in proceeding with this ?</p>