1. Introduction
This paper presents the preliminary results of a broader program to estimate the probabilities of factoring more general polynomials over
. We anticipate that subsequent research will develop along the lines suggested by the quadratic case investigated here, specifically by using the method of parameterizing the maximum absolute value of coefficients and correlating the conditional probabilities of factorization with the size of the parameter.
The probability that a given general quadratic
can be factored depends heavily on the commensurability of the coefficients [1] [2] [3]. Loosely speaking, if the coefficients are all about the same size in absolute value, and that size is small, the existence of a factorization is relatively more likely than otherwise. Our intention is to quantify this phenomenon. Dealing with the infinite number of choices available for coefficients is a problem. We sidestep this obstacle by adapting the method used to determine the probability of factorization of quadratics over finite fields. Briefly, we establish a cutoff, or size parameter n, for the absolute value of any coefficients appearing in any of the quadratics we wish to study. This makes the number of quadratics under consideration finite as well as the number of formal factored expressions that could possibly yield such a quadratic. Then the classical probability is just the ratio of the number of admissible factored expressions to the total number of quadratics which conform to the cutoff. This probability
is, of course, a conditional probability given that the coefficients do not exceed n in absolute value. So the infinite character of the problem is initially made finitary where calculations can be done and then can be recovered by allowing n to approach infinity.
We consider three cases, the first of which, factoring quadratics over finite fields, is well-known [4]. For factoring quadratics over
, we split the discussion into two parts: 1) the monic case, and 2) the general case. For simplicity we consider quadratics in
that have non-negative roots.
Figure 1 shows factorization probabilities calculated by the computer search. Currently we have no formula that estimates the case
with
other than curve fitting. The trend in the graph in Figure 1 is borne out by the following proposition.
Proposition 0
If
are selected randomly without restriction, then the probability of factoring
over
is zero.
Proof. Suppose we are given
with
selected at random. This quadratic factors over
, hence
by Gauss’ Lemma, if the discriminant
is a perfect square. We ask what is the probability that
is a perfect square if a and b have been selected and c is provisionally allowed to range over
for some
. Then there are
possible values of
spread over an interval of length
. The largest possible number of perfect squares in such an interval would occur when none of the interval intersected the open left half line and where the arithmetic density of squares was the greatest. This would occur if the interval were exactly
. The number of squares in this interval does not exceed
. The classical probability that
Figure 1.
is the probability of factoring
with
.
one of these squares coincides with a value of
is therefore no more than
. As the provisional restriction that
is relaxed by allowing
, we see
. It follows that the probability that
is a perfect square, and therefore
is factorable over
, is zero in the limit, which corresponds to no restrictions at all on c. Since this is true for any triple
, the proposition is established.
We wish to have a more granular understanding of the way in which factorability depends on commensurability of coefficients. Our approach to this question is motivated by solving the factorization probability problem in the context of finite fields, which we review below.
2. Factoring Over
Suppose we are given a random monic quadratic over the finite field
. What is the likelihood that it factors [5] ?
2.1. Proposition 1
If
and
, then the probability
of factoring
over
is
.
Proof. There are
possible pairs of coefficients, hence
distinct quadratics. On the other hand, if f factors as
, then there are p factorizations where
and
distinct factorizations where
, allowing for interchanging the factors.
is the ratio of possible factorizations to possible quadratics, so
.
Now let us generalize to an arbitrary quadratic.
2.2. Corollary 1-1
If
and
, then the probability
of factoring
over
is
.
Proof. Evidently there are
possible triples of coefficients, but we can mimic the above proof by rewriting
. Now the possible factorizations would look like
. Once again, the probability of factoring a random quadratic, not necessarily monic, would be
.
2.3. Corollary 1-2
If
and
, then the probability
of factoring
over
is
.
Proof. Following the proof for the preceding, we have
possible triples of coefficients, and
possible factorizations. Hence
.
2.4. Corollary 1-3
The limit as
of the probability
of factoring a quadratic over
is
.
Proof. This follows immediately from the fact that the limit as
of the expression in Corollary 1-2 is independent of n.
The situation we see embodied in Proposition 1 and its corollaries is somewhat unexpected (at least the first time it is considered) and in any case very different from factoring over
. It is a mildly entertaining exercise in experimental mathematics to choose a large prime p and ask a computer algebra system to factor several random quadratics with large coefficients modulo p. Superficially, since p is large, it seems that the chances for a factorization would be about the same as if the factorization were to be done over
, namely poor. But in the long run, about half of the test examples result in factorizations. Although it would defeat the whole purpose of our discussion of the enumeration method for factorization probabilities in the finite field case, a short proof of Proposition 1 can be gotten directly from number theory. The quadratic equation
can be simplified by completing the square, leaving a constant on the right hand side. Among the
non-zero least residues modulo p,exactly
are quadratic residues. The constant needs to be a quadratic residue so that roots can be found to construct a factorization. Zero is always a quadratic residue, so there are
quadratic residues in all. On the other hand, there are p least residues modulo p, hence the probability that a randomly chosen least residue is in fact a quadratic residue is
as above.
3. Factoring Over
-Monic Case
We would like to adapt the same argument for factoring over
as we used for finite fields, namely counting up the number of possible distinct factorizations and dividing by the number of distinct quadratic expressions to get a probability of being able to factor. Since
is infinite this plan is immediately hobbled [6]. Consider the polynomial
, where
is random. There are only two hopes for factorization:
. Yet there are infinitely many choices for
, so the probability of factorization is evidently zero. To salvage any insight from this state of affairs, we have to content ourselves with a conditional probability based on limiting how “random” a random quadratic can be. A reasonable choice is to insist that its coefficients be commensurable with its possible zeroes. Clearly
does not have this property, which is informal at the moment, but which will soon be made precise. On the other hand, both
and
seem to have it. In one case there is a factorization, in the other not. This conditional probability will be based on a relative likelihood calculation where the commensurability condition is quantified by a parameter. As the parameter increases, the commensurability decreases, and the probability of factorization will tend to zero. The point of our approach is to model the detailed behavior of this process. To introduce the specifics in a simple context, we first consider monic quadratics with the restriction that they have non-negative roots.
Let us define a “window of feasibility”
in the plane as the rectangle of grid points
. Suppose we are given a random
of the form
with
and
. If
factors as
both roots are nonnegative and
and
. If
these conditions imply that
, and in the event
we impose this condition arbitrarily to ensure that all
satisfying these conditions can be mapped in the obvious way to
. At the moment we have every point in
as the image of some
with
. Clearly this is a bijective mapping. We call
a window of feasibility since any
with
and
is necessarily impossible to factor. The motivation for constructing the window is to exclude those cases which overwhelm ordinary probability calculations. A quadratic inside the window may or may not be factorable, but if not, the reason will not be due to incommensurability of coefficients. Figure 2 shows this situation.
Note that a grid point of the form
corresponds to the quadratic
, so factorization is always possible. A grid point of the form
, provided
corresponds to the quadratic
, which never factors.
Now denote by
the grid points in
corresponding to factorable polynomials. A factorable quadratic mapped to
must have
and
for some
. Let us then plot pairs of roots on the
grid and define
as the mapping that associates a root pair to the quadratic which factors with those roots. We will see shortly that there are substantial limitations on which points in
can be root pairs. In other words,
Figure 2. Window of Feasibility for
. Grid points in shaded area are possible root pairs.
the domain of
will be relatively small, so surjectivity will clearly be out of the question. We would like
to be injective, and since
we impose the condition
without loss of generality. Graphically, this amounts to eliminating all root pairs strictly above the line
. Now
is still not
since there is another important condition on the root pairs, namely
. The only admissible root pair grid points whenever
are also below the hyperbola
. This is also true trivially if
so the hyperbola is an upper bound for all root pairs corresponding to factorable quadratics. Now we estimate the number of points in
by calculating the area inside the region of the plane defined by the line
, the line
, and the hyperbola
. The area of this region is
. We estimate the number of grid points in
by assuming one grid point per unit of area. This estimate is asymptotically exact. Now
has
total grid points. Finally, our conditional probability estimate is
. We have proved:
3.1. Proposition 2
Given a random quadratic in
of the form
, where
, the approximate probability
of factorization, subject to the conditions
and
for fixed
, is given by
.
3.2. Corollary 2-1
With the notation of Proposition 2,
is asymptotically
.
Proof. Divide numerator and denominator of
by n to get
. Note that for large n we have
and
. Hence
implies
.
Unsurprisingly, letting
corresponds to
and
being chosen completely arbitrarily and we confirm that
by L’Hôpital’s rule. The rate at which the likelihood of factorization declines is
for large n, as would be expected.
For perspective, if
, the corresponding likelihood of factorability
.
4. Factoring over
-General Case
Consider the lattice cube
as the three-dimensional analog of the preceding window of feasibility. The general quadratic [7]
with
can be associated injectively with the point
provided
. Since
, there are
grid points in
which represent distinct quadratics of this type. We would like to estimate the number of these which are factorable so that we can calculate the conditional probability
of factorability in the manner of the finite field and monic cases above. Suppose
does factor in
as
, with
and
. Note that the greatest common divisor of
and
does not appear as a separate factor but is considered to be bundled into the term
. Then
,
, and
. Since the maximum
is n, it follows that admissible pairs
would satisfy
. As in the monic case, we embed
in
, calculate the appropriate area under the given hyperbola, and then assume one grid point (admissible pair) per unit of area with the understanding that this is asymptotically correct. The area in the first quadrant of the ac plane is
. Since the maximum
is n, but either b or d (or both) could be zero, the appropriate area in the first quadrant of the bd plane would be
. Evidently there are
expressions of the form
which could factor the quadratic
subject to the constraints imposed on those coefficients. Certainly not every point in
corresponds to a factorable quadratic, but we can be assured that any points which are associated with a factorable quadratic have a factorization counted by
. Since the factor pairs commute, we divide
by two and it follows that the conditional probability of factorization is estimated by
.
We have proved:
4.1. Proposition 3
Given a random quadratic in
of the form
, where
and
, an estimate for the probability
of factorization is given by
.
4.2. Corollary 3-1
With the notation of Proposition 3,
is asymptotically
.
Table 1. Actual vs. Calculated-Monic Case.
n = coefficient bound; Calc = calculated P(n); Actual = actual P(n) by computer check.
Table 2. Actual vs. Calculated-General Case.
n = coefficient bound; Calc = calculated P(n); Actual = actual P(n) by computer check.
Figure 3. Probability of factoring P(n) vs. absolute coefficient bound n actual vs. calculated.
Proof. For
,
.
As expected,
again by L’Hôpital’s rule.
5. Summary & Conclusions
We have described two methods for estimating the conditional probability that a random quadratic in
with non-negative bounded coefficients can be factored as a function of the bounding parameter. The simpler case is based on mapping monic quadratics injectively to a two-dimensional lattice in
and enumerating the formal expressions that could possibly represent factorizations of them. The ratio of the number of admissible formal factorizations to the total number of points in the lattice defines the conditional probability of factorization for the given coefficient bound. The more complicated case involves mapping general quadratics to a three-dimensional lattice in
and reprising the calculation for the two-dimensional case. Both methods have their provenance in the problem of calculating the likelihood that a quadratic over a finite field may be factored. In the case of finite fields, only a finite number of polynomials are possible and only a finite number of factorizations can be written, making the calculation a simple ratio. This fails, of course, for
, but the point of our method is to resurrect the utility of finiteness by imposing a size limitation on coefficients [8].
Table 1 presents a comparison of values from the monic formula for conditional probability given by Proposition 2 with a computer generated census of factorable monic quadratics. There is reasonably close agreement, even for small n. The computer algorithm works by simply checking to see if the quadratic formula yields a rational number. Recall if a polynomial in
factors over
, then it factors over
.
Table 2 recaps a similar comparison for the general quadratics in Proposition 3. For the sake of simplicity we have ignored double counting certain factored expressions arising from symmetries (for example if
). This overstates the calculated probability of factorization, especially for small n, so we may regard
in this case as an upper bound for the true probability. In any case, our formula establishes
.
Below in Figure 3 a graph of the calculated
versus n is shown as the continuous curve. The separate data points correspond to Table 1. The expected feature that
is also evident.
To close on a philosophical note, although factorization of random quadratics over
has been shown to be a progressively futile exercise, practicing pattern recognition with doable examples for small n is a worthwhile exercise that no doubt pays dividends elsewhere in mathematics.