Extremal Graphs for the Lights Out Problem
Julien Codsi, Sergio Cristancho, Alexander Divoux, Varun Sivashankar
TL;DR
This work analyzes the Lights Out problem on graphs with all lights initially on and characterizes extremal graphs—those with pressing all vertices as the unique solution. It proves that extremal graphs are exactly the even graphs with an odd number of matchings, connecting extremality to the parity of $m(G)$ via $M_G = A_G + I_n$ and establishing a bijection to symmetric invertible matrices over $\mathbb{F}_2$ of size $n-2$. It also classifies cycles by length modulo $3$ and provides constructive operations that preserve extremality, alongside a polynomial-method parity lemma about matchings covering odd vertex sets. These results yield exact counts of labeled extremal graphs and reveal a rich algebraic/combinatorial structure underlying the Lights Out problem. The findings have potential implications for understanding linear-algebraic solvability conditions in graph-based toggle games and related combinatorial models.
Abstract
Lights Out is a game played on a graph $G$ where every vertex has a light bulb that is either on or off, and pressing a vertex $v$ toggles the state of every vertex in the closed neighborhood of $v$. The goal is to find a subset of vertices $S$ such that pressing every vertex in $S$ results in all light bulbs being turned off. We study the extremal graphs for which pressing every vertex is the unique solution to the lights out problem given an initial configuration of all lights on. We show that a graph is extremal if and only if it is even and has an odd number of matchings. Furthermore, there is a bijection between the set of labeled $n$-vertex extremal graphs and the set of symmetric invertible matrices of size $n-2$ over $\mathbb{F}_2$. We prove that any even graph with no cycle of length $0\pmod 3$ must be extremal. We also demonstrate operations that build larger extremal graphs from smaller ones. Along the way, we prove using the polynomial method that in any even graph, the number of matchings of a fixed size covering an odd subset of vertices is even.
