In Remark 6.3 of their paper on the spectral gap of a quantum graph, Kennedy, Kurasov, Malenová and Mugnolo bound the spectral gap μ₂ of the Kirchhoff Laplacian on a compact metric graph with diameter D and E edges by π²/E² ≤ μ₂D² ≤ 4π²E², and ask for the optimal constants for each E. We determine both to leading order. The largest value of μ₂D² is (1+o(1)) log²E: every graph satisfies √μ₂·D ≤ log(8e²(E+1)), and chains of bundles of parallel edges whose sizes decay exponentially from the middle attain the coefficient 1. The smallest value is (16+o(1))/E: every graph satisfies μ₂D² ≥ 16/(E+9), and two bundles of loops of length D/2 joined by an edge of length D/2 give at most 16/(E−2) for E ≥ 3. For the first eigenvalue λ₁ with Dirichlet conditions on a nonempty vertex set and the inradius R, the extreme values of λ₁R² over graphs with E edges are (1/4+o(1)) log²E and (2+o(1))/E. The upper bounds hold also in terms of the first Betti number and of total length; for the mean distance ρ, μ₂ρ² is of order log²E, attained by Ramanujan graphs. The upper bounds combine the coarea formula for distance functions with a Riccati inequality for weighted Sturm–Liouville problems. The lower bounds bound the torsion function edge by edge, using the current of a unit point source, and apply this to the two nodal domains of an eigenfunction, whose inradii add up to at most D.
