We determine which connected sets of $N$ vertices in the square lattice support the most spanning trees, using all lattice edges between the chosen vertices. Every maximizer minimizes the number of edges joining the set to the rest of the lattice. Its shape is a rectangle with at most two straight strips of vertices removed at opposite corners. For $N\ge18$, the maximizer is unique up to translation, rotation, and reflection: an explicitly determined rectangle with one possibly empty corner strip removed along its longer side. The proof combines comparisons of Laplacian determinants with geometric comparisons of corner deletions. For $N=n^2$, we prove a sharp stability inequality that bounds the symmetric difference from a translated $n\times n$ square in terms of the loss in logarithmic tree count. Thus, nearly optimal tree counts force the vertex set to be close to a square. We also derive an exact product formula and a recurrence for the number of spanning trees in rectangles with a single corner strip removed.
翻译:暂无翻译