On the extremal Wiener polarity index of trees with a given diameter

The Wiener polarity index W(p)(G) of a graph G = (V, E) is the number of unordered pairs of vertices {u, v} of G such that the distance d(G)(u, v) between u and v is 3. In this paper, we characterize the extremal trees with respect to the index among all trees of order n and diameter k.