The complement of a finite union of rectangles has only finitely many components Problem. Assume that $V_i\subset \mathbb R^2$, $i=1,\ldots,n$, are open rectangles, and their sides are parallel to the axes. Show that $\mathbb R^2\setminus \bigcup_{i=1}^n V_i$ possesses finitely many connected components.
One idea is the following: Let $\mathcal A$ be the algebra of subsets of $\mathbb R^2$ generated by the rectangles $\{V_1,\ldots,V_n\}$. Find elementary generalised rectangles, i.e., of the form $I\times J$, where $I$ and $J$ are intervals (finite or infinite, open, closed or semi-open), such that that every element of the algebra is a union of such elementary generalised rectangles. Then $\mathbb R^2\setminus \bigcup_{i=1}^n V_i$ will be a union of such sets, and so will be each component. Show that if a point of an elementary rectangles lies in a component, then so does the whole rectangle. Hence the components are elements of the algebra. There are a lot of details to take care though. 
 A: Each rectangle $V_i$ is of the form $(x_i,y_i)\times(u_i,v_i)$. Let $X=\{p_1<p_2<...<p_k\}$ be the set of all $x_i,y_i$, and let $U=\{q_1<q_2<...<q_j\}$ be the set of all $u_i,v_i$. Consider sets of the form $(p_t,p_{t+1})\times(q_s,q_{s+1})$, or of the form  $(p_t,p_{t+1})\times\{q_s\}$, or $\{p_t\}\times(q_j,\infty)$, and some other variations of this idea that you could list (details below). Each such set is connected, there are finitely many of them and they partition the plane. Each component is the union of finitely many sets of this form. 
More precisely consider sets of the form $P\times Q$ where $P$ is either an open interval $(p_t,p_{t+1})$ with endpoints $p_t,p_{t+1}$ that are "immediate neighbors" in $X$, or $P$ is a singleton $\{p_t\}$ in $X$, or $(-\infty,p_1)$, or $(p_k,\infty)$ 
(in short $P$ runs through the elements of the partition of $(-\infty,\infty)$ that you get using $X$), similarly $Q$ is either an open interval $(q_s,q_{s+1})$ with endpoints $q_s,q_{s+1}$ that are "immediate neighbors" in $U$, or $Q$ is a singleton $\{q_s\}$ in $U$, or $(-\infty,q_1)$, or $(q_j,\infty)$. 
One more time, a bit more formal and perhaps clearer too. 
For each $V_i$ the projection of $V_i$ onto the $x$-axis is an open interval. Let $X$ be the set of all endpoints of such intervals, and list the elements of $X$ in increasing order:
$X=\{p_1<p_2<...<p_k\}$ (use that $X$ is clearly finite).
Similarly $U=\{q_1<q_2<...<q_j\}$ lists in increasing order all the finitely many endpoints of all intervals the are the projections of the $V_i$ onto the $y$-axis.
Let also for convenience $p_0=q_0=-\infty$ and $p_{k+1}=q_{j+1}=\infty$. 
Form partitions $\mathcal P$ and $\mathcal Q$ of $(-\infty,\infty)$ as follows.
Let $\mathcal P=\{\{p_t\}:1\le t\le k\}\cup\{(p_t,p_{t+1}):0\le t\le k\}$ and
let $\mathcal Q=\{\{q_s\}:1\le s\le j\}\cup\{(q_s,q_{s+1}):0\le s\le j\}$.
Then $\mathcal R:=\{P\times Q: P\in\mathcal P,\ Q\in\mathcal Q\}$ is a finite partition of the plane, every element of this partition is connected, end every connected component of $\mathbb R^2\setminus \bigcup_{i=1}^n V_i$ is the union of finitely many elements of $\mathcal R$. 
To take care of the details you could use finite induction to prove that every time you add a new rectangle $V_i$, each element of the partition $\mathcal R$ is either entirely contained in $V_i$ or completely disjoint from $V_i$ ("entirely" and "completely" added for emphasis only :). 
A: Here is another possible solution in case anyone is interested:
Suppose for the sake of a contradiction that $\mathbb{R}^2 \setminus \bigcup_{j=1}^k V_j$ had infinitely many components (assume all the $V_j$ are distinct). There is only one unbounded component so this amounts to saying there are infinitely many bounded components. Let $x_j$ be a convergent sequence of points each in a different bounded component, necessarily converging to some point $x$ lying on the boundary of $\bigcup_{j=1}^k V_j$ , but then the tail of this sequence is contained in some small rectangle centered at $x$, minus $\bigcup_{j=1}^k V_j$, which can be written as a disjoint union of finitely many rectangles, so infinitely many of the $x_j$ are contained in some rectangle outside of $\bigcup_{j=1}^k V_j$, which means that infinitely many of the $x_j$ are in the same component which is impossible by construction.
This contradiction shows that there can be at most finitely many bounded components, hence only finitely many components (since there is only one unbounded component).
