arXiv2026
The subgraph isomorphism problem and its generalizations, such as conjunctive queries where some nodes are projected, are among the most fundamental problems in graph algorithms and database theory. In this paper, we study the listing and enumeration variants of these problems and present two main results. The first result is an algorithm for enumerating projected trees with preprocessing time $\widetilde{O}(n^{17.42})$ and delay $\mathrm{polylog}(n)$. Prior to this work, for trees on $k$ nodes all algorithms in the literature required preprocessing time $n^{Ω(k)}$ or delay $n^{Ω(1)}$ or assumed $ω=2$. Our result generalizes to arbitrary projected hypergraphs, achieving enumeration in preprocessing time $\widetilde{O}(m^{17.42 \, \mathrm{subw}(H)})$ and polylogarithmic delay, where $\mathrm{subw}(H)$ is the submodular width of the pattern hypergraph $H$. We heavily rely on fast (rectangular and output-sensitive) matrix multiplication, which we complement by fine-grained lower bounds indicating that any algorithm beating preprocessing time $n^{Ω(k)}$ with polylogarithmic delay must rely on fast matrix multiplication. The second result is a generic enumeration-to-listing reduction, establishing that listing and enumeration are equivalent under natural assumptions. For (colored) subgraph isomorphism, our reduction transforms any listing algorithm running in time $O(f(n,m) + t \cdot g(n,m))$ into an enumeration algorithm with preprocessing time $O\left( (f(n,m)+g(n,m)+n+m) \log^2 n \right)$ and delay $O(g(n,m))$. We utilize this reduction to prove our first main result, and we expect that our generic reduction will find many future applications.