paper

A Fine-Grained Classification of Subquadratic Patterns for Subgraph Listing and Friends

arXiv:2404.04369

Abstract

In an -edge host graph , all triangles can be listed in time [Itai, Rodeh '78], and all -cycles can be listed in time where is the output size [Alon, Yuster, Zwick '97]. These classic results also hold for the colored problem variant, where the nodes of the host graph are colored by nodes in the pattern graph , and we are only interested in subgraphs of that are isomorphic to the pattern and respect the colors. We study the problem of listing all -subgraphs in the colored setting, for fixed pattern graphs . As our main result, we determine all pattern graphs such that all -subgraphs can be listed in subquadratic time , where is the output size. Moreover, for each such subquadratic pattern we determine the smallest exponent such that all -subgraphs can be listed in time . This is a vast generalization of the classic results on triangles and cycles. We also show the same results for two related problems: finding an -subgraph of minimum total edge-weight in time , and enumerating all -subgraphs in preprocessing time and constant delay. Again we determine all pattern graphs that have complexity , and for each such subquadratic pattern we determine the optimal complexity . To prove these results, we design new algorithms and prove conditional lower bounds based on standard hypotheses from fine-grained complexity theory. For our algorithms we introduce a new ingredient that we call hyper-degree splitting, where we split tuples of nodes into high degree and low degree depending on their number of common neighbors. This technique generalizes the classic high-degree-low-degree approach (which only splits along degrees of single nodes) and is crucial to obtain optimal algorithms.

arXiv commentv2: Expanded version establishing a classification of all graphs with subw<2