### Colorings and Nowhere-Zero Flows of Graphs in Terms of Berlekamp's Switching Game

#### Abstract

We work with a unifying linear algebra formulation for nowhere-zero flows and colorings of graphs and matrices. Given a subspace (code) $U\leq{\mathbb{Z}_k^n}$ – e.g. the bond or the cycle space over ${\mathbb{Z}}_k$ of an oriented graph – we call a nowhere-zero tuple $f\in{\mathbb{Z}_k^n}$ a *flow* of $U$ if $f$ is orthogonal to $U$. In order to detect flows, we view the subspace $U$ as a light pattern on the $n$-dimensional *Berlekamp Board* ${\mathbb{Z}_k^n}$ with $k^n$ light bulbs. The lights corresponding to elements of $U$ are *ON*, the others are *OFF*. Then we allow axis-parallel switches of complete rows, columns, etc. The core result of this paper is that the subspace $U$ has a flow if and only if the light pattern $U$ cannot be switched off. In particular, a graph $G$ has a nowhere-zero $k$-flow if and only if the ${\mathbb{Z}}_k$-bond space of $G$ cannot be switched off. It has a vertex coloring with $k$ colors if and only if a certain corresponding code over ${\mathbb{Z}}_k$ cannot be switched off. Similar statements hold for Tait colorings, and for nowhere-zero points of matrices. Studying different normal forms to equivalence classes of light patterns, we find various new equivalents, e.g., for the Four Color Problem, Tutte's Flow Conjectures and Jaeger's Conjecture. Two of our equivalents for colorability and existence of nowhere zero flows of graphs include as special cases results by Matiyasevich, by Balázs Szegedy, and by Onn. Alon and Tarsi's sufficient condition for $k$-colorability also arrives, remarkably, as a generalized full equivalent.