Constructing a compact manifold with chosen homology groups Let $G_1,G_2,\ldots,G_k$ be $k$ finitely presented abelian groups. It's possible to construct a $(2k+3)$-dimensional manifold $X$ s.t $H_i(X) = G_i$ in following way: consider $k$ copies of the Moore space $X_1,\ldots,X_k$ with $H_i(X_j)= \delta_i^{j}$ and then just take their wedge product, embed in $\mathbb R^{2k+3}$ and then take an $\epsilon$-neighbourhood.
But the result of this construction is not a closed manifold. Can I construct a closed manifold of dimension $(2k+3)$ with these specified homology groups? What's the minimum possible dimension $n$ in which I can realize any sequence of finitely generated abelian groups $G_1, \dots, G_k$ as the homology of a closed $n$-manifold? 
My guess is that I should be able to construct a $(2k+2)$-dimensional manifold with first $k$ homology groups chosen.
The guess is true for $k =1$: for any finitely presented group $G$ I can always construct a 4-dimensional compact manifold with $G$ as its fundamental group. And here I am only interested in homology groups (up to degree $k$).
Can you give me some ideas?
 A: Here's a proof that the desired manifold exists for dimension $2k+2$ and higher.
Let $M = M(G_1,\ldots,G_k)$ denote the wedge sum of Moore spaces defined in the introduction, where $k\geq 2$.  Then $M$ can be realized as a finite simplicial complex of dimension at most $k+1$, so there exists a PL embedding of $M$ into $\mathbb{R}^{2k+3}$, or equivalently $S^{2k+3}$.
Suppose $M$ has been embedded in $S^{n+1}$ for some $n\geq 2k+2$, and let $N$ be a regular neighborhood of $M$ (which exists since $n+1 \geq 7$).  Then $\partial N$ is an $n$-dimensional submanifold of $S^{n+1}$.  I claim that $\partial N$ has the desired homology groups.
Let $C$ denote the complement of the interior of $N$.  By Alexander duality, we know that
$$
\widetilde{H}\!_i(C) \,\cong\;\, \widetilde{H}\!^{n-i}\bigl(\mathrm{int}(N)\bigr) \,\cong\, \widetilde{H}\!^{n-i}(M)
$$
for all $i$.  By the universal coefficient theorem, this gives an exact sequence
$$
0\;\to\; \mathrm{Ext}\bigl(\widetilde{H}\!_{n-i-1}(M),\mathbb{Z}\bigr) \;\to\; \widetilde{H}\!_i(C) \;\to\; \mathrm{Hom}\bigl(\widetilde{H}\!_{n-i}(M),\mathbb{Z}\bigr) \;\to\; 0
$$
for each $i$.  Since $\widetilde{H}\!_j(M) = 0$ for $j>k$, it follows that $\widetilde{H}\!_i(C) = 0$ for all $i < n-k-1$, and in particular for all $i\leq k$.
The Mayer-Vietoris sequence for $N$ and $C$ gives
$$
\widetilde{H}\!_{i+1}(S^{n+1}) \;\to\; \widetilde{H}\!_i(\partial N) \;\to\; \widetilde{H}\!_i(N) \oplus \widetilde{H}\!_i(C) \;\to\; \widetilde{H}\!_{i}(S^{n+1}),
$$
which for $i\leq k$ reduces to
$$
0 \;\to\; \widetilde{H}\!_i(\partial N) \;\to\; \widetilde{H}\!_i(M) \oplus 0 \;\to\; 0.
$$
It follows that $\widetilde{H}\!_i(\partial N) \cong \widetilde{H}\!_i(M) \cong G_i$ for all $i\leq k$, as desired.

Incidentally, it's not difficult to give an explicit description of $\partial N$. In particular:


*

*If $M$ is the Moore space $M(\mathbb{Z},i) = S^i$, then $\partial N$ is homeomorphic to $S^i\times S^{n-i}$.

*If $M$ is the standard Moore space $M(\mathbb{Z}/m,i)$ (obtained by attaching a copy of $D^{i+1}$ to $S^i$ along a map of degree $m$), let $T$ be a copy of the solid torus $S^i \times D^{n-i}$ in $S^i\times S^{n-i}$ that "winds around" $m$ times, in the sense that the inclusion $T\to S^i\times S^{n-i}$ is multiplication by $m$ on $H_i$.  (For example, $T$ could be a tubular neighborhood of the graph of a map $S^i\to S^i$ of degree $m$ lying in the canonical copy of $S^i\times S^i$.)  Then $\partial N$ is obtained by removing $T$ from $S^i\times S^{n-i}$ and attaching a copy of $D^{i+1} \times S^{n-i-1}$ in its place.

*Taking a wedge sum of $M$'s corresponds to taking a connected sum of $\partial N$'s.
One can check directly that the homology of the resulting manifold is the desired $G_1,\ldots,G_k$.
A: What is the smallest dimension $n$ such that for any finitely generated abelian groups $G_1, \dots, G_k$, I can find a closed oriented $n$-manifold $M$ with $H_i(M) \cong G_i$?
Some quick facts: you cannot do this for $n = 2k$. Take $G_i = 0$ for $i<k$; then Poincare duality and the universal coefficient theorem force that $G_k$ is free.
You can do this for $n=2k+2$. Take a 0-handle; attach 1-cells for every generator of $G_1$; attach $2$-handles to kill off the relators; attach $2$-handles for generators; etc. We get a manifold with boundary and handles up to degree $(k+1)$. Take the double. One need to be careful in seeing that this does not affect $H_{k+1}$, but it does not. 
When is this optimal? This depends on whether $k$ is odd or not. For $k$ even, you cannot realize $H_i(M) = 0$ for $i<k$, $H_k(M) = \mathbb Z/n$ for $n$ odd, as the homology of a closed $(2k+1)$-manifold. To do this, use the torsion linking form: it's a nonsingular bilinear form $\ell: H_k(M) \otimes H_k(M) \to \mathbb Q/\mathbb Z$. When $k$ is even it's antilinear. If $H_k(M) = \mathbb Z/n$, then $\ell(1,1) = -\ell(-1,1) = \ell(1,-1) = \ell(1,n-1)$; but we also see from that same derivation that $2\ell(1,1) = 0$; but for some $j$, $n-1 = 2j$, so $2j\ell(1,1) = \ell(1,n-1) = 0$. From this and bilinearity you see that $\ell$ is identically zero. This is not possible.
For $k$ odd, this is not optimal. You can realize a sequence $G_1, \dots, G_{2m+1}$ as the homology of a $(4m+3)$-manifold. Let's do each of these separately: construct a manifold with $G_i = \mathbb Z/r$ ($r$ any integer), and $G_j = 0$ for $i \neq j \leq 2m+1$. For $i<2m+1$ you can do the same handlebody construction. For $i=2m+1$ this is trickier. For $r=0$ this is easy: just take $S^{2m+1} \times S^{2m+2}$. We have to work harder to get the torsion.
To do this, take the plumbing of the tangent bundles of $(k+1)$-spheres according to the graph $A_{r-1}$ (the path graph on $r-1$ vertices). Because the determinant of this graph's adjacency matrix (with $2$s on the diagonal) is $r$, the boundary of this plumbing has $H_k = \mathbb Z/r$ and all lower homology zero. For me to explain plumbing in this short space would do you a disservice. I suggest looking at Bredon's book "Geometry and Topology": he has the construction in a short chapter there with a clear explanation of the cited facts. The important question to answer is "why did we need $k$ odd"? And that's because the adjacency matrix of the plumbing graph is different depending on whether the dimensions of the spheres involved (here $k+1$) are odd or even - in one case it's skew-symmetric, in another it's symmetric.
