---
title: Neighborhood-Balanced k-Coloring
url: https://www.emergentmind.com/topics/neighborhood-balanced-k-coloring
type: topic
---

# Neighborhood-Balanced k-Coloring

Neighborhood-balanced \(k\)-coloring is a local color-distribution constraint on a graph \(G=(V,E)\) in which the open neighborhood of every vertex is required to be perfectly equidistributed among \(k\) colors. In the standard formulation, a coloring \(c:V\to\{1,\dots,k\}\) is neighborhood-balanced if for every vertex \(v\) and all colors \(i,j\), \(|N(v)\cap V_i|=|N(v)\cap V_j|\), where \(V_i=c^{-1}(i)\) [2509.06003]. The notion generalizes the 2-color setting of Freyberg and Marr and the 3-color case studied by Minyard et al., and it has since expanded into a broader family of open-neighborhood, closed-neighborhood, quasi-balanced, and \(\lambda\)-balanced theories, with distinct structural and algorithmic behavior [2509.06003].

## 1. Formal definition and algebraic encodings

For a simple graph \(G=(V,E)\) and an integer \(k\ge 2\), a neighborhood-balanced \(k\)-coloring is a partition
\[
V=V_1\cup\cdots\cup V_k
\]
such that every vertex sees the same number of neighbors in each color class:
\[
|N(v)\cap V_i|=|N(v)\cap V_j| \quad \text{for all } v\in V(G),\ i,j\in\{1,\dots,k\}.
\]
Equivalently, if \(d(v)=|N(v)|\), then each vertex satisfies
\[
|N(v)\cap V_i|=\frac{d(v)}{k}\quad \text{for every }i.
\]
Thus the definition is intrinsically local: it constrains neighborhood color histograms rather than forbidding monochromatic edges [2509.06003].

Several papers use signed encodings of the colors. For odd \(k=2m+1\), colors may be encoded by \(\{-m,\dots,-1,0,1,\dots,m\}\); for even \(k=2m\), by \(\{-m,\dots,-1,1,\dots,m\}\). If
\[
w(v)=\sum_{u\in N(v)} c(u),
\]
then neighborhood-balance is equivalent to \(w(v)=0\) for all vertices \(v\). In the odd-prime formulation, this symmetric encoding is used systematically to express \((2m+1)\)-neighborhood balance as a zero-sum condition on every neighborhood [2505.07758].

The underlying colorings are not proper colorings. In the generalized \(k\)-colored framework for neighborhood-balance and \(\lambda\)-balance, a coloring is a partition into color classes, and adjacent vertices are permitted to receive the same color [2603.05705].

## 2. Necessary conditions and counting identities

The most immediate necessary condition is divisibility of degrees. If \(G\) admits a neighborhood-balanced \(k\)-coloring, then every degree is a multiple of \(k\):
\[
d(v)\equiv 0 \pmod{k}\quad \text{for all }v\in V(G).
\]
If \(G\) has no isolated vertices, then \(|V(G)|\ge 2k\). There is also a coarsening principle: if \(G\) admits a neighborhood-balanced \(k\)-coloring and \(p\mid k\), then \(G\) also admits a neighborhood-balanced \(p\)-coloring [2509.06003].

Neighborhood-balance imposes rigid edge-distribution identities. If \(c\) is a neighborhood-balanced \(k\)-coloring with color classes \(V_1,\dots,V_k\), then for all \(i\ne j\),
\[
|E(V_i,V_j)|=\frac{2|E(G)|}{k^2},
\]
and for each \(i\),
\[
|E(V_i,V_i)|=\frac{|E(G)|}{k^2}.
\]
Hence every unordered pair of distinct colors supports the same number of edges, and each monochromatic color class induces the same number of edges [2509.06003].

For \(r\)-regular graphs, the consequences are stronger. Every color class has the same size:
\[
|V_i|=\frac{|V(G)|}{k}\quad (i=1,\dots,k),
\]
so \(|V(G)|\equiv 0\pmod{k}\). In addition,
\[
|E(G)|\equiv 0\pmod{k^2}.
\]
These are necessary conditions only; they are not sufficient in general [2509.06003].

The 3-color case sharpens these constraints. If a graph is 3-balanced, then \(3\mid d(v)\) for every vertex, hence \(3\mid |E|\). More precisely,
\[
|E_{ij}|=\frac{2|E|}{9}\quad (i\ne j), \qquad |E_{ii}|=\frac{|E|}{9},
\]
so \(9\mid |E|\). For an \(r\)-regular 3-balanced graph, \(|V_i|=|V|/3\), and in the cubic case one gets
\[
|E_{ij}|=\frac{|V|}{3},\qquad |E_{ii}|=\frac{|V|}{6},
\]
hence \(6\mid |V|\) [2410.05422].

## 3. Canonical graph classes and constructive families

Complete graphs are excluded from the open-neighborhood theory except in the trivial one-vertex case. More precisely, no \(K_n\) with \(n>1\) admits a neighborhood-balanced \(k\)-coloring, because the simultaneous conditions \(k\mid n\) and \(k\mid (n-1)\) are impossible for \(k\ge 2\) [2509.06003].

Complete multipartite graphs admit an exact characterization. A complete multipartite graph \(K_{n_1,\dots,n_p}\) is neighborhood-balanced \(k\)-colorable if and only if every part size is divisible by \(k\):
\[
n_i\equiv 0\pmod{k}\quad \text{for all }i.
\]
The sufficiency construction colors each part evenly with all \(k\) colors, and the converse follows from the neighborhood equations for vertices inside each part [2509.06003].

Hamming graphs provide a high-dimensional regular family with a clean criterion. The Hamming graph \(H(d,k)\) is neighborhood-balanced \(k\)-colorable if and only if
\[
d\equiv 0\pmod{k}.
\]
The proof is constructive: for \(d=kn\), a coloring is built inductively using cyclic shifts across nested decompositions into smaller Hamming graphs. The hypercube \(Q_d\) is the special case \(k=2\), so it is neighborhood-balanced 2-colorable exactly when \(d\) is even [2509.06003].

Circulant graphs furnish another systematic source of examples. If
\[
1\le a_1<\cdots<a_k<\frac{n}{2},\qquad a_{i+1}-a_i\equiv p\pmod{k},\qquad n\equiv 0\pmod{k},\qquad p\not\equiv 0\pmod{k},
\]
then the circulant graph \(C_n(a_1,\dots,a_k)\) is neighborhood-balanced \(k\)-colored. A second sufficient condition requires that \(n\) and the number of generators be multiples of \(k\), and that the step set be equidistributed modulo \(k\); then the cyclic coloring \(1,2,\dots,k,1,2,\dots,k\) yields balanced neighborhoods [2509.06003].

The property is also stable under several graph operations. If \(G\) and \(H\) admit neighborhood-balanced \(k\)-colorings, then so do the Cartesian product \(G\square H\), the strong product \(G\boxtimes H\), and the lexicographic product \(G[H]\). The direct product \(G\times H\) is neighborhood-balanced if at least one factor is. Joins \(G+H\) are neighborhood-balanced provided both factors admit neighborhood-balanced \(k\)-colorings with equal color-class sizes; in particular this holds for regular balanced factors [2509.06003].

## 4. The 3-color regime and cubic structure

The 3-color theory is unusually rigid. For a 3-balanced coloring \(\ell:V\to \mathbb{Z}_3\), the generalized Petersen graph \(G(m,j)\) is 3-balanced if and only if
\[
3\mid m \quad \text{and} \quad 3\nmid j.
\]
The sufficiency coloring is simply \(\ell(v_i)=\ell(u_i)=i \bmod 3\), while the nonexistence direction for \(3\mid j\) is obtained from a linear system built from circulant blocks and an argument using roots of unity [2410.05422].

Generalized Pappus graphs satisfy an analogous criterion. The graph \(P(m,j,k)\) is 3-balanced if and only if
\[
6\mid m,\qquad 3\nmid j,\qquad k=\frac{m}{2}.
\]
Again, the positive direction uses the residue coloring \(\ell(v_i)=\ell(u_i)=\ell(w_i)=i\bmod 3\), and the negative direction uses an aggregated linear system over residue classes modulo powers of \(3\) [2410.05422].

Among other cubic families, the Möbius ladder \(M_n\) is 3-balanced exactly when \(6\mid n\). More broadly, cubic 3-balanced graphs admit strong internal characterizations. If a cubic graph is 3-balanced, then the induced edge-labeling
\[
\ell(uv)=\ell(u)+\ell(v)\in \mathbb{Z}_3
\]
is a Tait coloring: a proper 3-edge-coloring in which each edge color class is a perfect matching, and the union of any two edge colors is a vertex-disjoint union of alternating cycles. Thus no snark is 3-balanced [2410.05422].

Two structural characterizations are especially notable. First, a cubic graph with a Tait coloring is 3-balanced if and only if a cycle-based alternating-sum invariant depends only on the base vertex; if any even cycle passes through that vertex, the alternating sum is forced to be \(0\). Second, every cubic 3-balanced graph can be encoded by a partition \(V=V_0\sqcup V_1\sqcup V_2\) together with bijections
\[
s_{ij}:V_i\to V_j
\]
satisfying \(s_{ij}^{-1}=s_{ji}\) and with \(s_{ii}\) fixed-point-free; conversely, such a dataset reconstructs a cubic 3-balanced graph [2410.05422].

At small order the classification is explicit. Both connected cubic graphs on 6 vertices, namely \(K_{3,3}\) and the triangular prism, are 3-balanced. Among the 85 connected cubic graphs on 12 vertices, exactly 17 are 3-balanced [2410.05422].

## 5. Variants, relaxations, and structural generalizations

The standard notion concerns open neighborhoods, but a parallel theory studies **closed neighborhood-balanced \(k\)-coloring**, where every closed neighborhood \(N[v]\) is equally colored. If \(G\) admits such a coloring, then
\[
d(v)\equiv -1 \pmod{k}\quad \text{for all }v.
\]
Complete graphs behave differently in this setting: \(K_n\) is closed neighborhood-balanced \(k\)-colorable if and only if \(n\equiv 0\pmod{k}\). The Hamming graph \(H(d,k)\) is closed neighborhood-balanced \(k\)-colorable if and only if
\[
d\equiv 1\pmod{k}.
\]
Closed balance is also preserved by several graph operations, including strong products, certain Cartesian products, lexicographic products under equal-class hypotheses, and joins under equal-class hypotheses; by contrast, if both \(G\) and \(H\) are closed neighborhood-balanced \(k\)-colored, then \(G\times H\) is not closed neighborhood-balanced \(k\)-colored [2510.16666].

A broader relaxation is given by neighborhood \(\lambda\)-balance. In a \(k\)-colored graph, a coloring is \((k,\lambda)\)-balanced if for every vertex \(v\),
\[
|C_i\text{-}\deg(v)-C_j\text{-}\deg(v)|\le \lambda
\]
for all colors \(i,j\); it is \([k,\lambda]\)-balanced if the same inequality holds in \(N[v]\); and it is \(([k,\lambda])\)-balanced if each vertex may satisfy either the open or the closed version. The associated invariants are the open, closed, and local \(k\)-balance numbers,
\[
\beta_k(G),\qquad \beta_k[G],\qquad \beta_k([G]).
\]
These satisfy
\[
0\le \beta_k[G]-\beta_k([G])\le 1,\qquad 0\le \beta_k(G)-\beta_k([G])\le 1,\qquad -1\le \beta_k[G]-\beta_k(G)\le 1,
\]
and all three bounds are tight. The same work introduces **color degree matrices** and **color 2-switches**, proving that two \(k\)-colored graphs have the same color degree matrix if and only if one can be obtained from the other by a sequence of color 2-switches. Because color 2-switches preserve the number of neighbors of each color at every vertex, they preserve \((k,\lambda)\)-, \([k,\lambda]\)-, and \(([k,\lambda])\)-balanced colorings [2603.05705].

For \(k=2\) and \(\lambda\le 1\), the theory refines further into OSB, CSB, SBV, and parity-balanced classes. In this regime, every tree is OSB, and complete multipartite graphs satisfy
\[
\beta_2([G])\le 2,\qquad \beta_2(G)\le 2,\qquad \beta_2[G]\le 3,
\]
with each bound sharp. The same paper gives complete characterizations of parity-balanced and CSB caterpillars and a recurrence-based counting formula for CSB-colored caterpillars of fixed spine length [2603.05705].

Another relaxation is **quasi neighborhood balanced coloring**, a 2-color notion in which each vertex has red and blue neighbor counts differing by at most one, with at least one vertex attaining difference exactly one. Uniform, positive, and negative variants specify the sign of the imbalance at odd-degree vertices. A negative quasi neighborhood balanced coloring on a graph whose vertices all have odd degree is also a closed neighborhood balanced coloring. Representative class results include: \(K_n\) is negative quasi neighborhood balanced if and only if \(n\) is even; \(K_{m,n}\) is uniformly quasi neighborhood balanced if and only if at least one of \(m,n\) is odd; every path admits a quasi neighborhood balanced coloring [2512.24293].

## 6. Complexity, non-heredity, and open directions

The exact open-neighborhood problem is computationally hard. For every fixed \(k\ge 2\), the decision problem asking whether a graph admits a neighborhood-balanced \(k\)-coloring is NP-complete. The reduction is from \(k\)-Equal Sum Subsets and uses the \((k,n)\)-house gadget, whose key property is that in any neighborhood-balanced \(k\)-coloring all index vertices in the gadget receive the same color. This forces a coloring of the reduction graph to encode an equal-sum partition [2509.06003].

The class is also non-hereditary. Every graph occurs as an induced subgraph of a neighborhood-balanced \(k\)-colored graph, via a cloning construction that replaces each original vertex \(v_i\) by \(k\) copies \(v_i^1,\dots,v_i^k\) and connects all copies of adjacent originals in all \(k^2\) color combinations. Consequently, the class of neighborhood-balanced \(k\)-colorable graphs has no forbidden induced subgraph characterization [2509.06003].

The same two phenomena recur in related variants. Closed neighborhood-balanced \(k\)-coloring is NP-complete for each fixed \(k\ge 3\), via a reduction from proper \(k\)-coloring using edge cliques and padding gadgets; moreover, every graph is an induced subgraph of some closed neighborhood-balanced \(k\)-colored graph, so that class is likewise non-hereditary and admits no forbidden induced subgraph characterization. The status of the closed \(k=2\) problem is left open [2510.16666]. Quasi neighborhood balanced coloring is NP-complete as well, and its class is also non-hereditary, with no forbidden induced subgraph characterization [2512.24293].

Several open directions are explicit. For the exact open-neighborhood theory, a central unresolved problem is to characterize regular graphs that admit neighborhood-balanced \(k\)-colorings [2509.06003]. For the closed-neighborhood theory, the corresponding characterization problem for regular graphs, and the complexity of the 2-color case, remain open [2510.16666]. In the \(\lambda\)-balanced framework, proposed extensions include distance-two neighborhoods, alternative imbalance objectives, and edge-color analogues [2603.05705]. Taken together, these questions indicate that neighborhood-balanced \(k\)-coloring sits at the intersection of local equitable structure, graph products, modular counting, and computational intractability, with a theory that is already rich in special families but still incomplete in general.

Source: https://www.emergentmind.com/topics/neighborhood-balanced-k-coloring