Skip to main content
Cornell University
We gratefully acknowledge support from the Simons Foundation, member institutions, and all contributors. Donate
arxiv logo > cs > arXiv:1407.1116

Help | Advanced Search

arXiv logo
Cornell University Logo

quick links

  • Login
  • Help Pages
  • About

Computer Science > Social and Information Networks

arXiv:1407.1116 (cs)
[Submitted on 4 Jul 2014]

Title:Why do simple algorithms for triangle enumeration work in the real world?

Authors:Jonathan W. Berry, Luke A. Fostvedt, Daniel J. Nordman, Cynthia A. Phillips, C. Seshadhri, Alyson G. Wilson
View a PDF of the paper titled Why do simple algorithms for triangle enumeration work in the real world?, by Jonathan W. Berry and Luke A. Fostvedt and Daniel J. Nordman and Cynthia A. Phillips and C. Seshadhri and Alyson G. Wilson
View PDF
Abstract:Listing all triangles is a fundamental graph operation. Triangles can have important interpretations in real-world graphs, especially social and other interaction networks. Despite the lack of provably efficient (linear, or slightly super-linear) worst-case algorithms for this problem, practitioners run simple, efficient heuristics to find all triangles in graphs with millions of vertices. How are these heuristics exploiting the structure of these special graphs to provide major speedups in running time?
We study one of the most prevalent algorithms used by practitioners. A trivial algorithm enumerates all paths of length $2$, and checks if each such path is incident to a triangle. A good heuristic is to enumerate only those paths of length $2$ where the middle vertex has the lowest degree. It is easily implemented and is empirically known to give remarkable speedups over the trivial algorithm.
We study the behavior of this algorithm over graphs with heavy-tailed degree distributions, a defining feature of real-world graphs. The erased configuration model (ECM) efficiently generates a graph with asymptotically (almost) any desired degree sequence. We show that the expected running time of this algorithm over the distribution of graphs created by the ECM is controlled by the $\ell_{4/3}$-norm of the degree sequence. Norms of the degree sequence are a measure of the heaviness of the tail, and it is precisely this feature that allows non-trivial speedups of simple triangle enumeration algorithms. As a corollary of our main theorem, we prove expected linear-time performance for degree sequences following a power law with exponent $\alpha \geq 7/3$, and non-trivial speedup whenever $\alpha \in (2,3)$.
Comments: Conference version in Innovations of Theoretical Computer Science (ITCS) 2014
Subjects: Social and Information Networks (cs.SI); Discrete Mathematics (cs.DM); Data Structures and Algorithms (cs.DS); Physics and Society (physics.soc-ph)
Cite as: arXiv:1407.1116 [cs.SI]
  (or arXiv:1407.1116v1 [cs.SI] for this version)
  https://doi.org/10.48550/arXiv.1407.1116
arXiv-issued DOI via DataCite

Submission history

From: C. Seshadhri [view email]
[v1] Fri, 4 Jul 2014 03:07:54 UTC (51 KB)
Full-text links:

Access Paper:

    View a PDF of the paper titled Why do simple algorithms for triangle enumeration work in the real world?, by Jonathan W. Berry and Luke A. Fostvedt and Daniel J. Nordman and Cynthia A. Phillips and C. Seshadhri and Alyson G. Wilson
  • View PDF
  • TeX Source
  • Other Formats
view license
Current browse context:
cs.SI
< prev   |   next >
new | recent | 2014-07
Change to browse by:
cs
cs.DM
cs.DS
physics
physics.soc-ph

References & Citations

  • NASA ADS
  • Google Scholar
  • Semantic Scholar

DBLP - CS Bibliography

listing | bibtex
Jonathan W. Berry
Luke A. Fostvedt
Daniel J. Nordman
Cynthia A. Phillips
C. Seshadhri
…
a export BibTeX citation Loading...

BibTeX formatted citation

×
Data provided by:

Bookmark

BibSonomy logo Reddit logo

Bibliographic and Citation Tools

Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)

Code, Data and Media Associated with this Article

alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)

Demos

Replicate (What is Replicate?)
Hugging Face Spaces (What is Spaces?)
TXYZ.AI (What is TXYZ.AI?)

Recommenders and Search Tools

Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
  • Author
  • Venue
  • Institution
  • Topic

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)
  • About
  • Help
  • contact arXivClick here to contact arXiv Contact
  • subscribe to arXiv mailingsClick here to subscribe Subscribe
  • Copyright
  • Privacy Policy
  • Web Accessibility Assistance
  • arXiv Operational Status
    Get status notifications via email or slack