Showing that every finitely presented group has a $4$-manifold with it as its fundamental group
Solution 1:
Start with the closed $4$-manifold $X = (S^3 \times S^1) \# \cdots \# (S^3 \times S^1)$, the connected sum of $|S|$ copies of $S^3 \times S^1$. Using Seifert-van Kampen, you can check that $\pi_1(X) \cong \langle a_1, \dots, a_{|S|}\rangle$, where $a_i$ is represented by the $S^1$-factor of the $i^\text{th}$ $S^3 \times S^1$ summand of $X$.
Each relation can be represented by a smooth loop in $X$. For example, the relation $a_2 a_1^2 a_3^{-1}$ is represented by the loop in $X$ that first goes around the $S^1$-factor in the $2^\text{nd}$ $S^3 \times S^1$-summand, then goes around the $S^1$-factor in the $1^\text{st}$ $S^3 \times S^1$-summand twice, and finally goes around the $S^1$-factor in the $3^\text{rd}$ $S^3 \times S^1$ factor in reverse (we need to have an orientation chosen for each $a_i$). Denote the loop in $X$ corresponding the the $j^\text{th}$ relation by $b_j$.
Each loop $b_j$ has a tubular neighborhood $N_j$, which is a copy of $S^1 \times D^3$ embedded in $X$. The boundary of $N_j$ is homeomorphic to $S^1 \times S^2$. Note that $D^2 \times S^2$ also has boundary $S^1 \times S^2$. Hence we can cut out $N_j$ from $X$ and insert a copy of $D^2 \times S^2$ in its place by attaching it to the "empty" $S^1 \times S^2$ left behind in $X \setminus \text{int}(N_j)$.
The only step left is to check that removing $N_j$ and replacing it with a copy of $D^2 \times S^2$ has the effect of killing $b_j$. Let $X_j$ denote the manifold obtained from $X$ by this process. We have that $$X_j = (X \setminus \text{int}(N_j)) \cup_{S^1 \times S^2} (D^2 \times S^2).$$ Now \begin{align*} \pi_1(X \setminus \text{int}(N_j)) & = \langle a_1, \dots, a_{|S|} \rangle, \\ \pi_1(D^2 \times S^2) & = 0, \\ \pi_1(S^1 \times S^2) & = \langle c \rangle, \end{align*} where $c$ is represented by $S^1 \times \{\text{pt}\}$ in $S^1 \times S^2$. Note that the image of $c$ in $X_j$ is precisely the curve $b_j$. Therefore by Seifert-van Kampen we have that $$\pi_1(X_j) = \langle a_1, \dots, a_{|S|} \mid b_j \rangle.$$
If $X'$ denotes the result of doing this surgery of all $b_j$'s, we have that \begin{align*} \pi_1(X') & = \langle a_1, \dots, a_{|S|} \mid b_1, \dots, b_{|R|} \rangle \\ & = \langle S \mid R \rangle. \end{align*}