arXiv:2611.04577math.CONov 2026

Manuscript Offprint

arXiv:2611.04577

The Lovász Local Lemma Is Sharp for the Hat Guessing Number

Thomas Delépine, Matthieu Rosenfeld

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

In the hat guessing game on a graph GG, each vertex is occupied by a player wearing a hat whose color is chosen from a set of qq colors. Each player knows the graph and their position in it and sees only the hat colors of their neighbors. The players may agree on a strategy beforehand but must simultaneously try to guess their own hat colors without communicating. They win if at least one player guesses their own hat color correctly. The hat guessing number of GG, denoted by HG(G)\text{HG}(G), is the largest integer qq for which the players have a strategy that guarantees a win for every assignment of hat colors.

A direct application of the symmetric Lovász Local Lemma shows that HG(G)<eΔ\text{HG}(G) < e\Delta for every graph GG of maximum degree at most Δ≥1\Delta \geq 1. We prove that this bound is asymptotically sharp: for every ε>0\varepsilon > 0 and every sufficiently large Δ\Delta, there exists a graph GG of maximum degree at most Δ\Delta with HG(G)≥(e−ε)Δ\text{HG}(G) \geq (e-\varepsilon)\Delta. This answers a question of Alon et al., disproves the conjecture HG(G)≤2Δ(G)\text{HG}(G) \leq 2\Delta(G) of Bosek et al., and improves on the construction of Latyshev and Kokhas, which achieves HG(G)=4Δ(G)/3\text{HG}(G) = 4\Delta(G)/3. The hat guessing number thus provides a natural combinatorial problem in which the Lovász Local Lemma is asymptotically tight.

1 Introduction

The Lovász Local Lemma (LLL) is a classical result from the probabilistic method for proving the existence of objects avoiding a collection of local obstructions [5]. Its symmetric form says that a finite family of events, each of probability at most pp with a dependency graph of maximum degree at most D≥2D \geq 2, can be simultaneously avoided provided1epD≤1^1 epD \leq 1. In many applications, the lemma is used as a convenient black box, and the constants it gives are not expected to be optimal. The events often have additional structure

*This research was funded, in whole or in part, by the French National Research Agency (ANR) under grant agreement No. ANR-24-CE48-3758-01. In accordance with the objective of open access dissemination, the authors apply a Creative Commons Attribution (CC-BY) license to any accepted article or manuscript (AAM) resulting from this submission.

1^1This version is slightly stronger than the original statement of the symmetric LLL and is due to Shearer [16].

that matters when seeking sharp results. Many stronger variants of the LLL allow us to exploit this structure. Shearer's theorem [16] gives the optimal abstract criterion for arbitrary event systems with a prescribed dependency graph. More precisely, it characterizes the probability vectors that guarantee a positive probability of avoiding all events in every event system with the prescribed dependency graph. Thus, any improvement over Shearer's criterion must exploit additional structure of the events themselves.

In a more concrete setting, Gebauer, Szabó, and Tardos [8] showed that the lopsided Local Lemma (see [6]) is asymptotically tight for bounded-occurrence k-SAT. It is natural to ask how much of this abstract optimality is visible in concrete combinatorial problems.

In this paper, we prove that the symmetric LLL bound is asymptotically optimal for the hat guessing number of bounded-degree graphs. The hat guessing number is a graph-theoretic generalization of a famous hat guessing puzzle [1, 4]. All graphs considered in this paper are finite and simple. Let GG be a graph, and suppose that each vertex is assigned a color from [q]:={1,…,q}[q] := \{1, \ldots, q\}. Each vertex sees the colors assigned to its neighbors and, according to a previously fixed deterministic strategy, tries to guess its own color. The hat guessing number HG(G)\text{HG}(G) is the largest qq for which there is a strategy that guarantees that at least one vertex guesses correctly for every coloring. Note that the strategy is fixed in advance for all the vertices with complete knowledge of the graph. Applying the LLL to bound the hat guessing number of a bounded-degree graph is straightforward. Fix a strategy for the vertices, and assign each vertex a hat color independently and uniformly at random from [q][q]. The event AvA_v that vertex vv guesses correctly has probability 1/q1/q, even conditional on all hat colors other than the one at vv. Since the events AwA_w with w∉NG(v)∪{v}w \notin N_G(v) \cup \{v\} are determined by those other colors, AvA_v is independent of the family of all such events. Thus, GG is a dependency graph for (Av)v∈V(G)(A_v)_{v \in V(G)}. For Δ≥2\Delta \geq 2, the symmetric Local Lemma therefore implies that if q≥eΔq \geq e\Delta, then with positive probability no vertex guesses correctly. Consequently, every graph GG of maximum degree at most Δ≥2\Delta \geq 2 satisfies

HG(G)<eΔ.\mathrm{HG}(G) < e\Delta.

For Δ=1\Delta = 1, each component has at most two vertices, giving HG(G)≤2<e\mathrm{HG}(G) \leq 2 < e. Thus the bound holds for all Δ≥1\Delta \geq 1. This standard argument was previously observed by Farnik [7].

Several papers have studied the extremal hat guessing number of bounded-degree graphs [1, 3, 9]. In particular, it was conjectured in [3, 9] that HG(G)≤Δ(G)+1\mathrm{HG}(G) \leq \Delta(G) + 1. Latyshev and Kokhas later disproved this conjecture by constructing a family of graphs GG with HG(G)=43Δ(G)\mathrm{HG}(G) = \frac{4}{3}\Delta(G) and unbounded maximum degree [13]. In response, the journal version of [3] replaced the original conjecture by HG(G)≤2Δ(G)\mathrm{HG}(G) \leq 2\Delta(G). More recently, Shurman and Sibley [17] obtained upper bounds depending jointly on the order and maximum degree of the graph, improving the trivial bound in the regime where the LLL bound is insufficient. Here, we show that the constant ee in the Local Lemma bound is asymptotically sharp.

Theorem 1. For every ε>0\varepsilon > 0 and every sufficiently large Δ\Delta, there exists a graph GG of maximum degree at most Δ\Delta such that

HG(G)≥(e−ε)Δ.\mathrm{HG}(G) \geq (e - \varepsilon)\Delta.

Our construction relies on a generalized hat game in which vertices may have different numbers of available colors. We define a hat game G=(G,h)\mathcal{G} = (G, h) as a pair in which GG is a graph and h:V(G)→Nh: V(G) \to \mathbb{N} is a function giving the number of colors available at each vertex. We call hh the hatness function of the game, and h(v)h(v) is the hatness of vv. Without loss of generality, we always assume that the colors available at vertex vv are [h(v)][h(v)]. We say that a game is winning if there exists a strategy such that for every coloring assigning to each vertex vv a color from [h(v)][h(v)], at least one vertex guesses correctly. Decreasing any hatness to a positive integer preserves winnability: restrict the strategy to the remaining colors and replace any guess outside the new color set by an arbitrary permitted color. We build winning games by composing smaller winning games and, although the final game can be reduced to uniform hatness, the intermediate games have a small clique of “bad” vertices with lower hatness. The construction is guided by a careful analysis of how the maximum degree and the hatness of the bad clique evolve under the composition operations. A clique-join operation preserves winnability and multiplies the hatness on the interface. Generalized hat games and related join operations have previously been used to construct winning games with specific properties [2, 11, 12, 13, 14]. By iterating these operations, we keep the number and hatness of the distinguished vertices fixed while controlling their degrees and those of their neighbors. At the final step, the bad clique disappears, leaving a winning game in which all vertices have hatness at least ℓ^\hat{\ell} and the graph has maximum degree at most (1/e+ε)ℓ^(1/e + \varepsilon)\hat{\ell}. We note that our proof does not merely establish existence: it is constructive throughout, and every step can be carried out explicitly.

The constant ee appears in the analysis of the degree growth. Ignoring lower-order errors, the key quantity in the construction behaves like

f(k,i)≈ℓ^kexp⁡(−i/k).f(k,i) \approx \frac{\hat{\ell}}{k} \exp(-i/k).

The largest intermediate degree term is governed by

i⋅f(k,i−1)≈ℓ^ike−i/k≤ℓ^e,i \cdot f(k,i-1) \approx \hat{\ell} \frac{i}{k} e^{-i/k} \leq \frac{\hat{\ell}}{e},

since the function te−tte^{-t} is maximized at t=1t=1 with value 1/e1/e.

The paper is organized as follows. In Section 2, we provide hat game constructors and operators that preserve winnability. In Section 3, we describe how we track the degrees and hatnesses of the distinguished vertices and their neighbors under these operations. Finally, in Section 4, we use the operations as black boxes and track only their numerical parameters to reach the desired quantities. For this purpose, we first give an informal description of the construction and then prove the lemmas used to implement it. The whole construction is then analyzed in the proof of Theorem 18.