Let $T$ be a tree with $n$ vertices. Vertices of $T$ are colored in white and black such that the number of black vertices is always less than white ones and white and black vertices are not adjacent. Prove that the white vertices can be numbered with { 1 , 0 , -1 } such that the sum of numbers of the adjacent white vertices to every black vertex is zero considering that we have at least one none-zero vertex.
It's easy to prove that there is at least one white leaf. And also if there is a black vertex connected to more that one white leaf then those leafs can be numbered in the way described in the question and the rest of the white vertices can be zero. But I don't know how to prove this for trees that are not like that.
Suppose there is a black leaf. Then its white neighbor must be colored $0$. We can delete the black leaf and its white neighbor, leaving one or more tree components. At least one of those components has more white vertices than black vertices, and we can solve the problem there (and label everything $0$ in the other components). We can keep reducing the problem to a smaller problem until we get down to a subproblem with no black leaves at all.
In a tree with no black leaves, we can just find a labeling greedily. For concreteness, give the tree a root, which will be some white vertex. Each other vertex will have a parent closer to the root, and possibly some children. There are no black leaves, so each black vertex has at least one child.
Label the root $+1$. Then, for each black vertex whose parent has a $\pm 1$ label, give one of its children a $\mp 1$ label to cancel it, and give any other children it has a $0$ label. Repeat until there are no unlabeled vertices.