ABSTRACT
Counting the number of triangles in a graph is a beautiful algorithmic problem which has gained importance over the last years due to its significant role in complex network analysis. Metrics frequently computed such as the clustering coefficient and the transitivity ratio involve the execution of a triangle counting algorithm. Furthermore, several interesting graph mining applications rely on computing the number of triangles in the graph of interest.
In this paper, we focus on the problem of counting triangles in a graph. We propose a practical method, out of which all triangle counting algorithms can potentially benefit. Using a straightforward triangle counting algorithm as a black box, we performed 166 experiments on real-world networks and on synthetic datasets as well, where we show that our method works with high accuracy, typically more than 99% and gives significant speedups, resulting in even ≈ 130 times faster performance.
Supplemental Material
- D. Achlioptas and F. McSherry. Fast computation of low rank matrix approximation. In STOC, 2001. Google ScholarDigital Library
- N. Alon and S. Joel. The Probabilistic Method. Wiley Interscience, New York, second edition, 2000.Google Scholar
- N. Alon, Y. Matias, and M. Szegedy. The space complexity of approximating the frequency moments. In STOC '96: Proceedings of the twenty-eighth annual ACM symposium on Theory of computing, pages 20--29, New York, NY, USA, 1996. ACM. Google ScholarDigital Library
- N. Alon, R. Yuster, and U. Zwick. Finding and counting given length cycles. Algorithmica, 17(3):209--223, 1997.Google ScholarCross Ref
- Z. Bar-Yosseff, R. Kumar, and D. Sivakumar. Reductions in streaming algorithms, with an application to counting triangles in graphs. In SODA '02: Proceedings of the thirteenth annual ACM-SIAM symposium on Discrete algorithms, pages 623--632, Philadelphia, PA, USA, 2002. Society for Industrial and Applied Mathematics. Google ScholarDigital Library
- L. Becchetti, P. Boldi, C. Castillo, and A. Gionis. Efficient semi-streaming algorithms for local triangle counting in massive graphs. In Proceedings of ACM KDD, Las Vegas, NV, USA, August 2008. Google ScholarDigital Library
- B. Bollobas. Random Graphs. Cambridge University Press, 2001.Google Scholar
- L. S. Buriol, G. Frahling, S. Leonardi, A. Marchetti-Spaccamela, and C. Sohler. Counting triangles in data streams. In PODS '06: Proceedings of the twenty-fifth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems, pages 253--262, New York, NY, USA, 2006. ACM. Google ScholarDigital Library
- F. Chung, L. Lu, and V. Vu. Eigenvalues of random power law graphs. Annals of Combinatorics, 7(1):21--33, June 2003.Google ScholarCross Ref
- D. Coppersmith and S. Winograd. Matrix multiplication via arithmetic progressions. In STOC '87: Proceedings of the nineteenth annual ACM conference on Theory of computing, pages 1--6, New York, NY, USA, 1987. ACM. Google ScholarDigital Library
- J. Dean and S. Ghemawat. Mapreduce: Simplified data processing on large clusters. OSDI '04, pages 137--150, December 2004.Google ScholarDigital Library
- J. Dean and S. Ghemawat. Mapreduce: Simplified data processing on large clusters. OSDI, 2004. Google ScholarDigital Library
- J.-P. Eckmann and E. Moses. Curvature of co-links uncovers hidden thematic layers in the world wide web. PNAS, 99(9):5825--5829, April 2002.Google ScholarCross Ref
- I. J. Farkas, I. Derenyi, A.-L. Barabasi, and T. Vicsek. Spectra of "real-world" graphs: Beyond the semi-circle law. Physical Review E, 64:1, 2001.Google ScholarCross Ref
- G. Golub and C. Van Loan. Matrix Computations. JohnsHopkinsPress, Baltimore, MD, second edition, 1989.Google Scholar
- A. Itai and M. Rodeh. Finding a minimum circuit in a graph. In STOC '77: Proceedings of the ninth annual ACM symposium on Theory of computing, pages 1--10, New York, NY, USA, 1977. ACM. Google ScholarDigital Library
- H. Jowhari and M. Ghodsi. New streaming algorithms for counting triangles in graphs. In COCOON, pages 710--716, 2005.Google ScholarDigital Library
- D. E. Knuth. Seminumerical Algorithms, volume 2 of The Art of Computer Programming. Addison-Wesley, Reading, Massachusetts, second edition, 10 Jan. 1981.Google Scholar
- R. Lammel. Google's mapreduce programming model - revisited. Science of Computer Programming, 70:1--30, 2008. Google ScholarDigital Library
- M. Latapy. Main-memory triangle computations for very large (sparse (power-law)) graphs. Theor. Comput. Sci., 407(1-3):458--473, 2008. Google ScholarDigital Library
- J. Leskovec and E. Horvitz. Planetary-scale views on an instant-messaging network, Mar 2008.Google Scholar
- M. Mcpherson, L. S. Lovin, and J. M. Cook. Birds of a feather: Homophily in social networks. Annual Review of Sociology, 27(1):415--444, 2001.Google ScholarCross Ref
- M. Mihail and C. Papadimitriou. the eigenvalue power law, 2002. Google ScholarDigital Library
- M. E. J. Newman. The structure and function of complex networks. SIAM Review, 45:167--256, 2003.Google ScholarDigital Library
- T. Sarlos. Improved approximation algorithms for large matrices via random projections. In FOCS '06: Proceedings of the 47th Annual IEEE Symposium on Foundations of Computer Science, pages 143--152, Washington, DC, USA, 2006. IEEE Computer Society. Google ScholarDigital Library
- T. Schank. Algorithmic Aspects of Triangle-Based Network Analysis. Phd in computer science, University Karlsruhe, 2007.Google Scholar
- C. Tsourakakis. Fast counting of triangles in large real networks, without counting: Algorithms and laws. In ICDM, 2008. Google ScholarDigital Library
- C. Tsourakakis, P. Drineas, E. Michelakis, I. Koutis, and C. Faloutsos. Spectral counting of triangles in power-law networks via element-wise sparsification. In SODA '02: Proceedings of the thirteenth annual ACM-SIAM symposium on Discrete algorithms, 2009. Google ScholarDigital Library
- J. S. Vitter. Faster methods for random sampling. Commun. ACM, 27(7):703--718, 1984. Google ScholarDigital Library
- Y. Wang, D. Chakrabarti, C. Faloutsos, C. Wang, and C. Wang. Epidemic spreading in real networks: An eigenvalue viewpoint. In In SRDS, pages 25--34, 2003.Google ScholarCross Ref
- S. Wasserman and K. Faust. Social network analysis. Cambridge University Press, Cambridge, 1994.Google ScholarCross Ref
Index Terms
- DOULION: counting triangles in massive graphs with a coin
Recommendations
Contractible elements in k-connected graphs not containing some specified graphs
In [15], Thomassen proved that any triangle-free k-connected graph has a contractible edge. Starting with this result, there are several results concerning the existence of contractible elements in k-connected graphs which do not contain specified ...
Spectral Counting of Triangles in Power-Law Networks via Element-Wise Sparsification
ASONAM '09: Proceedings of the 2009 International Conference on Advances in Social Network Analysis and MiningTriangle counting is an important problem in graph mining. The clustering coefficient and the transitivity ratio,two commonly used measures effectively quantify the triangle density in order to quantify the fact that friends of friends tend to be ...
Contractible Edges and Triangles in k-Connected Graphs
It is proved that if G is a k-connected graph which does not contain K 4, then G has an edge e or a triangle T such that the graph obtained from G by connecting e or by contracting T is still k-connected. By using this theorem, we prove some theorems ...
Comments