Feasible node colorings of trees with cardinality constraints
Résumé
Given a tree T with n vertices and three nonnegative integers (n1,n2,n3) such that n1+n2+n3=n, our goal is to find a 3-coloring of T such that each color class i contains ni nodes i=1,2,3. Using a dynamic programming approach we show that this problem can be solved in time O(n5 log n). We also show that our algorithm can be adapted to the case of k-colorings for fixed k.