A linear-time algorithm for the center problem in weighted cycle graphs
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 t...
Gespeichert in:
Veröffentlicht in: | Information processing letters 2024-08, Vol.186, p.106495, Article 106495 |
---|---|
Hauptverfasser: | , |
Format: | Artikel |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | 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(nlogn) 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(nlogn) 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. |
---|---|
ISSN: | 0020-0190 1872-6119 |
DOI: | 10.1016/j.ipl.2024.106495 |