On the Hardness of Computing an Average Curve

Authors Kevin Buchin , Anne Driemel, Martijn Struijs

Thumbnail PDF


  • Filesize: 0.88 MB
  • 19 pages

Document Identifiers

Author Details

Kevin Buchin
  • Department of Mathematics and Computing Science, TU Eindhoven, The Netherlands
Anne Driemel
  • University of Bonn, Hausdorff Center for Mathematics, Bonn, Germany
Martijn Struijs
  • Department of Mathematics and Computing Science, TU Eindhoven, The Netherlands

Cite AsGet BibTex

Kevin Buchin, Anne Driemel, and Martijn Struijs. On the Hardness of Computing an Average Curve. In 17th Scandinavian Symposium and Workshops on Algorithm Theory (SWAT 2020). Leibniz International Proceedings in Informatics (LIPIcs), Volume 162, pp. 19:1-19:19, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2020)


We study the complexity of clustering curves under k-median and k-center objectives in the metric space of the Fréchet distance and related distance measures. Building upon recent hardness results for the minimum-enclosing-ball problem under the Fréchet distance, we show that also the 1-median problem is NP-hard. Furthermore, we show that the 1-median problem is W[1]-hard with the number of curves as parameter. We show this under the discrete and continuous Fréchet and Dynamic Time Warping (DTW) distance. This yields an independent proof of an earlier result by Bulteau et al. from 2018 for a variant of DTW that uses squared distances, where the new proof is both simpler and more general. On the positive side, we give approximation algorithms for problem variants where the center curve may have complexity at most 𝓁 under the discrete Fréchet distance. In particular, for fixed k, 𝓁 and ε, we give (1+ε)-approximation algorithms for the (k,𝓁)-median and (k,𝓁)-center objectives and a polynomial-time exact algorithm for the (k,𝓁)-center objective.

Subject Classification

ACM Subject Classification
  • Theory of computation → Computational geometry
  • Theory of computation → Problems, reductions and completeness
  • Curves
  • Clustering
  • Algorithms
  • Hardness
  • Approximation


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Helmut Alt and Michael Godau. Computing the Fréchet distance between two polygonal curves. International Journal of Computational Geometry & Applications, 5:75-91, 1995. Google Scholar
  2. Vijay Arya, Naveen Garg, Rohit Khandekar, Adam Meyerson, Kamesh Munagala, and Vinayaka Pandit. Local search heuristics for k-median and facility location problems. SIAM Journal of Computing, 33(3):544-562, 2004. URL: https://doi.org/10.1137/S0097539702416402.
  3. Sergey Bereg, Minghui Jiang, Wencheng Wang, Boting Yang, and Binhai Zhu. Simplifying 3D polygonal chains under the discrete Fréchet distance. In Proc. 8th Latin American Conference on Theoretical Informatics, pages 630-641, 2008. Google Scholar
  4. Markus Brill, Till Fluschnik, Vincent Froese, Brijnesh Jain, Rolf Niedermeier, and David Schultz. Exact mean computation in dynamic time warping spaces. Data Mining and Knowledge Discovery, 33(1):252-291, 2019. URL: https://doi.org/10.1007/s10618-018-0604-8.
  5. Kevin Buchin, Anne Driemel, Joachim Gudmundsson, Michael Horton, Irina Kostitsyna, and Maarten Löffler. Approximating (k,𝓁)-center clustering for curves. CoRR, abs/1805.01547, 2018. URL: http://arxiv.org/abs/1805.01547.
  6. Kevin Buchin, Anne Driemel, Joachim Gudmundsson, Michael Horton, Irina Kostitsyna, Maarten Löffler, and Martijn Struijs. Approximating (k, 𝓁)-center clustering for curves. In Proc. 30th ACM-SIAM Symposium on Discrete Algorithms, pages 2922-2938, 2019. Google Scholar
  7. Kevin Buchin, Anne Driemel, Natasja van de L'Isle, and André Nusser. klcluster: Center-based clustering of trajectories. In Proc of the 27th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, pages 496-499, 2019. Google Scholar
  8. Laurent Bulteau, Vincent Froese, and Rolf Niedermeier. Tight hardness results for consensus problems on circular strings and time series. arXiv preprint arXiv:1804.02854, 2018. URL: http://arxiv.org/abs/1804.02854.
  9. Bernard Marie Chazelle and Der-Tsai Lee. On a circle placement problem. Computing, 36(1-2):1-16, 1986. Google Scholar
  10. Ke Chen. On coresets for k-median and k-means clustering in metric and euclidean spaces and their applications. SIAM J. Comput., 39(3):923-947, 2009. Google Scholar
  11. Marek Cygan, Fedor V. Fomin, Lukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michal Pilipczuk, and Saket Saurabh. Parameterized Algorithms. Springer, 2015. URL: https://doi.org/10.1007/978-3-319-21275-3.
  12. Anne Driemel, Amer Krivošija, and Christian Sohler. Clustering time series under the Fréchet distance. In Proc. 27th ACM-SIAM Symposium on Discrete Algorithms, pages 766-785, 2016. Google Scholar
  13. Thomas Eiter and Heikki Mannila. Computing discrete Fréchet distance. Technical Report CD-TR 94/64, Christian Doppler Laboratory for Expert Systems, TU Vienna, Austria, 1994. Google Scholar
  14. Tomás Feder and Daniel Greene. Optimal algorithms for approximate clustering. In Proceedings of the twentieth annual ACM symposium on Theory of computing, pages 434-444, 1988. Google Scholar
  15. Kaspar Fischer, Bernd Gärtner, and Martin Kutz. Fast smallest-enclosing-ball computation in high dimensions. In Proc. 11th Annual European Symposium on Algorithms, pages 630-641, 2003. URL: https://doi.org/10.1007/978-3-540-39658-1_57.
  16. Toni Giorgino. Computing and visualizing dynamic time warping alignments in r: The dtw package. Journal of Statistical Software, Articles, 31(7):1-24, 2009. URL: https://doi.org/10.18637/jss.v031.i07.
  17. Teofilo F. Gonzalez. Clustering to minimize the maximum intercluster distance. Theoretical Computer Science, 38:293-306, 1985. URL: https://doi.org/10.1016/0304-3975(85)90224-5.
  18. Lalit Gupta, Dennis L Molfese, Ravi Tammana, and Panagiotis G Simos. Nonlinear alignment and averaging for estimating the evoked potential. IEEE Transactions on Biomedical Engineering, 43(4):348-356, 1996. Google Scholar
  19. Kamal Jain, Mohammad Mahdian, and Amin Saberi. A new greedy approach for facility location problems. In Proc. 34th ACM Symposium on Theory of Computing, pages 731-740, 2002. URL: https://doi.org/10.1145/509907.510012.
  20. Shi Li and Ola Svensson. Approximating k-median via pseudo-approximation. SIAM Journal of Computing, 45(2):530-547, 2016. URL: https://doi.org/10.1137/130938645.
  21. Nimrod Megiddo. Linear-time algorithms for linear programming in r^3 and related problems. SIAM Journal of Computing, 12(4):759-776, 1983. URL: https://doi.org/10.1137/0212052.
  22. Nimrod Megiddo and Kenneth J. Supowit. On the complexity of some common geometric location problems. SIAM Journal of Computing, 13(1):182-196, 1984. URL: https://doi.org/10.1137/0213014.
  23. François Petitjean and Pierre Gançarski. Summarizing a set of time series by averaging: From Steiner sequence to compact multiple alignment. Theoretical Computer Science, 414(1):76-91, 2012. URL: https://doi.org/10.1016/j.tcs.2011.09.029.
  24. Krzysztof Pietrzak. On the parameterized complexity of the fixed alphabet shortest common supersequence and longest common subsequence problems. Journal of Computer and System Sciences, 67(4):757-771, 2003. Google Scholar
  25. Kari-Jouko Räihä and Esko Ukkonen. The shortest common supersequence problem over binary alphabet is NP-complete. Theoretical Computer Science, 16(2):187-198, 1981. URL: https://doi.org/10.1016/0304-3975(81)90075-X.
  26. Alexis Sardá-Espinosa. Comparing time-series clustering algorithms in R using the dtwclust package. R package vignette, 12:41, 2017. Google Scholar
  27. Alexis Sardá-Espinosa. Time-Series Clustering in R Using the dtwclust Package. The R Journal, 11(1):22-43, 2019. URL: https://doi.org/10.32614/RJ-2019-023.
  28. Nathan Schaar, Vincent Froese, and Rolf Niedermeier. Faster binary mean computation under dynamic time warping, 2020. URL: http://arxiv.org/abs/2002.01178.
  29. Martijn Struijs. Curve clustering: hardness and algorithms. Msc thesis, Eindhoven University of Technology, 2018. URL: https://research.tue.nl/files/125547043/thesis_Martijn_Struijs_IAM_311.pdf.
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail