# hypercube subdivision

Let $n$ be a positive natural number. For all $\emptyset \subset S \subseteq \{1, \ldots, n\}$ and $k \in \mathbb{Z}$, define the hyperplane $H(S,k)$ in $\mathbb{R}^n$ given by the equations $$H(S,k):= \left\{ \sum_{i\in S} x_i = k \right\}$$

Question: How many regions (= connected components) are there in the complement of the collection of all hyperplanes $H(S,k)$ in the hypercube $[0,1]^n$?

(In fact, the only relevant hyperplanes are those with $0<k<|S|$, as the others do not intersect the interior of the hypercube. For example, the cases $|S|=1$ with $k=0,1$ define the faces of the hypercube).

When $n=2$ this is simply the unit square $\{ 0 \leq x_1, x_2 \leq 1\}$ divided in two regions by the equation $x_1 + x_2 =1$.

When $n=3$ the relevant hyperplanes are $x_1+x_2+x_3=1,2$ and $x_i+x_j=1$ for all $0 < i < j \leq 3$. The first two equations split the cube in $3$ regions, two simplices and a central region. It seems to me that the remaining three equations split the central region in $2^3=8$ regions, and that the answer to my question when $n=3$ is that there are $10$ regions (but I have a hard time visualizing this and I am not $100\%$ confident).

Does anybody know a reference for this problem, or can advise me on how to proceed? Thanks in advance!