TITLE: Homology of surface of genus $g$
QUESTION [16 upvotes]: This is a homework question given to me by someone of the community here and it's a generalisation of this. I was wondering if you could have a look and tell me if it's right. Thanks for your help!
Task: Compute the homology of a surface of genus $g$, $\Sigma_g$.
My calculations:
(i) The cell decomposition:

$1$ two-cell $e^2$ (a $4g$-gon)
$2g$ one-cells $e^1_i$
$1$ zero-cell $e^0$

(ii) The attaching map of $e^2$:

$f_2 = a_1b_1a_1^{-1}b_1^{-1} \dots
   a_gb_ga_g^{-1}b_g^{-1}$
The attaching map of $e^1$:
$f_1 = e^0$

(iii) The chain groups:

$C_0(\Sigma_g) = \mathbb{Z}$
$C_1(\Sigma_g) = \mathbb{Z}^{2g}$
$C_2(\Sigma_g) = \mathbb{Z}$
$C_k(\Sigma_g) = 0$, $k>2$

(iv) The boundary homomorphisms:
$\dots \xrightarrow{d_3} C_2(\Sigma_g) \xrightarrow{d_2} C_1(\Sigma_g) \xrightarrow{d_1} C_0(\Sigma_g) \xrightarrow{d_0} 0$

$d_0 = 0$
$d_1 = 0$, because $f_1$ has degree
$0$
$d_2(e^2) = 0$, because each
coefficient is $0$

(v) The homology groups:

$H_0(\Sigma_g) = ker d_0 / im d_1 =
   \mathbb{Z} / 0 = \mathbb{Z}$
$H_1(\Sigma_g) = ker d_1 / im d_2 =
   \mathbb{Z}^{2g} / 0 = \mathbb{Z}^{2g}$
$H_2(\Sigma_g) = ker d_2 / im d_3 =
   \mathbb{Z} / 0 = \mathbb{Z}$

REPLY [15 votes]: You can get the genus $g$-surface by doing the connected sum of $g$ tori $T=S^1 \times S^1$, i.e.,
$$S_g := T\,\#\,T\,\#\,\cdots\,\#\,T \qquad  (g\text{ times}).$$
Assuming you're working over $ \mathbb{Z}$.
If you know the homology of $T$, and how to find that of the connected sum, done.
If not, or if you prefer a different approach, you can:
i) Find the homology of $S^1$, then
ii) Find the homology of the product $S^1\times S^1$, and 
iii) Find the homology of the connected sum of $g$ copies in ii):

$H_1(S^1) = \mathbb{Z}$
How to find the homology of a product space, (e.g., Künneth's formula)
 it is $\mathbb{Z}^2$
Finding the homology of connected sums; it is the direct sum of the respective
 homologies; the basis curves are pairwise disjoint, so the homology is the
 direct sum (what happens in one Torus, stays in that Torus)
 You ultimately get: $$H_1(S_g)=\mathbb{Z}^{2g}$$ you are done.