文摘
The Wiener index of a connected graph \(G\) is the sum of distances between all unordered pairs of vertices in the graph. The hyper-Wiener index is defined as \(WW(G)= \frac{1}{2}\sum \nolimits _{\{u,v\} \subseteq V(G)}( d(u,v)+d^2 (u,v))\) , where \(d(u,v)\) is the number of edges on a shortest path connecting vertices \(u\) and \(v\) . A cactus graph is a connected graph in which each block is either an edge or a cycle. In the paper, we characterize the extremal cacti having the largest Wiener and hyper-Wiener indexes among all cacti with \(n\) vertices and \(r\) cycles.