The Complexity of Diameter on H-free graphs
Jelle J. Oostveen, Daniël Paulusma, Erik Jan van Leeuwen
TL;DR
The paper initiates a structured study of the Diameter problem on $H$-free graphs, showing subquadratic-time hardness under SETH when $H$ is not a small linear forest, while giving linear-time algorithms for several small linear-forest cases and examining the boundedness of the maximum diameter $d_{ ext{max}}$ for linear-forest forbidden patterns. It establishes $O(n+m)$-time algorithms for Diameter when $H subseteq_i$ a few patterns such as $P_2+2P_1$, $P_3+P_1$, and $P_4$, and analyzes the $d_{ ext{max}}( ext{G})$-Diameter problem across several linear-forest families, including $2P_2$, $P_t$ (odd $t\ge 5$ via augmentation), and $P_3+2P_1$, $2P_2+P_1$, and $P_2+3P_1$. The results imply a nuanced landscape where certain forbidden patterns yield linear-time solvability for diameter-related questions, while nearby open cases and odd-$t$ path-free graphs continue to resist subquadratic algorithms under SETH. The work highlights potential generalizations and conjectures guiding future exploration of Diameter in restricted graph classes, with practical impact on fast exact computation in structured sparse graphs. Overall, the paper bridges hardness and algorithmic results for Diameter in $H$-free graphs, revealing both tight linear-time regimes and important, unresolved boundaries.
Abstract
The intensively studied Diameter problem is to find the diameter of a given connected graph. We investigate, for the first time in a structured manner, the complexity of Diameter for H-free graphs, that is, graphs that do not contain a fixed graph H as an induced subgraph. We first show that if H is not a linear forest with small components, then Diameter cannot be solved in subquadratic time for H-free graphs under SETH. For some small linear forests, we do show linear-time algorithms for solving Diameter. For other linear forests H, we make progress towards linear-time algorithms by considering specific diameter values. If H is a linear forest, the maximum value of the diameter of any graph in a connected H-free graph class is some constant dmax dependent only on H. We give linear-time algorithms for deciding if a connected H-free graph has diameter dmax, for several linear forests H. In contrast, for one such linear forest H, Diameter cannot be solved in subquadratic time for H-free graphs under SETH. Moreover, we even show that, for several other linear forests H, one cannot decide in subquadratic time if a connected H-free graph has diameter dmax under SETH.
