Average Distance Queries through Weighted Samples in Graphs and Metric Spaces: High Scalability with Tight Statistical Guarantees

Authors Shiri Chechik, Edith Cohen, Haim Kaplan

Thumbnail PDF


  • Filesize: 0.56 MB
  • 21 pages

Document Identifiers

Author Details

Shiri Chechik
Edith Cohen
Haim Kaplan

Cite AsGet BibTex

Shiri Chechik, Edith Cohen, and Haim Kaplan. Average Distance Queries through Weighted Samples in Graphs and Metric Spaces: High Scalability with Tight Statistical Guarantees. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2015). Leibniz International Proceedings in Informatics (LIPIcs), Volume 40, pp. 659-679, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2015)


The average distance from a node to all other nodes in a graph, or from a query point in a metric space to a set of points, is a fundamental quantity in data analysis. The inverse of the average distance, known as the (classic) closeness centrality of a node, is a popular importance measure in the study of social networks. We develop novel structural insights on the sparsifiability of the distance relation via weighted sampling. Based on that, we present highly practical algorithms with strong statistical guarantees for fundamental problems. We show that the average distance (and hence the centrality) for all nodes in a graph can be estimated using O(epsilon^{-2}) single-source distance computations. For a set V of n points in a metric space, we show that after preprocessing which uses O(n) distance computations we can compute a weighted sample S subset of V of size O(epsilon^{-2}) such that the average distance from any query point v to V can be estimated from the distances from v to S. Finally, we show that for a set of points V in a metric space, we can estimate the average pairwise distance using O(n+epsilon^{-2}) distance computations. The estimate is based on a weighted sample of O(epsilon^{-2}) pairs of points, which is computed using O(n) distance computations. Our estimates are unbiased with normalized mean square error (NRMSE) of at most epsilon. Increasing the sample size by a O(log(n)) factor ensures that the probability that the relative error exceeds epsilon is polynomially small.
  • Closeness Centrality; Average Distance; Metric Space; Weighted Sampling


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. A. Abboud, F. Grandoni, and V. Vassilevska Williams. Subcubic equivalences between graph centrality problems, APSP and diameter. In SODA. ACM-SIAM, 2015. Google Scholar
  2. K. Barhum, O. Goldreich, and A. Shraibman. On approximating the average distance between points. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, volume 4627 of Lecture Notes in Computer Science. Springer, 2007. Google Scholar
  3. A. Bavelas. A mathematical model for small group structures. Human Organization, 7:16-30, 1948. Google Scholar
  4. A. Bavelas. Communication patterns in task oriented groups. Journal of the Acoustical Society of America, 22:271-282, 1950. Google Scholar
  5. M. A. Beauchamp. An improved index of centrality. Behavioral Science, 10:161-163, 1965. Google Scholar
  6. E. Cohen, D. Delling, T. Pajor, and R. F. Werneck. Computing classic closeness centrality, at scale. In COSN. ACM, 2014. Google Scholar
  7. E. Cohen, D. Delling, T. Pajor, and R. F. Werneck. Sketch-based influence maximization and computation: Scaling up with guarantees. In CIKM, 2014. Google Scholar
  8. E. Cohen, N. Duffield, C. Lund, M. Thorup, and H. Kaplan. Efficient stream sampling for variance-optimal estimation of subset sums. SIAM J. Comput., 40(5), 2011. Google Scholar
  9. M. B. Cohen and R. Peng. 𝓁_p row sampling by lewis weights. In STOC. ACM, 2015. Google Scholar
  10. T. M. Cover and P. E. Hart. Nearest neighbor pattern classification. IEEE Transactions on Information Theory, 13(1):21-27, 1967. Google Scholar
  11. D. Eppstein and J. Wang. Fast approximation of centrality. In SODA, pages 228-229, 2001. Google Scholar
  12. M. Fredman and R. E. Tarjan. Fibonacci heaps and their uses in improved network optimization algorithms. Journal of the ACM, 34(3):596-615, 1987. Google Scholar
  13. L. C. Freeman. A set of measures of centrality based on betweeness. Sociometry, 40:35-41, 1977. Google Scholar
  14. L. C. Freeman. Centrality in social networks: Conceptual clarification. Social Networks, 1, 1979. Google Scholar
  15. O. Goldreich and D. Ron. Approximating average parameters of graphs. Random Struct. Algorithms, 32(4):473-493, 2008. Google Scholar
  16. J. Hamidzadeh, R. Monsefi, and H. S. Yazdi. DDC: distance-based decision classifier. Neural Computing and Applications, 21(7), 2012. Google Scholar
  17. P. Indyk. Sublinear time algorithms for metric space problems. In STOC. ACM, 1999. Google Scholar
  18. P. Indyk. High-dimensional Computational Geometry. PhD thesis, Stanford University, 2000. Google Scholar
  19. K. Okamoto, W. Chen, and X. Li. Ranking of closeness centrality for large-scale social networks. In Proc. 2nd Annual International Workshop on Frontiers in Algorithmics, FAW. Springer-Verlag, 2008. Google Scholar
  20. G. Sabidussi. The centrality index of a graph. Psychometrika, 31(4):581-603, 1966. Google Scholar
  21. M. Talagrand. Embedding subspaces of l₁ into lⁿ₁. Proc. of the American Math. Society, 108(2):363-369, 1990. Google Scholar
  22. M. Thorup. Quick k-median, k-center, and facility location for sparse graphs. SIAM J. Comput., 34(2):405-432, 2004. Google Scholar
  23. V. Vassilevska Williams and R. Williams. Subcubic equivalences between path, matrix and triangle problems. In FOCS. IEEE, 2010. Google Scholar
  24. S. Wasserman and K. Faust, editors. Social Network Analysis: Methods and Applications. Cambridge University Press, 1994. Google Scholar
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail