Skip to main content
Log in

Approximating Points by a Piecewise Linear Function

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

Approximating points by piecewise linear functions is an intensively researched topic in computational geometry. In this paper, we study, based on the uniform error metric, an array of variations of this problem in 2-D and 3-D, including points with weights, approximation with violations, using step functions or more generally piecewise linear functions. We consider both the min-# (i.e., given an error tolerance ϵ, minimizing the size k of the approximating function) and min-ϵ (i.e., given a size k of the approximating function, minimizing the error tolerance ϵ) versions of the problems. Our algorithms either improve on the previously best-known solutions or are the first known results for the respective problems. Our approaches are based on interesting geometric observations and algorithmic techniques. Some data structures we develop are of independent interest and may find other applications.

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
Fig. 9
Fig. 10

Similar content being viewed by others

Notes

  1. A preliminary version of this paper [19] gave an O(nlogn,log3 n) time result, which has been found incorrect.

References

  1. Agarwal, P.K., Suri, S.: Surface approximation and geometric partitions. SIAM J. Comput. 27(4), 1016–1035 (1998)

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  3. Aggarwal, A., Park, J.: Notes on searching in multidimensional monotone arrays. In: Proc. of 29th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pp. 497–512 (1988)

    Google Scholar 

  4. Barequet, G., Chen, D.Z., Daescu, O., Goodrich, M., Snoeyink, J.: Efficiently approximating polygonal paths in three and higher dimensions. Algorithmica 33(2), 150–167 (2002)

    Article  MathSciNet  MATH  Google Scholar 

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

    Google Scholar 

  6. Berman, P., DasGupta, B., Muthukrishnan, S.: Exact size of binary space partitionings and improved rectangle tiling algorithms. SIAM J. Discrete Math. 15(2), 252–267 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  7. Berman, P., DasGupta, B., Muthukrishnan, S.: Approximation algorithms for max-min tiling. J. Algorithms 47(2), 122–134 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  8. Berman, P., DasGupta, B., Muthukrishnan, S.: Slice and dice: A simple, improved approximate tiling recipe. In: Proc. of the 13th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 455–464 (2002)

    Google Scholar 

  9. Berman, P., DasGupta, B., Muthukrishnan, S., Ramaswami, S.: Efficient approximation algorithms for tiling and packing problems with rectangles. J. Algorithms 41(2), 443–470 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  10. Brodal, G., Jacob, R.: Dynamic planar convex hull. In: Proc. of the 43rd IEEE Symposium on Foundations of Computer Science (FOCS), pp. 617–626 (2002)

    Google Scholar 

  11. Chan, T.M.: Fixed-dimensional linear programming queries made easy. In: Proc. of the 12th Annual ACM Symposium on Computational Geometry, pp. 284–290 (1996)

    Google Scholar 

  12. Chan, T.M.: Output-sensitive results on convex hulls and extreme points, and related problems. Discrete Comput. Geom. 16(3), 369–387 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  13. Chan, T.M.: Deterministic algorithms for 2-D convex programming and 3-D online linear programming. J. Algorithms 27, 147–166 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  14. Chan, T.M.: Low-dimensional linear programming with violations. In: Proc. of 43rd IEEE Symposium on Foundations of Computer Science (FOCS), pp. 570–579 (2002)

    Google Scholar 

  15. Chazal, F., Das, S.: An efficient algorithm for fitting rectilinear x-monotone curve to a point set in a plane. Technical report, Indian Statistical Institute (2006). http://math.u-bourgogne.fr/IMB/chazal/lineFitSept06.pdf

  16. Chazelle, B.: An optimal algorithm for intersecting three-dimensional convex polyhedra. SIAM J. Comput. 21(4), 671–696 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  17. Chazelle, B., Guibas, L.: Fractional cascading: I. A data structuring technique. Algorithmica 1(1), 133–162 (1986)

    Article  MathSciNet  MATH  Google Scholar 

  18. Chen, D.Z., Wang, C., Wang, H.: Representing a functional curve by curves with fewer peaks. Discrete Comput. Geom. 46(2), 334–360 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  19. Chen, D.Z., Wang, H.: Approximating points by a piecewise linear function: II. Dealing with outliers. In: Proc. of the 20th International Symposium on Algorithms and Computation (ISAAC), pp. 234–243 (2009)

    Chapter  Google Scholar 

  20. Cole, R.: Slowing down sorting networks to obtain faster sorting algorithms. J. ACM 34(1), 200–208 (1987)

    Article  Google Scholar 

  21. Cormen, T., Leiserson, C., Rivest, R., Stein, C.: Introduction to Algorithms, 2nd edn. MIT Press, Cambridge (2001)

    MATH  Google Scholar 

  22. Díaz-Bánez, 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 

  23. Dobkin, D.P., Kirkpatrick, D.G.: A linear algorithm for determining the separation of convex polyhedra. J. Algorithms 6(3), 381–392 (1985)

    Article  MathSciNet  MATH  Google Scholar 

  24. Driscoll, J., Sarnak, N., Sleator, D., Tarjan, R.E.: Making data structures persistent. J. Comput. Syst. Sci. 38(1), 86–124 (1989)

    Article  MathSciNet  MATH  Google Scholar 

  25. Dyer, M.: Linear time algorithms for two- and three-variable linear programs. SIAM J. Comput. 13(1), 31–45 (1984)

    Article  MathSciNet  MATH  Google Scholar 

  26. Eppstein, D.: Dynamic three-dimensional linear programming. In: Proc. of the 32nd Symposium on Foundations of Computer Science, pp. 488–494 (1991)

    Google Scholar 

  27. Fournier, H., Vigneron, A.: Fitting a step function to a point set. In: Proc. of the 16th Annual European Symposium on Algorithms (ESA), pp. 442–453 (2008)

    Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

  31. Goodrich, M.: Efficient piecewise-linear function approximation using the uniform metric. In: Proc. of the 10th Annual ACM Symposium on Computational Geometry, pp. 322–331 (1994)

    Chapter  Google Scholar 

  32. Guha, S.: On the space–time of optimal, approximate and streaming algorithms for synopsis construction problems. VLDB J. 17(6), 1509–1535 (2008)

    Article  MathSciNet  Google Scholar 

  33. 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 

  34. Guha, S., Shim, K., Woo, J.: Rehist: relative error histogram construction algorithms. In: Proc. of the 30th International Conference on Very Large Data Bases (VLDB), pp. 300–311 (2004)

    Google Scholar 

  35. Guibas, L., Hershberger, J., Snoeyink, J.: Compact interval trees: A data structure for convex hulls. Int. J. Comput. Geom. Appl. 1(1), 1–22 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  36. Hakimi, S., Schmeichel, E.: Fitting polygonal functions to a set of points in the plane. In: CVGIP: Graphical Models and Image Processing, vol. 53, pp. 132–136 (1991)

    Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  38. Jagadish, H.V., Koudas, N., Muthukrishnan, S., Poosala, V., Sevcik, K.C., Suel, T.: Optimal histograms with quality guarantees. In: Proc. of the 24th International Conference on Very Large Data Bases (VLDB), pp. 275–286 (1998)

    Google Scholar 

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

    Google Scholar 

  40. Khanna, S., Muthukrishnan, S., Paterson, M.: On approximating rectangle tiling and packing. In: Proc. of the 9th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 384–393 (1998)

    Google Scholar 

  41. Kirkpatrick, D.: Optimal search in planar subdivisions. SIAM J. Comput. 12(1), 28–35 (1983)

    Article  MathSciNet  MATH  Google Scholar 

  42. Lichtenstein, D.: Planar formulae and their uses. SIAM J. Comput. 11, 329–343 (1982)

    Article  MathSciNet  MATH  Google Scholar 

  43. Matoušek, J.: On geometric optimization with few violated constraints. Discrete Comput. Geom. 14(1), 365–384 (1995)

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  Google Scholar 

  45. Megiddo, N.: Combinatorial optimization with rational objective functions. Math. Oper. Res. 4, 414–424 (1979)

    Article  MathSciNet  MATH  Google Scholar 

  46. Megiddo, N.: Applying parallel computation algorithms in the design of serial algorithms. J. ACM 30(4), 852–865 (1983)

    Article  MathSciNet  MATH  Google Scholar 

  47. Megiddo, N.: Linear programming in linear time when the dimension is fixed. J. ACM 31(1), 114–127 (1984)

    Article  MathSciNet  MATH  Google Scholar 

  48. Miller, G.L., Peng, R., Schwartz, R., Tsourakakis, C.E.: Approximate dynamic programming using halfspace queries and multiscale Monge decomposition. In: Proc. of the 22nd Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1675–1682 (2011)

    Google Scholar 

  49. Mitchell, J.S.B., Suri, S.: Separation and approximation of polyhedral objects. Comput. Geom. Theory Appl. 5, 95–114 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  50. Muller, D., Preparata, F.P.: Finding the intersection of two convex polyhedra. Theor. Comput. Sci. 7, 217–236 (1978)

    Article  MathSciNet  MATH  Google Scholar 

  51. Muthukrishnan, S., Poosala, V., Suel, T.: On rectangular partitionings in two dimensions: algorithms complexity, and applications. In: Proc. of the 7th International Conference on Database Theory (ICDT), pp. 236–256 (1999)

    Google Scholar 

  52. O’Rourke, J.: An on-line algorithm for fitting straight lines between data ranges. Commun. ACM 24, 574–578 (1981)

    Article  MATH  Google Scholar 

  53. Overmars, M., van Leeuwen, J.: Maintenance of configurations in the plane. J. Comput. Syst. Sci. 23(2), 166–204 (1981)

    Article  MATH  Google Scholar 

  54. Roos, T., Widmayer, P.: k-violation linear programming. Inf. Process. Lett. 52(2), 109–114 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  55. Schieber, B., Vishkin, U.: On finding lowest common ancestors: simplification and parallelization. SIAM J. Comput. 17, 1253–1262 (1988)

    Article  MathSciNet  MATH  Google Scholar 

  56. Smith, A., Suri, S.: Rectangular tiling in multi-dimensional arrays. In: Proc. of the 10th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 786–794 (1999)

    Google Scholar 

  57. Varadarajan, K.: Approximating monotone polygonal curves using the uniform metric. In: Proc. of the 12th Annual ACM Symposium on Computational Geometry, pp. 311–318 (1996)

    Google Scholar 

  58. 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), 329–334 (2002)

    Article  MATH  Google Scholar 

  59. Wang, D., Huang, N., Chao, H., Lee, R.: Plane sweep algorithms for the polynomial approximation problems with applications. In: Proc. of the 4th International Symposium on Algorithms and Computation (ISAAC), pp. 515–522 (1993)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Haitao Wang.

Additional information

This research was supported in part by NSF under Grants CCF-0515203 and CCF-0916606.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Chen, D.Z., Wang, H. Approximating Points by a Piecewise Linear Function. Algorithmica 66, 682–713 (2013). https://doi.org/10.1007/s00453-012-9658-y

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-012-9658-y

Keywords

Navigation