Abstract
We investigate testing of properties of 2-dimensional figures that consist of a black object on a white background. Given a parameter \({\epsilon }\in (0,1/2)\), a tester for a specified property has to accept with probability at least 2/3 if the input figure satisfies the property and reject with probability at least 2/3 if it is \({\epsilon }\)-far from satisfying the property. In general, property testers can query the color of any point in the input figure. We study the power of testers that get access only to uniform samples from the input figure. We show that for the property of being a half-plane, the uniform testers are as powerful as general testers: they require only \(O({\epsilon }^{-1})\) samples. In contrast, we prove that convexity can be tested with \(O({\epsilon }^{-1})\) queries by testers that can make queries of their choice while uniform testers for this property require \(\varOmega ({\epsilon }^{-5/4})\) samples. Previously, the fastest known tester for convexity needed \(\varTheta ({\epsilon }^{-4/3})\) queries.











Similar content being viewed by others
Notes
If \(\delta \) is not specified, it is assumed to be 1/3. By standard arguments, the error probability can be reduced from 1/3 to an arbitrarily small \(\delta \) by running the tester \(O(\log 1/\delta )\) times.
For any nontrivial property, including being a half-plane, \(\varOmega ({\epsilon }^{-1})\) is an easy lower bound on the complexity of an \({\epsilon }\)-tester.
For the two properties we consider (being a half-plane and convexity), we assume w.l.o.g. that the input figure U has unit area. If it is not the case, U can be rescaled. Thus, the area of a region corresponds to the probability of sampling from it under the uniform distribution.
References
Alon, N., Fischer, E., Newman, I., Shapira, A.: A combinatorial characterization of the testable graph properties: It’s all about regularity. SIAM J. Comput. 39(1), 143–167 (2009)
Andrew, A.M.: Another efficient algorithm for convex hulls in two dimensions. Inf. Process. Lett. 9(5), 216–219 (1979)
Baleshzar, R., Chakrabarty, D., Pallavoor, R.K.S., Raskhodnikova, S., Seshadhri, C.: Optimal unateness testers for real-valued functions: adaptivity helps. In: Chatzigiannakis, I., Indyk, P., Kuhn, F., Muscholl, A. (eds.) 44th International Colloquium on Automata, Languages, and Programming, ICALP 2017, July 10–14, 2017, Warsaw, Poland, Schloss Dagstuhl—Leibniz-Zentrum fuer Informatik, LIPIcs, vol. 80, pp 5:1–5:14 (2017)
Batu, T., Dasgupta, S., Kumar, R., Rubinfeld, R.: The complexity of approximating the entropy. In: Proceedings of the Thirty-Fourth Annual ACM Symposium on Theory of Computing, pp. 678–687 (2002)
Batu, T., Ergün, F., Kilian, J., Magen, A., Raskhodnikova, S., Rubinfeld, R., Sami, R.: A sublinear algorithm for weakly approximating edit distance. In: Larmore, L.L., Goemans, M.X. (eds) Proceedings of the 35th Annual ACM Symposium on Theory of Computing, June 9–11, 2003, San Diego, CA, USA, ACM, pp. 316–324 (2003)
Batu, T., Fortnow, L., Rubinfeld, R., Smith, W.D., White, P.: Testing closeness of discrete distributions. J. ACM 60(1), 4 (2013)
Ben-Sasson, E., Harsha, P., Raskhodnikova, S.: Some 3CNF properties are hard to test. SIAM J. Comput. 35(1), 1–21 (2005)
Berman, P., Raskhodnikova, S., Yaroslavtsev, G.: \(L_p\)-testing. In: Symposium on Theory of Computing, STOC 2014, New York, NY, USA, May 31–June 03, 2014, pp. 164–173 (2014)
Berman, P., Murzabulatov, M., Raskhodnikova, S.: Testing convexity of figures under the uniform distribution. In: 32nd International Symposium on Computational Geometry, SoCG 2016, June 14–18, 2016, Boston, MA, USA, pp. 17:1–17:15 (2016)
Berman, P., Murzabulatov, M., Raskhodnikova, S.: The power and limitations of uniform samples in testing properties of figures. In: Lal, A., Akshay, S., Saurabh, S., Sen, S. (eds.) 36th IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS 2016), Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, Leibniz International Proceedings in Informatics (LIPIcs), vol. 65, pp. 45:1–45:14 (2016)
Berman, P., Murzabulatov, M., Raskhodnikova, S.: Tolerant testers of image properties. In: 43rd International Colloquium on Automata, Languages, and Programming, ICALP 2016, July 11–15, 2016, Rome, Italy, pp. 90:1–90:14 (2016)
Blum, M., Luby, M., Rubinfeld, R.: Self-testing/correcting with applications to numerical problems. J. Comput. Syst. Sci. 47(3), 549–595 (1993)
Canonne, C.: A survey on distribution testing: Your data is big. But is it blue? Electron. Colloq. Comput. Complex. (ECCC) 22, 63 (2015)
Czumaj, A., Sohler, C.: Property testing with geometric queries. In: Algorithms—ESA 2001, 9th Annual European Symposium, Aarhus, Denmark, August 28–31, 2001, Proceedings, pp. 266–277 (2001)
Czumaj, A., Sohler, C., Ziegler, M.: Property testing in computational geometry. In: Algorithms—ESA 2000, 8th Annual European Symposium, Saarbrücken, Germany, September 5–8, 2000, Proceedings, pp. 155–166 (2000)
Dodis, Y., Goldreich, O., Lehman, E., Raskhodnikova, S., Ron, D., Samorodnitsky, A.: Improved testing algorithms for monotonicity. In: Randomization, Approximation, and Combinatorial Algorithms and Techniques, Third International Workshop on Randomization and Approximation Techniques in Computer Science, RANDOM’99, Berkeley, CA, USA, pp. 97–108 (1999)
Edelsbrunner, H.: Algorithms in Combinatorial Geometry, EATCS Monographs on Theoretical Computer Science, vol. 10. Springer, Berlin (1987)
Ergün, F., Kannan, S., Kumar, R., Rubinfeld, R., Viswanathan, M.: Spot-checkers. J Comput. Syst. Sci. 60(3), 717–751 (2000)
Fischer, E., Lehman, E., Newman, I., Raskhodnikova, S., Rubinfeld, R., Samorodnitsky, A.: Monotonicity testing over general poset domains. In: Reif, J.H. (ed) Proceedings on 34th Annual ACM Symposium on Theory of Computing, May 19–21, 2002, Montréal, Québec, Canada, pp. 474–483. ACM (2002)
Fischer, E., Lachish, O., Vasudev, Y.: Trading query complexity for sample-based testing and multi-testing scalability. In: Guruswami, V. (ed.) IEEE 56th Annual Symposium on Foundations of Computer Science, FOCS 2015, Berkeley, CA, USA, 17–20 October, 2015, pp. 1163–1182. IEEE Computer Society (2015)
Goldreich, O.: Combinatorial property testing (a survey). Randomization Methods Algorithm Des. 43, 45–59 (1999)
Goldreich, O.: Property Testing: Current Research and Surveys, vol. 6390. Springer, Berlin (2010)
Goldreich, O.: Introduction to Property Testing. Cambridge University Press, Cambridge (2017)
Goldreich, O., Ron, D.: Property testing in bounded degree graphs. Algorithmica 32(2), 302–343 (2002)
Goldreich, O., Ron, D.: On sample-based testers. In: Proceedings of the 2015 Conference on Innovations in Theoretical Computer Science, ITCS 2015, Rehovot, Israel, January 11–13, 2015, pp. 337–345 (2015)
Goldreich, O., Goldwasser, S., Ron, D.: Property testing and its connection to learning and approximation. J. ACM 45(4), 653–750 (1998)
Goldreich, O., Goldwasser, S., Lehman, E., Ron, D., Samorodnitsky, A.: Testing monotonicity. Combinatorica 20(3), 301–337 (2000)
Jha, M., Raskhodnikova, S.: Testing and reconstruction of lipschitz functions with applications to data privacy. SIAM J. Comput. 42(2), 700–731 (2013)
Kleiner, I., Keren, D., Newman, I., Ben-Zwi, O.: Applying property testing to an image partitioning problem. IEEE Trans. Pattern Anal. Mach. Intell. 33(2), 256–265 (2011)
Korman, S., Reichman, D., Tsur, G.: Tight approximation of image matching. CoRR (2011). arXiv:1111.1713
Korman, S., Reichman, D., Tsur, G., Avidan, S.: Fast-match: Fast affine template matching. In: 2013 IEEE Conference on Computer Vision and Pattern Recognition, Portland, OR, USA, June 23–28, 2013, pp. 2331–2338 (2013)
Lachish, O., Newman, I.: Testing periodicity. Algorithmica 60(2), 401–420 (2011)
Megiddo, N.: Partitioning with two lines in the plane. J. Algorithms 6(3), 430–433 (1985)
Newman, I., Rabinovich, Y., Rajendraprasad, D., Sohler, C.: Testing for forbidden order patterns in an array. In: Klein, P.N. (ed) Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, Barcelona, Spain, Hotel Porta Fira, January 16–19, pp. 1582–1597. SIAM (2017)
Pallavoor, R.K.S., Raskhodnikova, S., Varma, N.M.: Parameterized property testing of functions. TOCT 9(4), 17:1–17:19 (2018)
Rademacher, L., Vempala, S.: Testing geometric convexity. In: FSTTCS, pp. 469–480 (2004)
Raskhodnikova, S.: Approximate testing of visual properties. In: RANDOM-APPROX, pp. 370–381 (2003)
Raskhodnikova, S.: Testing if an array is sorted. In: Encyclopedia of Algorithms, pp. 2219–2222 (2016)
Raskhodnikova, S., Rubinfeld, R.: Linearity testing/testing hadamard codes. In: Encyclopedia of Algorithms, pp. 1107–1110 (2016)
Raskhodnikova, S., Smith, A.D.: A note on adaptivity in testing properties of bounded degree graphs. In: Electronic Colloquium on Computational Complexity (ECCC) 13(089) (2006). http://eccc.hpi-web.de/eccc-reports/2006/TR06-089/index.html
Raskhodnikova, S., Ron, D., Shpilka, A., Smith, A.: Strong lower bounds for approximating distribution support size and the distinct elements problem. SIAM. J. Comput. 39(3), 813–842 (2009)
Ron, D.: Algorithmic and analysis techniques in property testing. Found. Trends Theor. Comput. Sci. 5(2), 73–205 (2010)
Ron, D., Tsur, G.: Testing properties of sparse images. ACM Trans. Algorithms 10(4), 17:1–17:52 (2014)
Rubinfeld, R.: Taming big probability distributions. ACM Crossroads 19(1), 24–28 (2012)
Rubinfeld, R., Sudan, M.: Robust characterizations of polynomials with applications to program testing. SIAM J. Comput. 25(2), 252–271 (1996)
Schmeltz, B.: Learning convex sets under uniform distribution. In: Data Structures and Efficient Algorithms, Final Report on the DFG Special Joint Initiative, pp. 204–213 (1992)
Szpankowski, W.: Average Case Analysis of Algorithms on Sequences. Wiley, New York (2001)
Tukey, J.W.: Mathematics and the picturing of data. In: Proceedings of the international congress of mathematicians, vol. 2, pp. 523–531 (1975)
Valiant, P.: Testing symmetric properties of distributions. SIAM J. Comput. 40(6), 1927–1968 (2011)
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
A preliminary version of this paper appeared in the proceedings of the 36th IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, FSTTCS, 2016 [10].
M. Murzabulatov and S. Raskhodnikova were supported by NSF award CCF-1422975.
Rights and permissions
About this article
Cite this article
Berman, P., Murzabulatov, M. & Raskhodnikova, S. The Power and Limitations of Uniform Samples in Testing Properties of Figures. Algorithmica 81, 1247–1266 (2019). https://doi.org/10.1007/s00453-018-0467-9
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-018-0467-9