We initiate the study of combinatorial algorithms for Triangle Detection in $H$-free graphs. The goal is to decide if a graph that forbids a fixed pattern $H$ as a subgraph contains a triangle, using only "combinatorial" methods that notably exclude fast matrix multiplication. Our work aims to classify which patterns admit a subcubic speedup, working towards a dichotomy theorem. On the lower bound side, we show that if $H$ is not $3$-colorable or contains more than one triangle, the complexity of the problem remains unchanged, and no combinatorial speedup is likely possible. On the upper bound side, we develop an embedding approach that results in a strongly subcubic, combinatorial algorithm for a rich class of "embeddable" patterns. Specifically, for an embeddable pattern of size $k$, our algorithm runs in $\tilde O(n^{3-\frac{1}{2^{k-3}}})$ time, where $\tilde O(\cdot)$ hides poly-logarithmic factors. This algorithm also extends to listing all the triangles within the same time bound. We supplement this main result with two generalizations: 1) A generalization to patterns that are embeddable up to a single obstacle that arises from a triangle in the pattern. This completes our classification for small patterns, yielding a dichotomy theorem for all patterns of size up to eight. 2) An $H$-sensitive algorithm for embeddable patterns, which runs faster when the number of copies of $H$ is significantly smaller than the maximum possible $Ω(n^k)$. Finally, we focus on the special case of odd cycles. We present specialized Triangle Detection algorithms that are very efficient: 1) A combinatorial algorithm for $C_{2k+1}$-free graphs that runs in $\tilde O(m+n^{1+2/k})$ time for every $k\geq2$, where $m$ is the number of edges in the graph. 2) A combinatorial $C_5$-sensitive algorithm that runs in $\tilde O(n^2+n^{4/3}t^{1/3})$ time, where $t$ is the number of $5$-cycles in the graph.
翻译:我们首次系统研究H-自由图中三角形检测的组合算法。该研究旨在仅通过“组合”方法(明确排除快速矩阵乘法技术)判定一个禁止固定模式H作为子图的图是否包含三角形。我们的工作致力于对哪些模式允许亚立方级加速进行分类,以推动二分定理的建立。在下界方面,我们证明若H不是3-可着色或包含多于一个三角形,该问题的计算复杂度保持不变,且组合加速的可能性较低。在上界方面,我们提出一种嵌入方法,为丰富的“可嵌入”模式类提供了强亚立方级的组合算法。具体而言,对于规模为k的可嵌入模式,我们的算法时间复杂度为$\tilde O(n^{3-\frac{1}{2^{k-3}}})$,其中$\tilde O(\cdot)$隐藏多对数因子。该算法可扩展至在相同时间界内列出所有三角形。我们通过两个推广补充主要结果:1)推广至除模式中三角形产生的单个障碍外均可嵌入的模式,这完善了我们对小模式的分类,为所有规模不超过八的模式建立了二分定理;2)针对可嵌入模式的H敏感算法,当H的副本数显著小于最大可能值$Ω(n^k)$时运行更快。最后,我们聚焦于奇环的特殊情形,提出两种高效的专用三角形检测算法:1)针对$C_{2k+1}$-自由图的组合算法,对任意$k≥2$时间复杂度为$\tilde O(m+n^{1+2/k})$,其中m为图的边数;2)组合式$C_5$敏感算法,时间复杂度为$\tilde O(n^2+n^{4/3}t^{1/3})$,其中t为图中5-环的数量。