High-dimensional geometry and P vs. NP
The answer to the partial question is no. It’s impossible to be so efficient by a counting argument. First, there are $2^n$ cells, each of which is either colored or not. So there are $2^{2^n}$ possible configurations, each of which has to be represented in polynomial space. This is impossible.