Skip to main content
Log in

The Power and Limitations of Uniform Samples in Testing Properties of Figures

  • Published:
Algorithmica Aims and scope Submit manuscript

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.

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

Access this article

Subscribe and save

Springer+
from $39.99 /Month
  • Starting from 10 chapters or articles per month
  • Access and download chapters and articles from more than 300k books and 2,500 journals
  • Cancel anytime
View plans

Buy Now

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
Fig. 11

Similar content being viewed by others

Notes

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

  2. For any nontrivial property, including being a half-plane, \(\varOmega ({\epsilon }^{-1})\) is an easy lower bound on the complexity of an \({\epsilon }\)-tester.

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

  1. 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)

    Article  MathSciNet  MATH  Google Scholar 

  2. Andrew, A.M.: Another efficient algorithm for convex hulls in two dimensions. Inf. Process. Lett. 9(5), 216–219 (1979)

    Article  MATH  Google Scholar 

  3. 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)

  4. 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)

  5. 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)

  6. Batu, T., Fortnow, L., Rubinfeld, R., Smith, W.D., White, P.: Testing closeness of discrete distributions. J. ACM 60(1), 4 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  7. Ben-Sasson, E., Harsha, P., Raskhodnikova, S.: Some 3CNF properties are hard to test. SIAM J. Comput. 35(1), 1–21 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  8. 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)

  9. 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)

  10. 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)

  11. 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)

  12. Blum, M., Luby, M., Rubinfeld, R.: Self-testing/correcting with applications to numerical problems. J. Comput. Syst. Sci. 47(3), 549–595 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  13. Canonne, C.: A survey on distribution testing: Your data is big. But is it blue? Electron. Colloq. Comput. Complex. (ECCC) 22, 63 (2015)

    Google Scholar 

  14. 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)

  15. 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)

  16. 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)

  17. Edelsbrunner, H.: Algorithms in Combinatorial Geometry, EATCS Monographs on Theoretical Computer Science, vol. 10. Springer, Berlin (1987)

    Book  Google Scholar 

  18. Ergün, F., Kannan, S., Kumar, R., Rubinfeld, R., Viswanathan, M.: Spot-checkers. J Comput. Syst. Sci. 60(3), 717–751 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  19. 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)

  20. 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)

  21. Goldreich, O.: Combinatorial property testing (a survey). Randomization Methods Algorithm Des. 43, 45–59 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  22. Goldreich, O.: Property Testing: Current Research and Surveys, vol. 6390. Springer, Berlin (2010)

    MATH  Google Scholar 

  23. Goldreich, O.: Introduction to Property Testing. Cambridge University Press, Cambridge (2017)

    Book  MATH  Google Scholar 

  24. Goldreich, O., Ron, D.: Property testing in bounded degree graphs. Algorithmica 32(2), 302–343 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  25. 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)

  26. Goldreich, O., Goldwasser, S., Ron, D.: Property testing and its connection to learning and approximation. J. ACM 45(4), 653–750 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  27. Goldreich, O., Goldwasser, S., Lehman, E., Ron, D., Samorodnitsky, A.: Testing monotonicity. Combinatorica 20(3), 301–337 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  28. Jha, M., Raskhodnikova, S.: Testing and reconstruction of lipschitz functions with applications to data privacy. SIAM J. Comput. 42(2), 700–731 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  29. 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)

    Article  Google Scholar 

  30. Korman, S., Reichman, D., Tsur, G.: Tight approximation of image matching. CoRR (2011). arXiv:1111.1713

  31. 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)

  32. Lachish, O., Newman, I.: Testing periodicity. Algorithmica 60(2), 401–420 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  33. Megiddo, N.: Partitioning with two lines in the plane. J. Algorithms 6(3), 430–433 (1985)

    Article  MathSciNet  MATH  Google Scholar 

  34. 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)

  35. Pallavoor, R.K.S., Raskhodnikova, S., Varma, N.M.: Parameterized property testing of functions. TOCT 9(4), 17:1–17:19 (2018)

    MathSciNet  MATH  Google Scholar 

  36. Rademacher, L., Vempala, S.: Testing geometric convexity. In: FSTTCS, pp. 469–480 (2004)

  37. Raskhodnikova, S.: Approximate testing of visual properties. In: RANDOM-APPROX, pp. 370–381 (2003)

  38. Raskhodnikova, S.: Testing if an array is sorted. In: Encyclopedia of Algorithms, pp. 2219–2222 (2016)

  39. Raskhodnikova, S., Rubinfeld, R.: Linearity testing/testing hadamard codes. In: Encyclopedia of Algorithms, pp. 1107–1110 (2016)

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

  41. 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)

    Article  MathSciNet  MATH  Google Scholar 

  42. Ron, D.: Algorithmic and analysis techniques in property testing. Found. Trends Theor. Comput. Sci. 5(2), 73–205 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  43. Ron, D., Tsur, G.: Testing properties of sparse images. ACM Trans. Algorithms 10(4), 17:1–17:52 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  44. Rubinfeld, R.: Taming big probability distributions. ACM Crossroads 19(1), 24–28 (2012)

    Article  Google Scholar 

  45. Rubinfeld, R., Sudan, M.: Robust characterizations of polynomials with applications to program testing. SIAM J. Comput. 25(2), 252–271 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  46. 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)

  47. Szpankowski, W.: Average Case Analysis of Algorithms on Sequences. Wiley, New York (2001)

    Book  MATH  Google Scholar 

  48. Tukey, J.W.: Mathematics and the picturing of data. In: Proceedings of the international congress of mathematicians, vol. 2, pp. 523–531 (1975)

  49. Valiant, P.: Testing symmetric properties of distributions. SIAM J. Comput. 40(6), 1927–1968 (2011)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Sofya Raskhodnikova.

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

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-018-0467-9

Keywords