The Wiener polarity index of a graph is the number of unordered pairs of vertices such that the distance between and is three, which was introduced by Harold Wiener in 1947. A linear time algorithm for computing the Wiener polarity index of trees was described, and also an algorithm which computes the index for any given connected graph on vertices in time was presented, where denotes the time necessary to multiply two matrices of small integers (which is currently known to be ). In this paper, we establish one polynomial algorithm to calculate the value of the Wiener polarity index of a bipartite graph.
Keywords: algorithm; Wiener polarity index; bipartite graph.