Coloring And combinatorics Let $S$ be a set with $2020$ elements, and let $N$ be an integer with
$0 \le N \le 2020 $ . Prove that it is possible to color every subset of $S$ either black
or white so that the following conditions hold:


*

*the union of any two white subsets is white; 

*the union of any two
black subsets is black; 

*there are exactly $N$ white subsets.

 A: More generally, given a finite set $S$ with $|S|=s$ elements, and given an integer $N$ with $0\le N\le2^s$, we can color every subset of $S$ either white or black so that your three conditions hold.
We may assume that $S=\{1,2,3,\dots,s\}$. Let $\mathcal W_0=\{\emptyset\}$ and, for $i\in S$, let $\mathcal W_i=\{X\subseteq S:\max X=i\}$. Observe that:
(a) $\{\mathcal W_0,\mathcal W_1,\dots,\mathcal W_s\}$ is a partition of $\{X:X\subseteq S\}$.
(b) $|\mathcal W_0|=1$, while $|\mathcal W_i|=2^{i-1}$ for $i\in S$.
(c) If $X\in\mathcal W_i$ and $Y\in\mathcal W_j$, then $X\cup Y\in\mathcal W_{\max(i,j)}$.
(d) If $X\cup Y\in\mathcal W_i$, then $X\in\mathcal W_i$ or $Y\in\mathcal W_i$.
Choose a set $I\subseteq\{0\}\cup S$ and let $\mathcal W_I=\bigcup_{i\in I}\mathcal W_i$.
It follows from (a) and (b) that $|\mathcal W_I|$ ranges over all integers $N$ with $0\le N\le2^s$.
It follows from (c) and (d) that, if we color the sets in $\mathcal W_I$ white and the rest black, then the union of any two white sets will be white, and the union of any two black sets will be black.
