Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Fitting a Step Function to a Point Set

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

We consider the problem of fitting a step function to a set of points. More precisely, given an integer k and a set P of n points in the plane, our goal is to find a step function f with k steps that minimizes the maximum vertical distance between f and all the points in P. We first give an optimal Θ(nlog n) algorithm for the general case. In the special case where the points in P are given in sorted order according to their x-coordinates, we give an optimal Θ(n) time algorithm. Then, we show how to solve the weighted version of this problem in time O(nlog 4 n). Finally, we give an O(nh 2log n) algorithm for the case where h outliers are allowed. The running time of all our algorithms is independent of k.

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

Access this article

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

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

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Agarwal, P., Har-Peled, S., Yu, H.: Robust shape fitting via peeling and grating coresets. In: Proceedings of the 17th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 182–191 (2006)

  2. Agarwal, P., Sharir, M.: Efficient algorithms for geometric optimization. Comput. Surv. 30 (1998)

  3. Aggarwal, A., Schieber, B., Tokuyama, T.: Finding a minimum-weight k-link path in graphs with the concave Monge property and applications. Discrete Comput. Geom. 12, 263–280 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  4. Atanassov, R., Bose, P., Couture, M., Maheshwari, A., Morin, P., Paquette, M., Smid, M., Wuhrer, S.: Algorithms for optimal outlier removal. J. Discrete Algorithms 2(7), 239–248 (2009)

    Article  MathSciNet  Google Scholar 

  5. Ben-Or, M.: Lower bounds for algebraic computation trees. In: Proceedings of the 15th Annual ACM Symposium on Theory of Computing, pp. 80–86 (1983)

  6. Bender, M., Farach-Colton, M.: The LCA problem revisited. In: Proceedings of the LATIN 2000: Theoretical Informatics, 4th Latin American Symposium, pp. 88–94 (2000)

  7. Buragohain, C., Shrivastava, N., Suri, S.: Space efficient streaming algorithms for the maximum error histogram. In: Proceedings of the 23rd International Conference on Data Engineering, pp. 1026–1035 (2007)

  8. Bürgisser, P., Clausen, M., Shokrollahi, M.: Algebraic Complexity Theory. Springer, Berlin (1997)

    MATH  Google Scholar 

  9. Frederickson, G.: Optimal algorithms for tree partitioning. In: Proceedings of the 2nd Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 168–177 (1991)

  10. Frederickson, G., Johnson, D.: Generalized selection and ranking: Sorted matrices. SIAM J. Comput. 13(1), 14–30 (1984)

    Article  MathSciNet  MATH  Google Scholar 

  11. Gabow, H., Bentley, J., Tarjan, R.: Scaling and related techniques for geometry problems. In: Proceedings of the 16th Annual ACM Symposium on Theory of Computing, pp. 135–143 (1984)

  12. Goodrich, M.: Efficient piecewise-linear function approximation using the uniform metric. Discrete Comput. Geom. 14(4), 445–462 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  13. Guha, S., Shim, K.: A note on linear time algorithms for maximum error histograms. IEEE Trans. Knowl. Data Eng. 19(7), 993–997 (2007)

    Article  Google Scholar 

  14. Har-Peled, S., Wang, Y.: Shape fitting with outliers. SIAM J. Comput. 33(2), 269–285 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  15. Harel, D., Tarjan, R.: Fast algorithms for finding nearest common ancestors. SIAM J. Comput. 13(2), 338–355 (1984)

    Article  MathSciNet  MATH  Google Scholar 

  16. Ioannidis, Y., Poosala, V.: Histogram-based solutions to diverse database estimation problems. IEEE Data Eng. Bull. 18(3), 10–18 (1995)

    Google Scholar 

  17. Karras, P., Sacharidis, D., Mamoulis, N.: Exploiting duality in summarization with deterministic guarantees. In: Proceedings of the 13th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 380–389 (2007)

  18. Lopez, M., Mayster, Y.: Weighted rectilinear approximation of points in the plane. In: Proceedings of the LATIN 2008: Theoretical Informatics, 7th Latin American Symposium. Lecture Notes in Computer Science, vol. 4957, pp. 642–653. Springer, Berlin (2008)

    Chapter  Google Scholar 

  19. Mayster, Y., Lopez, M.A.: Approximating a set of points by a step function. J. Vis. Commun. Image Represent. 17(6), 1178–1189 (2006)

    Article  Google Scholar 

  20. Díaz-Báñez, J., Mesa, J.: Fitting rectilinear polygonal curves to a set of points in the plane. Eur. J. Oper. Res. 130(1), 214–222 (2001)

    Article  MATH  Google Scholar 

  21. Wang, D.: A new algorithm for fitting a rectilinear x-monotone curve to a set of points in the plane. Pattern Recognit. Lett. 23(1–3), 329–334 (2002)

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Antoine Vigneron.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Fournier, H., Vigneron, A. Fitting a Step Function to a Point Set. Algorithmica 60, 95–109 (2011). https://doi.org/10.1007/s00453-009-9342-z

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-009-9342-z

Keywords