Finding the genus of a certain algebraic curve I asked the following question in the mathstackexchange but I did not get an answer, probably the level of this question is not appropriate for mathoverflow, so I would like to apologize in advance if it is the case:
Let us consider the algebraic curve $$ f(z,w)=z(z-a^{-1})w^4-(z-a)^3=0  \ \ \ \ \ \ (*)$$
I want to understand the Riemann surface of this curve; strictly speaking, I want to find the genus, and neighborhood structure corresponding to singular points. One can easily see that the singular points are $0, a, a^{-1}$ and $\infty$. It seems to me that all the places $(0,\infty)$, $(a^{-1}, \infty)$, $(a, 0)$ and $(\infty, \infty)$ all have 4-cyclic neighborhoods, i.e. the neighborhoods of these places on the Riemann surface go through all four sheets. my reason for this is that , say for $(0,\infty)$, $w=\infty$ is the only solution of the equation $f(0,w)=0$. (But it may happen that there are two disjoint ,except at $(0,\infty)$, 2-cyclic neighborhoods, right\wrong ?!)
what if we had a curve such that the equation $f(0,w)=0$ has two solutions , say $w_1$ and $w_2$, how do we know $(0,w_1)$ has a 2-cyclic nighborhood (and hence $(0,w_2)$ also has two) or possibly $(0,w_1)$ has a 3-cyclic nighborhood (and hence $(0,w_2)$ also has a simple 1-cyclic neighborhood) ?
And finally how I should find the genus of the Riemann surface corresponding to (*) ?
I appreciate any help.
Thanks
 A: The genus $g$ of a Riemann surface is found from the Riemann-Hurwitz formula:
$$2g-2=\sum(n_k-1)-2d,$$
where $d$ is the number of sheets, $n_j$ are the orders of ramification points.
In your case, $d=4$, and there are $4$ ramification points, all of order $4$. So the genus is $3$.
The proof of the Riemann-Hurwitz formula is elementary: you make a triangulation
of the $z$-sphere so that your ramification points are among the vertices,
and pull it back on your Riemann surface. Every triangle and every edge has $d$ preimages, and every vertex over $a$ has $d-\Sigma(n_j-1)$ preimages,
where the summation is over ramification points lying over $a$. (Your calculation of $n_j$ was is correct).
Then use Euler's theorem
expressing the Euler characteristic in terms of the numbers of vertices, edges and triangles in a triangulation: $\chi=v-e+f$, where $v,e,f$ are the numbers of
vertices, edges and triangles in a triangulation. The Euler characteristic is related to the
genus by the formula $\chi=2-2g$. 
