  Let $G$ be a directed graph associated with a weight $w: E(G) \rightarrow
R^+$. For an edge-cut $Q$ of $G$, the average weight of $Q$ is denoted and
defined as $w_{ave}(Q)=\frac{\sum_{e\in Q}w(e)}{|Q|}$. An edge-cut of optimal
average weight is an edge-cut $Q$ such that $w_{ave}(Q)$ is maximum among all
edge-cuts (or minimum, symmetrically). In this paper, a polynomial algorithm
for this problem is proved for finding such an optimal edge-cut in a rooted
tree, separating the root and the set of all leafs. This algorithm enables us
to develop an automatic clustering method with more accurate detection of
communities embedded in a hierarchy tree structure.
