Advertisement

FAW 2017: Frontiers in Algorithmics pp 115-126

# Fluctuated Fitting Under the $$\ell _1$$-metric

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10336)

## Abstract

We consider the problem of fitting a given sequence of integers by an $$(\alpha ,\beta )$$-fluctuated one. For a sequence of numbers, those elements which are larger than their direct precursors are called ascends, those elements which are smaller than their direct precursors are called descends. A sequence is said to be $$(\alpha ,\beta )$$-fluctuated if there is a descend between any $$\alpha +1$$ ascends and an ascend between any $$\beta +1$$ descends; or equivalently, if it has at most $$\alpha$$ consecutive ascends and at most $$\beta$$ consecutive descends, when adjacent equal values are ignored.

Given a sequence of integers $$\mathbf {a}=(a_1,\ldots ,a_n)$$ and two parameters $$\alpha ,\beta$$ in [1, n], we compute (1) a sequence $$\mathbf {b}=(b_1,\ldots ,b_n)$$ of integers that is $$(\alpha ,\beta )$$-fluctuated and is closest to $$\mathbf {a}$$ among all such sequences; (2) a sequence $$\mathbf {b}'=(b'_1,\ldots ,b'_n)$$ of integers that is $$(\alpha ,\beta )$$-fluctuated and is bounded by $$\mathbf {a}$$ (i.e. $$b'_i\le a_i$$ for all i) and is closest to $$\mathbf {a}$$ among all such sequences. We measure the distance between sequences under $$\ell _1$$ metric.

Our algorithm runs in $$O((\alpha +\beta )\cdot n)$$ time, which is linear when $$\alpha ,\beta$$ are considered as constants. We also show that a variation of our problem can be solved in the same time complexity. We achieve our result mainly by exploiting and utilizing the property of the closest sequence.

## Keywords

Curve approximation Histogram Fitting

## References

1. 1.
Aronov, B., Asano, T., Katoh, N., Mehlhorn, K., Tokuyama, T.: Polyline fitting of planar points under min-sum criteria. Int. J. Comput. Geom. Appl. 16, 97–116 (2006)
2. 2.
Chen, D.Z., Wang, H.: Approximating points by a piecewise linear function. Algorithmica 66(3), 682–713 (2013)
3. 3.
Chen, D.Z., Healy, M.A., Wang, C., Xu, B.: Geometric algorithms for the constrained 1-D K-means clustering problems and IMRT applications. In: Preparata, F.P., Fang, Q. (eds.) FAW 2007. LNCS, vol. 4613, pp. 1–13. Springer, Heidelberg (2007). doi:
4. 4.
Chen, D., Wang, C., Wang, H.: Representing a functional curve by curves with fewer peaks. Discret. Comput. Geom. 46(2), 334–360 (2011)
5. 5.
Chun, J., Sadakane, K., Tokuyama, T.: Linear time algorithm for approximating a curve by a single-peaked curve. Algorithmica 44(2), 103–115 (2006)
6. 6.
Chun, J., Sadakane, K., Tokuyama, T., Yuki, M.: Peak-reducing fitting of a curve under the $$l_p$$ metric. Interdisc. Inf. Sci. 2, 191–197 (2005)
7. 7.
Cleju, I., Fränti, P., Wu, X.: Clustering based on principal curve. In: Kalviainen, H., Parkkinen, J., Kaarna, A. (eds.) SCIA 2005. LNCS, vol. 3540, pp. 872–881. Springer, Heidelberg (2005). doi:
8. 8.
Douglas, D.H., Peucker, T.K.: Algorithms for the Reduction of the Number of Points Required to Represent a Digitized Line or its Caricature. Wiley, Hoboken (2011). pp. 15–28
9. 9.
Fournier, H., Vigneron, A.: A deterministic algorithm for fitting a step function to a weighted point-set. Inf. Process. Lett. 113(3), 51–54 (2013)
10. 10.
Fournier, H., Vigneron, A.: Fitting a step function to a point set. In: Halperin, D., Mehlhorn, K. (eds.) ESA 2008. LNCS, vol. 5193, pp. 442–453. Springer, Heidelberg (2008). doi:
11. 11.
Goodrich, M.: Efficient piecewise-linear function approximation using the uniform metric. Discret. Comput. Geom. 14(1), 445–462 (1995)
12. 12.
Guha, S., Shim, K.: A note on linear time algorithms for maximum error histograms. Knowl. Data Eng. 19(7), 993–997 (2007)
13. 13.
Guha, S., Koudas, N., Shim, K.: Data-streams and histograms. In: Proceedings of 33rd Symposium on Theory of Computing, STOC 2001, pp. 471–475. ACM (2001)Google Scholar
14. 14.
Haiminen, N., Gionis, A., Laasonen, K.: Algorithms for unimodal segmentation with applications to unimodality detection. Knowl. Inf. Syst. 14(1), 39–57 (2008)
15. 15.
Luebke, D.P.: A developer’s survey of polygonal simplification algorithms. IEEE Comput. Graph. Appl. 21(3), 24–35 (2001)
16. 16.
Ramesh, N., Yoo, J.H., Sethi, I.: Thresholding based on histogram approximation. IEEE Proc. Vis. Image Sig. Process. 142(5), 271–279 (1995)
17. 17.
Stout, Q.F.: Unimodal regression via prefix isotonic regression. Comput. Stat. Data Anal. 53(2), 289–297 (2008)
18. 18.
Stout, Q.F.: Isotonic regression via partitioning. Algorithmica 66(1), 93–112 (2013)
19. 19.
Stout, Q.F.: Isotonic regression for multiple independent variables. Algorithmica 71(2), 450–470 (2015)
20. 20.
Tokuyama, T.: Recent progress on geometric algorithms for approximating functions: toward applications to data analysis. Electron. Commun. Jpn. (Part III: Fundam. Electron. Sci.) 90(3), 1–12 (2007)

## Copyright information

© Springer International Publishing AG 2017

## Authors and Affiliations

1. 1.University of Hong KongPokfulamHong Kong SAR, China