As the title goes, a polynomial time algorithm for finding the chromatic sum of a tree is required.
NOTE:
Finding the chromatic sum of a graph is also called the sum coloring problem - The sum coloring problem asks to find a vertex coloring of a given graph G, using natural numbers, such that the total sum of the colors is minimized.
An efficient linear-time algorithm for trees is given in:
Kubicka, Ewa, and Allen J. Schwenk. "An introduction to chromatic sums." Proceedings of the 17th conference on ACM Annual Computer Science Conference. ACM, 1989.
Look at the last 2 pages.