Let $X$ be a compact Riemann surface of genus $g\geq 2$. By the Riemann-Roch theorem, $X$ is a branched cover of the sphere, branched over finitely many branched values. What is the smallest number of such values, for general $X$ of genus $g$?


Since moduli space has complex dimension $3g-3$, and branched covers branched over $B$ points are contained in the union of countably many varieties of dimension at most $B-3$, for general $X$ we need at least $3g$ branched values.


Riemann-Roch shows that there is a holomorphic $X\to\hat{\mathbb{C}}$ of degree $g+1$ having a single pole, of degree $g+1$. By Riemann-Hurwitz, this function has $4g$ critical points, of which $g$ are over infinity. So in total there are at most $3g+1$ critical values. So my question becomes:


**Question.** Let $X$ be a compact Riemann surface of genus $g\geq 2$. Is there a holomorphic function $f\colon X\to \hat{\mathbb{C}}$ which has at most $3g$ critical values?


It is plausible that the answer is positive, but in either case the answer is surely known. Does anyone know a reference?


I have been told that Brill-Noether theory shows the existence of a meromorphic function of degree $\lfloor(g+3)/2\rfloor$ on $X$. For even $g$, applying Riemann-Hurwitz then shows that there are $3g$ critical points for this function. That answers the question in the positive for even $g$. But for odd $g$, we get the same number $3g+1$ as via Riemann-Roch.



Branched covers of the sphere branched over few points
Let me post my comment as an answer. Take a Weierstrass point on $X$, that is, a point $P$ for which there exists a meromorphic function $f$ with a pole of order $k\leq g$ at $P$ (there always exists such a point). Then apply the argument in the post: by Riemann-Hurwitz the number of critical points of $f$, counted with multiplicity, is $2g-2+2k$. But $P$ appears with multiplicity $k-1$ in this count, so the number of critical values outside $\infty$ is $\leq 2g-2+2k-(k-1)=2g+k-1$, and the total number of critical values is $\leq 2g+k\leq 3g$.


