NP-Completeness of Neighborhood Balanced Colorings
Saeed Asaeedi
TL;DR
The paper addresses the problem of determining whether a graph admits a Neighborhood Balanced Coloring (NBC), proving its NP-completeness via a partition-based reduction that uses $n$-pack gadgets attached to a $K_{2,2}$ base so NBC existence corresponds to a two-way equal-sum partition of an integer set. It contributes an exact algorithm, a single-crossover genetic algorithm, and a random-coloring baseline, all evaluated with a penalty metric $\text{penalty} = \sum_{v\in V} | r_v - b_v |$ to measure deviation from an NBC, on both small and large graphs. The results establish a practical toolkit for NBC search: the exact method is feasible only for small instances, while the genetic algorithm offers scalable performance with competitive accuracy against random coloring. The work advances understanding of NBC's computational hardness and provides heuristic methods for discovering NBCs in larger graphs or when an exact solution is intractable.
Abstract
A Neighborhood Balanced Coloring (NBC) of a graph is a red-blue coloring where each vertex has the same number of red and blue neighbors. This work proves that determining if a graph admits an NBC is NP-complete. We present a genetic algorithm to solve this problem, which we implemented and compared against exact and randomized algorithms.
