Can $\sigma(\mathscr{G})$ be constructed by taking countable unions and complements? Let $X$ be a set, and $\mathscr{G}\subset \mathcal{P}(X)$ with $X\in\mathscr{G}$. Then $\sigma(\mathscr{G})$ is defined as the “smallest” $\sigma$-algebra containing $\mathscr{G}$. It would seem that we could construct $\sigma(\mathscr{G})$ with
$$\mathscr{G}’:=\left\{\left( \bigcup_{i\in\mathbb{N}}G_i \right),\left( \bigcup_{i\in\mathbb{N}}{G_i}  \right)^c  \,\, \Big| \,\, G_i,\in\mathscr{G} \text{  or  } {G_i}^c\in\mathscr{G} \right\},$$
but my measure theory book suggests this is not the case. But why not?
My first thought was, “maybe those unions generate new sets, and unions of those new sets were not already accounted for.” But this is not a problem: If $A$ and $B$ are two sets generated by these countable unions from the sequences $(A_i)$ and $(B_i)$, then $A\cup B$ is generated by $(A_1,B_1,A_2,B_2,\dots)$, and so is already accounted for. The same reasoning can be extended to countable unions of the sets generated by these countable unions of $G_i$ sets. As for uncountable unions, who cares, the $\sigma$-algebra axioms don’t say they need to be included anyway.
 A: So we can describe your construction as:


*

*Start with $\mathcal{G}$

*Throw in all complements

*Throw in all countable unions of sets you already have

*Throw in all complements of sets you already have.


Your $\mathcal{G}'$ is closed under complements, but not even under finite unions.  If $A,B$ were constructed in step 4, you have no way to get $A \cup B$.  
Take $X = [0,1]$ and let $\mathcal{G} = \{[0,a] : a \in [0,1]\}$.  At step 2 we get everything of the form $(a,1]$ (call these $\mathcal{G}'$).  At step 3 we get all countable unions of those.  We can write such a set as $G = \bigcup_i G_i \cup \bigcup G_j^c$ where $G_i, G_j \in \mathcal{G}$.  Now $\bigcup_i G_i$ is either empty or a connected set containing $0$, and $\bigcup_i G_j^c$ is either empty or a connected set containing $1$.  So $G$ has at most two components, and each of them contains either $0$ or $1$.  As such, $G^c$ is either empty or connected.  
So a set like $[1/5, 2/5] \cup [3/5, 4/5]$ is nowhere to be found since it meets none of the above conditions, even though we can get $[1/5, 2/5]$ and $[3/5, 4/5]$ at step 4.
A: A more elaborate answer will work.  But you cannot just use two steps: you have go recursively through all countable ordinals.
Let $\omega_1$ be the set of all countable ordinals.  Let $\mathscr G$ be a family of subsets of $X$.  We are interested in $\sigma(\mathscr G)$, the least sigma-algebra containing $\mathscr G$.
$\bullet$ Define $\mathscr B_0 = \mathscr G$.
$\bullet$When $\alpha \in \omega_1$ and $\mathscr B_\alpha$ is defined, then define
$$
\mathscr B_{\alpha+1} = \left\{\bigcup_{n\in \mathbb N}A_n,\left(\bigcup_{n\in \mathbb N}
A_n\right)^c\;:\; A_n \in \mathscr B_\alpha\right\}
$$
$\bullet$When $\lambda \in \omega_1$ is a limit ordinal, and $\mathscr B_\alpha$ is defined for all $\alpha < \lambda$, define
$$
\mathscr B_\lambda = \bigcup_{\alpha < \lambda}\mathscr B_\alpha
$$
$\bullet$ THEN:
$$
\sigma(\mathscr G) = \bigcup_{\alpha\in\omega_1} \mathscr B_\alpha
$$
Furthermore, no ordinal strictly less than $\omega_1$ will do in general.  In fact, if $\mathscr G$ is the set of open intervals in $\mathbb R$, so that $\sigma(\mathscr G)$ is the set of Borel sets in $\mathbb R$, it can be shown that the sets $\mathscr B_\alpha$, $\alpha \in \omega_1$, are all different.  
For a proof, see  
Cohn, Donald L., Measure theory., Boston, MA: Birkhäuser. ix, 373 p. (1993). ZBL0860.28001.
