Given a Heegaard diagram $(\Sigma, \alpha, \beta)$ we obtain a compact 3-manifold $M$ together with a handle decomposition where the $\alpha$ curves are the belt spheres of the 1-handles and the $\beta$ curves are the attaching spheres of the 2-handles. We can compute the homology of the resulting 3-manifold using this handle decomposition. After choosing orientations for the $\alpha$, $\beta$, and $\Sigma$ we have a map $$ \partial: \bigoplus_i \mathbb{Z} \beta_i \to \bigoplus_j \mathbb{Z} \alpha_j $$ where $\partial = [<\beta_i , \alpha_j>_\Sigma]_{i,j}$ and $<-,->_{\Sigma}$ is the intersection form on $\Sigma$. We then have $H_1(M) = \text{coker}(\partial)$ and $H_2(M) = \text{ker}(\partial)$. My questions are: (1) Given a homology class $[L] \in H_1(M)$, represented by some immersed link, how can I find a linear combination of the $\alpha_j$ that represent it? (2) Given a homology class $[S] \in H_2(M)$ represented by some immersed surface, how can I find a linear combination of the $\beta_i$ representing it? I should probably also ask the converses - namely given some linear combination of $\alpha_j$ where is a link that represents the homology class that they correspond to (I imagine it is just the linear combination itself) and given a linear combination of the $\beta_i$ where is a surface representing the homology class that they correspond to?