,
Chao Xu
Creative Commons Attribution 4.0 International license
Given n piecewise-linear unimodal functions f_1,… ,f_n:ℝ → ℝ and an integer 1 ≤ k ≤ n, the Unimodal-Cost k-Median problem asks for k real numbers y_1,… ,y_k minimizing ∑_{i=1}^n min_{1 ≤ r ≤ k} f_i(y_r). Let m be the number of breakpoints: the total number of affine-piece endpoint occurrences plus one occurrence at a chosen minimizer of each function. We give an exact algorithm running in O((m+nlog n)log m ⋅ min{k, log m√{klog m}, log m⋅ 2^O(√{log k log log m})}) . The first term inside the minimum comes from a direct k-stage dynamic program. The other two use the minimum-weight k-link path algorithms of Aggarwal et al. [Aggarwal et al., 1994] and Schieber [Schieber, 1998] for Monge costs, replacing their O(1) edge-weight access by batched access to the implicit transition costs.
@InProceedings{chen_et_al:LIPIcs.ESA.2026.79,
author = {Chen, Yike and Xu, Chao},
title = {{Unimodal-Cost k-Median on a Line}},
booktitle = {34th Annual European Symposium on Algorithms (ESA 2026)},
pages = {79:1--79:15},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-445-1},
ISSN = {1868-8969},
year = {2026},
volume = {388},
editor = {Bille, Philip and Pettie, Seth and Storandt, Sabine},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ESA.2026.79},
URN = {urn:nbn:de:0030-drops-272153},
doi = {10.4230/LIPIcs.ESA.2026.79},
annote = {Keywords: unimodal-cost k-median, Monge, k-link path, dynamic programming, total monotonicity}
}