Solution (source code)

= Solution

Let $\Gamma=\pi_1(M)$. A compact connected smooth <manifold> has finite <CW complex> homotopy type, hence a finitely generated <fundamental group>. Its <universal cover> with the lifted <Riemannian metric> is complete by the lifted-geodesic argument in part 2(b) and has nonnegative <Ricci curvature>. The <deck transformations> act freely and <properly discontinuously> by <isometries>. Part (a) gives
$$
\beta_\Gamma(m)\leq C(1+m)^n.
$$
The degree-one <Hurewicz theorem> identifies $H_1(M;\mathbb Z)$ with the <abelianization> of $\Gamma$. This finitely generated abelian group has free rank $b=b_1(M)$, so there is a surjection $\Gamma\to\mathbb Z^b$. Choose lifts $\gamma_1,\ldots,\gamma_b$ of a basis and let $A\geq1$ bound their <word lengths>. For every $(z_1,\ldots,z_b)$ with $\sum|z_i|\leq m$, the product $\gamma_1^{z_1}\cdots\gamma_b^{z_b}$ has word length at most $Am$ and maps to that vector. Distinct vectors therefore give distinct group elements. The integer cube $|z_i|\leq\lfloor m/b\rfloor$ shows, for $b>0$, that
$$
\beta_\Gamma(Am)\geq c m^b
$$
for some $c>0$ and all sufficiently large $m$. Comparing with the degree-$n$ upper bound forces $b\leq n$; the case $b=0$ is immediate. Thus
$$
\boxed{b_1(M)\leq n.}
$$
This is the <first Betti-number bound from polynomial fundamental-group growth>.

The standard connectedness convention for a <Riemannian manifold> is needed here. If disconnected manifolds are allowed, the bound applies to each connected component; a disjoint union of two flat $n$-tori has first <Betti number> $2n$ and contradicts a global bound by $n$.