Take the 2-minute tour ×
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.

Suppose p(x) an element of Z[x]. How can we show that the function b --> the least non-negative integer root of p(x) - b is computable (if there is no such root, then the function is undefi ned)?

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|improve this question

1 Answer 1

up vote 3 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|improve this answer

Your Answer

 
discard

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.