DP, tree