, Volume 74, Issue 3, pp 1055–1081 | Cite as

Testing Lipschitz Functions on Hypergrid Domains

  • Pranjal Awasthi
  • Madhav Jha
  • Marco Molinaro
  • Sofya Raskhodnikova


A function \(f(x_1, \ldots , x_d)\), where each input is an integer from 1 to \(n\) and output is a real number, is Lipschitz if changing one of the inputs by 1 changes the output by at most 1. In other words, Lipschitz functions are not very sensitive to small changes in the input. Our main result is an efficient tester for the Lipschitz property of functions \(f: [n]^d \rightarrow \delta {\mathbb {Z}}\), where \(\delta \in (0,1]\) and \(\delta {\mathbb {Z}}\) is the set of integer multiples of \(\delta \). A property tester is given an oracle access to a function \(f\) and a proximity parameter \(\epsilon \), and it has to distinguish, with high probability, functions that have the property from functions that differ on at least an \(\epsilon \) fraction of values from every function with the property. The Lipschitz property was first studied by Jha and Raskhodnikova (FOCS’11) who motivated it by applications to data privacy and program verification. They presented efficient testers for the Lipschitz property of functions on the domains \(\{0,1\}^d\) and \([n]\). Our tester for functions on the more general domain \([n]^d\) runs in time \(O(d^{1.5} n\log n)\) for constant \(\epsilon \) and \(\delta \). The main tool in the analysis of our tester is a smoothing procedure that makes a function Lipschitz by modifying it at a few points. Its analysis is already nontrivial for the 1-dimensional version, which we call Bubble Smooth, in analogy to Bubble Sort. In one step, Bubble Smooth modifies two values that violate the Lipschitz property, namely, differ by more than 1, by transferring \(\delta \) units from the larger to the smaller. We define a transfer graph to keep track of the transfers, and use it to show that the \(\ell _1\) distance between \(f\) and BubbleSmooth\((f)\) is at most twice the \(\ell _1\) distance from \(f\) to the nearest Lipschitz function. Bubble Smooth has several other important properties that allow us to obtain a dimension reduction, i.e., a reduction from testing functions on multidimensional domains to testing functions on one-dimensional domains. Our dimension reduction incurs only a small multiplicative overhead in the running time and thus avoids the exponential dependence on the dimension.


Lipschitz functions Property testing Dimension reduction  Smoothing operator 


  1. 1.
    Ailon, N., Chazelle, B., Comandur, S., Liu, D.: Estimating the distance to a monotone function. Random Struct. Algorithm. 31(3), 371–383 (2007)CrossRefMathSciNetzbMATHGoogle Scholar
  2. 2.
    Awasthi, P., Jha, M., Molinaro, M., Raskhodnikova, S..: Testing Lipschitz functions on hypergrid domains. Proceedings of APPROX-RANDOM, pp. 387–398 (2012)Google Scholar
  3. 3.
    Bhattacharyya, A., Grigorescu, E., Jung, K., Raskhodnikova, S., Woodruff, D.P.: Transitive-closure spanners. SIAM J. Comput. 41(6), 1380–1425 (2012)CrossRefMathSciNetzbMATHGoogle Scholar
  4. 4.
    Blum, M., Luby, M., Rubinfeld, R.: Self-testing/correcting with applications to numerical problems. J. Comput. Syst. Sci. 47(3), 549–595 (1993)CrossRefMathSciNetzbMATHGoogle Scholar
  5. 5.
    Batu, T., Rubinfeld, R., White, P.: Fast approximate PCPs for multidimensional bin-packing problems. Inf. Comput. 196(1), 42–56 (2005)CrossRefMathSciNetzbMATHGoogle Scholar
  6. 6.
    Berman, P., Raskhodnikova, S., Yaroslavtsev, G.: \(L_p\)-testing. In: Proceedings of the 46th Symposium on Theory of Computing, STOC , pp. 164–173 (2014)Google Scholar
  7. 7.
    Chakrabarty, D., Dixit, K., Jha, M., Seshadhri, C.: Property testing on product distributions: optimal testers for bounded derivative properties. In Proceedings of the 26th Symposium on Discrete Algorithms, SODA, pp. 1809–1828 (2015)Google Scholar
  8. 8.
    Czumaj, A., Sohler, C.: Sublinear-time algorithms. In: Property Testing, Lecture Notes in Computer Science 6390, pp. 41–64. Springer, Berlin (2010)Google Scholar
  9. 9.
    Chakrabarty, D., Seshadhri, C.: Optimal bounds for monotonicity and Lipschitz testing over hypercubes and hypergrids. In: Proceedings of the 45th Symposium on Theory of Computing, STOC, pp. 419–428 (2013)Google Scholar
  10. 10.
    Dodis, Y., Goldreich, O., Lehman, E., Raskhodnikova, S., Ron, D., Samorodnitsky, A.: Improved testing algorithms for monotonicity. In: Proceedings of APPROX-RANDOM , pp. 97–108 (1999)Google Scholar
  11. 11.
    Dixit, K., Jha, M., Raskhodnikova, S., Thakurta, A.: Testing the Lipschitz property over product distributions with applications to data privacy. In: Proceedings of the 10th Theory of Cryptography Conference, TCC, pp. 418–436 (2013)Google Scholar
  12. 12.
    Ergun, F., Kannan, S., Kumar, S.R., Rubinfeld, R., Viswanathan, M.: Spot-checkers. J. Comput. Syst. Sci. 60(3), 717–751 (2000)CrossRefMathSciNetGoogle Scholar
  13. 13.
    Fischer, E., Lehman, E., Newman, I., Raskhodnikova, S., Rubinfeld, R., Samorodnitsky, A.: Monotonicity testing over general poset domains. In: Proceedings of the 34th Symposium on Theory of Computing, STOC, pp. 474–483 (2002)Google Scholar
  14. 14.
    Goldreich, O., Goldwasser, S., Lehman, E., Ron, D., Samorodnitsky, A.: Testing monotonicity. Combinatorica 20(3), 301–337 (2000)CrossRefMathSciNetzbMATHGoogle Scholar
  15. 15.
    Goldreich, O., Goldwasser, S., Ron, D.: Property testing and its connection to learning and approximation. J. ACM 45(4), 653–750 (1998)CrossRefMathSciNetzbMATHGoogle Scholar
  16. 16.
    Goldreich, O.: Introduction to testing graph properties. In Studies in Complexity and Cryptography, Lecture Notes in Computer Science 6390, pp. 470–506. Springer, Berlin (2011)Google Scholar
  17. 17.
    Gromov, M.: Metric Structures for Riemannian and non-Riemannian Spaces. Birkhauser, Switzerland (1999)Google Scholar
  18. 18.
    Halevy, S., Kushilevitz, E.: Testing monotonicity over graph products. Random Struct. Algorithm. 33(1), 44–67 (2008)CrossRefMathSciNetzbMATHGoogle Scholar
  19. 19.
    Jutla, C.S., Patthak, A.C., Rudra, A., Zuckerman, D.: Testing low-degree polynomials over prime fields. Random Struct. Algorithm. 35(2), 163–193 (2009)CrossRefMathSciNetzbMATHGoogle Scholar
  20. 20.
    Jha, M., Raskhodnikova, S.: Testing and reconstruction of Lipschitz functions with applications to data privacy. SIAM J. Comput. 42(2), 700–731 (2013)CrossRefMathSciNetzbMATHGoogle Scholar
  21. 21.
    Kaufman, T., Ron, D.: Testing polynomials over general fields. SIAM J. Comput. 36(3), 779–802 (2006)CrossRefMathSciNetzbMATHGoogle Scholar
  22. 22.
    McDiarmid, C.: On the method of bounded differences. Surv. Comb. Lond. Math. Soc. Lecture Note 141, 148–188 (1989)MathSciNetGoogle Scholar
  23. 23.
    Ollivier, Y.: Ricci curvature of Markov chains on metric spaces. J. Funct. Anal. 256(3), 810–864 (2009)CrossRefMathSciNetzbMATHGoogle Scholar
  24. 24.
    Ron, D.: Algorithmic and analysis techniques in property testing. Found. Trend Theor. Comput. Sci. 5(2), 73–205 (2009)CrossRefMathSciNetzbMATHGoogle Scholar
  25. 25.
    Rubinfeld, R., Sudan, M.: Robust characterization of polynomials with applications to program testing. SIAM J. Comput. 25(2), 252–271 (1996)CrossRefMathSciNetzbMATHGoogle Scholar
  26. 26.
    Rubinfeld, R., Shapira, A.: Sublinear time algorithms. SIAM J. Discret. Math. 25(4), 1562–1588 (2011)CrossRefMathSciNetzbMATHGoogle Scholar
  27. 27.
    Seshadhri, C., Vondrák, J.: Is submodularity testable? Algorithmica 69(1), 1–25 (2014)CrossRefMathSciNetzbMATHGoogle Scholar

Copyright information

© Springer Science+Business Media New York 2015

Authors and Affiliations

  1. 1.Carnegie Mellon UniversityPittsburghUSA
  2. 2.Pennsylvania State UniversityUniversity ParkUSA

Personalised recommendations