Skip to main content
Log in

Speeding up dynamic programming in the line-constrained k-median

  • Published:
Theory of Computing Systems Aims and scope Submit manuscript

Abstract

In the planar k-median problem we are given a set of demand points and want to open up to k facilities as to minimize the sum of the transportation costs from each demand point to its nearest facility. In the line-constrained version the medians are required to lie on a given line. We present a new dynamic programming formulation for this problem, based on constructing a weighted DAG over a set of median candidates. We prove that, for any convex distance metric and any line, this DAG satisfies the concave Monge property. This allows us to construct efficient algorithms in L and L 1 and any line, while the previously known solution (Wang and Zhang, ISAAC 2014) works only for vertical lines. We also provide an asymptotically optimal \(\mathcal {O}(n)\) solution for the case of k = 1.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

Notes

  1. This is not a metric.

References

  1. Aggarwal, A., Klawe, M. M., Moran, S., Shor, P., Wilber, R.: Geometric applications of a matrix-searching algorithm. Algorithmica 2(1-4), 195–208 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  2. Bajaj, C.: The algebraic degree of geometric optimization problems. Discrete Comput. Geom. 3(1), 177–191 (1988)

    Article  MathSciNet  MATH  Google Scholar 

  3. Bein, W., Golin, M. J., Larmore, L. L., Zhang, Y.: The knuth–Yao quadrangle-inequality speedup is a consequence of total monotonicity. ACM Trans. Algorithms (TALG) 6(1), 17 (2009)

    MathSciNet  MATH  Google Scholar 

  4. Blum, M., Floyd, R. W., Pratt, V. R., Rivest, R. L., Tarjan, R. E.: Time bounds for selection. J. Comput. Syst. Sci. 7(4), 448–461 (1973)

    Article  MathSciNet  MATH  Google Scholar 

  5. Galil, Z., Park, K.: A linear-time algorithm for concave one-dimensional dynamic programming. Inf. Process. Lett. 33(6), 309–311 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  6. Galil, Z., Park, K.: Dynamic programming with convexity, concavity and sparsity. Theor. Comput. Sci. 92(1), 49–76 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  7. Grossi, R., Gupta, A., Vitter, J. S.: High-order entropy-compressed text indexes Proceedings of the Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 841–850. Society for Industrial and Applied Mathematics (2003)

    Google Scholar 

  8. Megiddo, N., Supowit, K. J.: On the complexity of some common geometric location problems. SIAM J. Comput. 13(1), 182–196 (1984)

    Article  MathSciNet  MATH  Google Scholar 

  9. Navarro, G., Russo, L. M.: Space-efficient data-analysis queries on grids Algorithms and Computation, pp. 323–332. Springer (2011)

    Google Scholar 

  10. Schieber, B.: Computing a minimum weight k-link path in graphs with the concave Monge property. Journal of Algorithms 29(2), 204–222 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  11. Wang, H., Zhang, J.: Line-constrained K-median, K-means, and K-center problems in the plane Algorithms and Computation, pp. 3–14. Springer (2014)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Łukasz Zatorski.

Additional information

This article is part of the Topical Collection on Special Issue on Combinatorial Algorithms

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Gawrychowski, P., Zatorski, Ł. Speeding up dynamic programming in the line-constrained k-median. Theory Comput Syst 62, 1351–1365 (2018). https://doi.org/10.1007/s00224-017-9780-y

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00224-017-9780-y

Keywords

Navigation