Rational polynomials I'm not very familiar with algebra and was wondering if there are any results regarding the effective order of rational polynomials (i.e. rational functions). 
Specifically: given $P(z)$ and $Q(z)$ as polynomials in $z$ with real coefficients of order $p$ and $q$ respectively, is there a way to know the effective order of the rational function $P(z)Q^{-1}(z)$  - by which I mean to know if there are $r$ roots shared by the numerator and denominator that cancel each other out resulting in a smaller rational polynomial of order $p-r, q-r$? 
More importantly, can this be done  without explicit factorization ? I just want to know the value of $r$ without knowing the roots or the reduced polynomials.

Euclid's GCD algorithm can be used to find common factors between two polynomials.  For instance:
$$
\begin{align}
\gcd(x^3 + 1, x^4 + x^2 + 1) & = \gcd(x^3 + 1, x^4 + x^2 + 1 - x(x^3 + 1))
\\ & = \gcd(x^3 + 1, x^2 - x + 1)
\\ & = \gcd(x^3 + 1 - x(x^2 - x + 1), x^2 - x + 1)
\\ & = \gcd(x^2 - x + 1, x^2 - x + 1)
\\ &= \gcd(x^2 - x + 1, 0)
\\ &= x^2 - x + 1
\end{align}
$$
So $x^2 - x + 1$ is the greatest common factor between $x^3 + 1$ and $x^4 + x^2 + 1$.
