Could anyone help me with the following problem from Miranda's Algebraic Curves and Riemann Surfaces?
Let $X$ be a hyperelliptic curve given with a degree 2 holomorphic map $F \colon X \to \mathbb{P}^1$. Let $b_1$ and $b_2$ be two of the branch points of $F$ in $\mathbb{P}^1$, and let $\gamma$ be a path in $\mathbb{P}^1$ starting at $b_1$ and ending at $b_2$, not passing through any other branch points of $F$. If $r_1$ and $r_2$ are the points of $X$ lying above $b_1$ and $b_2$ respectively, then the path $\gamma$ lifts to two paths $\gamma_1$ and $\gamma_2$ from $r_1$ to $r_2$. Hence $\gamma_1 - \gamma_2$ is a closed chain on $X$. Show that such closed chains generate the first homology group $H_1(X, \mathbb{Z})$.
I also have the following question, which will probably be answered in the solution of the problem: since $F$ is branched at $2g + 2$ points, there are $\binom{2g + 2}{2} = 2(g+1)^2$ of these closed chains. How to find the $2g$ among them that freely generate $H_1(X, \mathbb{Z})$?
I have only a very superficial acquaintance with homology, but suspect it is possible to solve the problem with only elementary methods (i.e. without using any homological algebra), since homology is not stated as a prerequisite in the introduction of the book.