|  | 
|  | 
| back to board | Can anyone help me? I couldn't solove this problem.Thanks Posted by abc  6 Mar 2005 07:55thanks!!!!!!!Re: Can anyone help me? I couldn't solove this problem.Thanks Posted by OneV1  30 Apr 2005 02:59i used Dynamic Programming in DFS.
 a[i] = best only for the subtree with the root in "i" ; "i" is going to the party.
 b[i] = best only for the subtree with the root in "i" ; "i" is not going to the party.
 
 a[i] = v[i] + sum of all b[j], (i is the boss of j)
 b[i] = sum of all MAX(a[j], b[j])  (i is the boss of j)
Re: Can anyone help me? I couldn't solove this problem.Thanks Posted by Hayk  4 Nov 2006 19:14Thank you!You helped me.
 | 
 | 
|