Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose $p(x)\in\mathbb{Z}[x]$. How can we show that the function $b\to$ the least non-negative integer root of $p(x) - b$ is computable (if there is no such root, then the function is undefined)?

One thing I thought of was trying to define the function in terms of a GCD operator or sgn function to show that we have something that is p.r. which is then computable

share|cite|improve this question
up vote 4 down vote accepted

You don't need to work too hard. Let $p(x) \in \mathbb Z[x]$ if $a \in \mathbb Z$ is a root of $p(x)$ then $a \mid c$ where $c$ is the constant term of $p(x)$, this is the rational root theorem. So to find the least positive integer root it suffices to enumerate the divisors of the constant term, which is surely computable and pick the smallest one that satisfies $p(x)$. If no such root exists return null or whatever the fail character is.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.