This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: COT 5405 Summer 2009 HW3 For the Dynamic Programming problems, you need to provide (a) a descrip- tion of the function being provided, (b) its recursive definition, (c) its base case, and (d) Complexity. If you are using memoization, provide the table construc- tion. 1. XYZ Ltd. decides to take all its employees to a picnic. It is decided that they play a game of Ivri. This game needs two teams of equal numbers. XYZ has N employees organized like a tree structure. Each employee (except CEO, who is at root) has an immediate superior (a parent node). Each employee has a preference value P i with which he wishes to play against his immediate superior. An employees preference value to play against anybody else is zero. The task is to divide the N employees into two groups, while maximizing the total preference values. When an employee (with preference value P i ) and his/her immediate superior are selected into opposite teams, the total preference value is increased by P i . Give a dynamic programming algorithm for this problem. Give the run- ning time and pseudocode. Make assumptions as required while calculat- ing the running time. Please list your assumptions along with the analysis....
View Full Document