  Suppose we label the vertices of a tree by positive integers. The weight of
an edge is defined by a monotonically increasing function of the absolute value
of the difference of the labels of its endpoints. We define the total cost of
the labeling to be the sum of weight of all the edges.The problem we consider
is that of determining for a given tree G and given a labeling of the leaves of
G the minimum total cost labellings of G. In this paper we present an algorithm
that works for any cost function satisfies the condition of monotony mentioned
above. In a case of the function defined as the absolute value of the
difference of the labels the fast algorithm is presented.
