On Conditional Probabilities of Factoring Quadratics

Factoring quadratics over  is a staple of introductory algebra and text-books tend to create the impression that doable factorizations are fairly common. To the contrary, if coefficients of a general quadratic are selected randomly without restriction, the probability that a factorization exists is zero. We achieve a specific quantification of the probability of factoring quadratics by taking a new approach that considers the absolute size of coefficients to be a parameter n. This restriction allows us to make relative likelihood estimates based on finite sample spaces. Our probability estimates are then conditioned on the size parameter n and the behavior of the conditional estimates may be studied as the parameter is varied. Specifically, we enume-rate how many formal factored expressions could possibly correspond to a quadratic for a given size parameter. The conditional probability of factorization as a function of n is just the ratio of this enumeration to the total number of possible quadratics consistent with n. This approach is patterned after the well-known case where factorizations are carried out over a finite field. We review the finite field method as background for our method of dealing with [ ] x  . The monic case is developed independently of the general case because it is simpler and the resulting probability estimating formula is more accu-rate. We conclude with a comparison of our theoretical probability estimates with exact data generated by a computer search for factorable quadratics corresponding to various parameter values.


Introduction
This paper presents the preliminary results of a broader program to estimate the How to cite this paper: Beatty, T. and von Linden, G. (2020) On Conditional Probabilities of Factoring Quadratics. Advances in Pure Mathematics, 10, 114-124.
https://doi.org/10.4236/apm.2020.103008 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 [ ] 2 x x x α β γ + + ∈ 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 ( ) P n 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 that have non-negative roots. Figure 1 shows factorization probabilities calculated by the computer search. Currently we have no formula that estimates the case [ ] 2 ax bx c x + + ∈ with 0 α ≠ other than curve fitting. The trend in the graph in Figure 1 is borne out by the following proposition.

Proposition 0
If , , a b c ∈  are selected randomly without restriction, then the probability of factoring 2 ax bx c + + over  is zero.
Proof. Suppose we are given  one of these squares coincides with a value of ∆ is therefore no more than an a n n < + . As the provisional restriction that [ ] , c n n ∈ − is relaxed by allowing n → ∞ , we see 1 2 0 a n → . It follows that the probability that ∆ is a perfect square, and therefore 2 ax bx c + + is factorable over  , is zero in the limit, which corresponds to no restrictions at all on c. Since this is true for any triple ( ) , , a b c , 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.

Factoring
Now let us generalize to an arbitrary quadratic.

Corollary 1-1
If Proof. Evidently there are ( ) 2 1 p p − possible triples of coefficients, but we can mimic the above proof by rewriting Once again, the probability of factoring a random quadratic, not necessarily monic, would be ( )

Corollary 1-3
The limit as p → ∞ of the probability n p P of factoring a quadratic over Proof. This follows immediately from the fact that the limit as p → ∞ 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 experimen-T. Beatty, G. von Linden tal 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 

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 2 1 x ax + + , where α is random. There are only two hopes for factorization: 2 α = ± . 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 2 37 1 x x + + does not have this property, which is informal at the moment, but which will soon be made precise. On the other hand, both 2 1 x x + + and 2 2 1 x x + + 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"  α > + 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 ( ) the domain of φ will be relatively small, so surjectivity will clearly be out of the question. We would like φ to be injective, and since ( ) ( )

Corollary 2-1
With the notation of Proposition 2, ( ) P n is asymptotically ln 2 n n .
Proof. Divide numerator and denominator of ( )( ) Unsurprisingly, letting n → ∞ corresponds to α and β being chosen completely arbitrarily and we confirm that We have proved:

Given a random quadratic in
[ ]

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 2  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 3  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 [ ] x  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 a c = ). This overstates the calculated probability of factorization, especially for small n, so we may regard ( ) P n in this case as an upper bound for the true probability. In any case, our formula establishes ( ) 0 P ∞ = .
Below in Figure 3 a graph of the calculated ( ) P n versus n is shown as the continuous curve. The separate data points correspond to = 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.