🤖 AI Summary
Approximating the count and uniformly sampling Hamiltonian motifs (i.e., connected subgraphs containing all vertices of a given subset) in large graphs within sublinear time—under the standard query model supporting only degree, adjacency, and pair queries—has remained open, with prior work restricted to radius-1 motifs (e.g., edges, stars, cliques).
Method: We propose a unified framework based on uniform sampling, integrating hierarchical path enumeration with importance-weighted estimation to bridge the “scope gap” between standard and augmented query models.
Contribution/Results: This is the first algorithm achieving ε-approximate counting and approximately uniform sampling for *arbitrary* Hamiltonian motifs under the standard query model. It runs in Õ(n + m) time—sublinear in graph size—and simultaneously simplifies and unifies the design and analysis of algorithms for classical motifs including stars, triangles, and k-cliques, significantly reducing both theoretical complexity and implementation overhead.
📝 Abstract
Counting small subgraphs, referred to as motifs, in large graphs is a fundamental task in graph analysis, extensively studied across various contexts and computational models. In the sublinear-time regime, the relaxed problem of approximate counting has been explored within two prominent query frameworks: the standard model, which permits degree, neighbor, and pair queries, and the strictly more powerful augmented model, which additionally allows for uniform edge sampling. Currently, in the standard model, (optimal) results have been established only for approximately counting edges, stars, and cliques, all of which have a radius of one. This contrasts sharply with the state of affairs in the augmented model, where algorithmic results (some of which are optimal) are known for any input motif, leading to a disparity which we term the ``scope gap"between the two models. In this work, we make significant progress in bridging this gap. Our approach draws inspiration from recent advancements in the augmented model and utilizes a framework centered on counting by uniform sampling, thus allowing us to establish new results in the standard model and simplify on previous results. In particular, our first, and main, contribution is a new algorithm in the standard model for approximately counting any Hamiltonian motif in sublinear time. Our second contribution is a variant of our algorithm that enables nearly uniform sampling of these motifs, a capability previously limited in the standard model to edges and cliques. Our third contribution is to introduce even simpler algorithms for stars and cliques by exploiting their radius-one property. As a result, we simplify all previously known algorithms in the standard model for stars (Gonen, Ron, Shavitt (SODA 2010)), triangles (Eden, Levi, Ron Seshadhri (FOCS 2015)) and cliques (Eden, Ron, Seshadri (STOC 2018)).