A linear-time algorithm for the center problem in weighted cycle graphs - Eom, Taekang; Ahn, Hee-Kap (Information processing letters, 2024)
We study the problem of computing the center of cycle graphs whose vertices are weighted. The distance from a vertex to a point of the graph is defined as the weight of the vertex times the length of the shortest path between the vertex and the point. The weighted center of the graph is a point of the graph such that the maximum distance of the vertices of the graph to the point is minimum among all points of the graph. We present an O(n)-time algorithm for the discrete and continuous weighted center problem on cycle graphs with n vertices. Our algorithm improves upon the best known algorithm that takes O(nlog⁡n) time. Moreover, it is optimal for the weighted center problem of cycle graphs. •We give an O(n)-time algorithm for the discrete and continuous weighted center problem on cycle graphs with n vertices. Our algorithm improves upon the best known algorithm by Rayco et al. that takes O(nlog⁡n) time.•For a cycle graph with n vertices embedded in a unit circle S, we define the dominating interval of a vertex v with respect to a subset W of vertices as the set of points in S whose farthest vertex is v among the vertices in W.•Then we show that the weighted center can be computed using the active vertices in V and their dominating intervals.•The main algorithmic contribution lies in computing the sequence of active vertices in V in O(n) time. Compared to the previous algorithm, our algorithm is simple, straightforward to implement, and robust.