# Can one determine in finite time whether a point is $S$-integral

Let $x$ be a $\mathbf{Q}$-rational point of $\mathbf{P}^1-\{0,1,\infty\}$.

Let $S$ be a finite set of primes. How do I check in finite time whether $x$ is $S$-integral or not?

I know how to do this in "infinite time". I just check that $v(x) \geq 0$ for all $v\not \in S$.

-
One can identify $x$ to a rational number. If it has a denominator whose prime divisors all belong to $S$, then $x$ is $S$-integral. The question is how $x$ is given. – user18119 Nov 24 '12 at 9:35