TITLE: finite generated group realized as fundamental group of manifolds
QUESTION [28 upvotes]: This is discussed in the standard textbooks on algebraic topology.
Pick a presentation of the group $G = \langle g_1,g_2,...,g_n|r_1,r_2,...r_m \rangle$
where $g_i$ are generators and $r_j$ are relations. Then we have a wedge of $n$ circles and attach two-cells to the wedge sum according to the relations $r_j$. Denote the final space $X$. Then van Kampen says $\pi_1(X)=G$.
While usually $X$ is not a manifold, it is well-known that every finitely generated group $G$ can be realized as the fundamental group of some 4-manifold $X$. Can someone sketch the proof? Also, if $X$ could not 
be some manifold of dimension $<4$, what is the obstruction?

REPLY [3 votes]: Yet another explanation of the same constructions given above is to add 1 and 2 handles to the 4 ball according t the given presentation, obtaining a 4 manifold $X$ with boundary. Now the boundary of $X\times I$ (i.e. the double of $X$) has the same fundamental group by Van Kampen and the fact that $\partial X\subset X$ induces a surjection on fundamental groups (turning $X$ upside down shows that $X$ is obtained from $\partial X$ by adding 2 and 3 handles).
Since the first homology=abelianization of $\pi_1$  of closed 1 and 2-manifolds are known, it is easy to see most groups dont occur for $n=1$ or $2$. For $n=3$, another algebraic obstruction is to observe that if $\pi=\pi_1(M^3)$, then $H_2(M)\to H_2(\pi)$ is onto, and if $M$ is orientable, then $H_2(M)=H^1(M)=H^1(\pi)$. So if $H^1(\pi)$ is smaller than $H_2(\pi)$, it cannot occur (for an oriented 3-manifold, in any case).