Let $X$ be a smooth projective connected curve over a number field $k$, and let $S \neq \emptyset$ be a finite set of closed points of $X$. The curve $Y = X \setminus S$ is affine, and we denote by $R$ the $k$-algebra of regular functions on $Y$.


The $S$-unit equation for $k(X)$ is the equation $f+g =1$, with $f,g \in R^\times \setminus k^\times$; in other words $f$ and $g$ are two non-constant rational functions on $X$ whose zeros and poles are contained in $S$.


For example, in the case $Y = \mathbb{P}^1 \setminus \{0,1,\infty\}$, the pair of functions $(f,g) = (t,1-t)$ is a solution of the $S$-unit equation. In fact, if $f$ is an homography preserving $\{0,1,\infty\}$ then $1-f$ has the same property, and $(f,1-f)$ is a solution. So there are at least 6 solutions.


Mason proved that there exists an effecitve bound (depending on the cardinality of $S$ and the genus of $X$) on the degrees of the possible solutions $f,g$; see e.g. Zannier, *Some remarks on the $S$-unit equation in function fields*, Acta Arith. 64 (1993) no. 1, 87--98.


Is it expected that the number of solutions $(f,g)$ is actually finite? Are there methods or algorithms to find these solutions in practice?


I am interested in the following particular cases:


* $X=E$ is an elliptic curve and $S$ is a finite subgroup of $E$;
* $X$ is a modular curve and $S$ is the set of cusps of $X$.



The $S$-unit equation for functions on curves
The set of solutions to the $S$-unit equation for $k(X)$ is finite. Let me explain why. (You can "theoretically" find all solutions, as the finiteness eventually boils down to the "effective" finiteness result of de Franchis-Severi on maps of curves.)


Let $k$ be a number field, let $X$ be a smooth projective geometrically connected curve over $k$, let $S$ be a finite set of closed points of $X$, and let $Y := X \setminus S$. Let $R = \mathcal{O}(Y)$. 


**Claim.** The set of solutions $(f,g)$ of the $S$-unit equation $f+g =1$ for $X$ (with $f$ and $g$ thus in $R^\times \setminus k^\times $ ) is in bijection with the set of non-constant morphisms $Y\to \mathbb{P}^1\_k \setminus \{0,1,\infty\}$. 


*Proof of Claim.* Let $(f,g)$ be a solution of the $S$-unit equation in $k(X)$. Then $f:Y\to \mathbb{G}\_{m,k}$ is a non-constant morphism such that $1-f$ also defines a morphism to $\mathbb{G}\_{m,k}$. Thus $f(Y) \subset \mathbb{G}\_{m,k} \setminus \{1\}$. Conversely, if $f$ is a non-constant morphism from $Y$ to $\mathbb{P}^1\_{k}\setminus \{0,1,\infty\}$, then $1-f$ is also such a morphism. This concludes the proof. QED


Let $K$ be an algebraic closure of $k$. Note that $Hom\_k(Y,C) \subset Hom\_K(Y\_K,C\_K)$. Thus, 
to answer your question, we can work over an algebraically closed field $K$ of characteristic zero. (That is, you can as well let $k$ be any field of characteristic zero.)


The finiteness of the set of solutions will boil down to finiteness results for hyperbolic curves. 
Let me recall what a hyperbolic curve is. From now on, let $K$ be an algebraically closed field of characteristic zero.



> 
> 
> > 
> > **Hyperbolic curves.** Let $C$ be a smooth quasi-projective connected curve over $K$. We say that $C$ is hyperbolic if $2g(\overline{C}) - 2 + \#( \overline{C}\setminus C )>0$. Equivalently, $C$ is non-hyperbolic if and only if $C$ is isomorphic to $\mathbb{P}^1\_K$, $\mathbb{A}^1\_K, \mathbb{A}^1\_{K}\setminus \{0\}$, or a smooth proper connected genus one curve over $K$. 
> > 
> > 
> > 
> 
> 
> 


We will need the following topological lemma on hyperbolic curves. (For your purposes we really just need that $\mathbb{P}^1\_k\setminus \{0,1,\infty\}$ has a finite etale cover of genus at least two. This can be proven by considering $\mathbb{P}^1\_k\setminus \{0,1,\infty\}$ as an (open) modular curve and taking a modular curve of high enough (even) level. 


**Topological Lemma.** If $C$ is a hyperbolic curve over $K$, then there is a finite etale morphism $D\to C$ with $D$ a smooth quasi-projective connected curve over $D$ such that the genus of $\overline{D}$ is at least two. (This is obvious if $\overline{C}$ itself is of genus at least two. Thus, we reduce to the case that $C = \mathbb{P}^1\_K\setminus \{0,1,\infty\}$ or that $C $ is $E\setminus \{0\}$ with $0$ the origin on an $E$ an elliptic curve over $K$. In these two cases, one can explicitly construct $D$.


Hyperbolic curves satisfy many finiteness properties. One of them is the following version of the theorem of De Franchis-Severi. An integral quasi-projective curve is of log-general type if its normalization is of log-general type, i.e., hyperbolic.



> 
> 
> > 
> > **Theorem.** [De Franchis-Severi] Let $C$ be an integral quasi-projective curve over $K$ whose normalization is of log-general type. Then, for every integral quasi-projective curve $Y$ over $K$, the set of non-constant morphisms $Y\to C$ is finite.
> > 
> > 
> > 
> 
> 
> 


*Proof of Theorem.* Note that the normalization $\widetilde{Y}\to Y$ is surjective. Therefore, replacing $Y$ by its normalization if necessary, we may and do assume that $Y$ is smooth. Now, every non-constant morphism $Y\to C$ is dominant and will factor uniquely over the normalization of $C$. Thus, we may and do assume that $C$ is smooth. 


Now, we use the Topological Lemma. Thus, let $D\to C$ be a finite etale morphism with $D$ of genus at least two. Let $d:=\deg(D/C)$. If $Y\to C$ is a morphism, then the pull-back $Y':=Y\times\_C D$ is finite etale of degree $d$ over $Y$. Since $K$ is algebraically closed of characteristic zero, the set of $Y$-isomorphism classes of finite etale covers $Y'\to Y$ of degree $d$ is finite. Thus, we may and do assume that $C=D$. Now, note that every non-constant morphism $Y\to C$ extends to a non-constant morphism $\overline{Y}\to \overline{C}$. However, there are only finitely many such maps as $\overline{C}$ is of genus at least two. QED


**Remark.** In the last paragraph of the previous proof we use the finiteness theorem of de Franchis-Severi for compact connected Riemann surfaces of genus at least two. (It just happens to be that this "compact" version implies the analogous "affine" version. This is no longer true in higher dimensions.) The "compact" finiteness result also holds in higher dimensions: if $C$ is a proper variety of general type and $Y$ is a proper variety, then the set of dominant rational maps $Y\dashrightarrow C$ is finite. This was proven by Kobayashi-Ochiai. (You can use this to show that, for every integral quasi-projective variety $Y$ over $K$, the set of non-constant morphisms $Y\to \mathbb{P}^1\_K\setminus\{0,1,\infty\}$ is finite.)


