Randomization and Faster Real Root Counting

Randomization, Sums of Squares, and Faster Real Root Counting for Tetranomials and Beyond
July 6, 2019

Osbert Bastani Christopher J. Hillar Dimitar Popov  and  J. Maurice Rojas Harvard University, Massachusetts Hall, Cambridge, MA  02138 hypo3400@gmail.com Redwood Center for Theoretical Neuroscience, 575A Evans Hall, MC 3198 Berkeley, CA  94720-3198. chillar@msri.org MIT, 77 Mass. Ave., Cambridge, MA  02139 dpopov@mit.edu TAMU 3368, Texas A&M University, College Station, TX  77843-3368 rojas@math.tamu.edu

Suppose is a real univariate polynomial of degree with exactly monomial terms. We present an algorithm, with complexity polynomial in on average (relative to the stable log-uniform measure), for counting the number of real roots of . The best previous algorithms had complexity super-linear in . We also discuss connections to sums of squares and -discriminants, including explicit obstructions to expressing positive definite sparse polynomials as sums of squares of few sparse polynomials. Our key tool is the introduction of efficiently computable chamber cones, bounding regions in coefficient space where the number of real roots of can be computed easily. Much of our theory extends to -variate -nomials.

Bastani and Popov were partially supported by NSF REU grant DMS-0552610. Hillar was partially supported by an NSF Postdoctoral Fellowship and an NSA Young Investigator grant. Rojas was partially supported by NSF CAREER Grant DMS-0349309, a Wenner Gren Foundation grant, Sandia National Laboratories, and MSRI

1. Introduction

Counting the real solutions of polynomial equations in one variable is a fundamental ingredient behind many deeper tasks and applications involving the topology of real algebraic sets. However, the intrinsic complexity of this basic enumerative problem becomes a mystery as soon as one considers the input representation in a refined way. Such complexity questions have practical impact for, in many applications such as geometric modelling or the discretization of physically motivated partial differential equations, one encounters polynomials that have sparse expansions relative to some basis. So we focus on new, exponential speed-ups for counting the real roots of certain sparse univariate polynomials of high degree.

Sturm sequences [Stu35], and their later refinements [Hab48, BPR06], have long been a centrally important technique for counting real roots of univariate polynomials. In combination with more advanced algebraic tools such as a Gröbner bases or resultants [GKZ94, BPR06], Sturm sequences have even been applied to algorithmically study the topology of real algebraic sets in arbitrary dimension (see, e.g., [BPR06, Chapters 2, 5, 11, and 16]). However, as we will see below (cf. Examples 1.1 and 1.2), there are obstructions to attaining polynomial intrinsic complexity, for sparse polynomials, via Sturm sequences. So we must seek alternatives.

More recently, relating multivariate positive polynomials to sums of squares has become an important algorithmic tool in optimizing real polynomials over semi-algebraic domains [Par03, Las09]. However, there are also obstructions to the use of sums of squares toward speed-ups for sparse polynomials (see Theorem 1.5 below).

Discriminants have a history nearly as long as that of Sturm sequences and sums of squares, but their algorithmic power has not yet been fully exploited. Our main result is that -discriminants [GKZ94] yield an algorithm for counting real roots, with average-case complexity polynomial in the logarithm of the degree, for certain choices of probability distributions on the input (see Theorem 1.4 below). The use of randomization is potentially inevitable in light of the fact that even detecting real roots becomes -hard already for moderately sparse multivariate polynomials [BRS09, PRT09].

1.1. From Large Sturm Sequences to Fast Probabilistic Counting

The classical technique of Sturm Sequences [Stu35, BPR06] reduces counting the roots of a polynomial in a half-open interval to a gcd-like computation, followed by sign evaluations for a sequence of polynomials. A key difficulty in these methods, however, is their apparent super-linear dependence on the degree of the underlying polynomial. Consider the following two examples (see also [RY05, Example 1]).

Example 1.1.

Setting , the realroot command in Maple 14111Running on a 16GB RAM Dell PowerEdge SC1435 departmental server with 2 dual-core Opteron 2212HE 2Ghz processors and OpenSUSE 10.3. (which is an implementation of Sturm Sequences) results in an out of memory error after about seconds. The polynomials in the underlying computation, while quite sparse, have coefficients with hundreds of thousands of digits, thus causing this failure. On the other hand, via more recent work [BRS09], one can show that when and , has exactly , , or positive roots according as is less than, equal to, or greater than . In particular, our has exactly positive roots. (We discuss how to efficiently decide the size of monomials in rational numbers with rational exponents in Algorithm 2.15 of Section 2.3 below.)

Example 1.2.

Going to tetranomials, consider with . Then (via the classical Descartes’ Rule of Signs [RS02, Cor. 10.1.10, pg. 319]) such an has exactly or positive roots, but the inequalities characterizing which yield either possibility are much more unwieldy than in our last example: there are at least , involving polynomials in and having tens of thousands of terms. In particular, for , Sturm sequences on Maple 14 result in an out of memory error after about 122 seconds.

We have discovered that -discriminants, reviewed in Section 2, enable algorithms with complexity polynomial in the logarithm of the degree.

Definition 1.3.

For any , we define and let the stable log-uniform measure on (resp. ) be the probability measure (resp. ) defined as follows: (resp. ), where denotes the standard Lebesque measure on and denotes set cardinality.

Note that the stable log-uniform measure is finitely additive (but not countably additive), and is invariant under reflection across coordinate hyperplanes.

Theorem 1.4.

Let be positive integers,

with being independent stable log-uniform random variables chosen from (resp. ), and define . Then there is a deterministic algorithm, with complexity polynomial in (resp.  and ), that computes a number in that, with probability , is exactly the number of real roots of . The underlying computational model is the BSS model over (resp. the Turing model).

The key idea is that while the regions of coefficients determining polynomials with a constant number of real roots become more complicated as the number of monomial terms increases, one can nevertheless efficiently characterize large subregions — chamber cones — where the number of real roots is very easy to compute. This motivates the introduction of probability and average-case complexity. The -discriminant allows one to make this approach completely precise and algorithmic. In fact, our framework enables us to transparently extend Theorem 1.4 to -variate -nomials (see Theorem 3.18 of Section 3.3).

Our focus on the stable log-uniform measure simplifies our development and has some practical motivation: when one considers -bit floating-point numbers with uniformly random exponent and mantissa, taking and suitably rescaling yields exactly the stable log-uniform measure on . The stable log-uniform measure has also been used in work of Avendaño and Ibrahim to study the expected number of roots of sparse polynomial systems over local fields other than [AI11].

It is of course quite natural to ask how the expected complexity in Theorem 1.4 behaves under other well-known measures, e.g., uniform or Gaussian. Unfortunately, the underlying calculations become much more complicated. On a deeper level, it is far from clear what a truly “natural” probability measure on the space of tetranomials is. For instance, for non-sparse polynomials, it is popular to use specially weighted independent Gaussian coefficients since the resulting measure becomes invariant under a natural orthogonal group action (see, e.g., [Kos88, SS96, BSZ00]). However, we are unaware of any study of the types of distributions occuring for the coefficients of polynomials actually occuring in physical applications.

The speed-ups we derive actually hold in far greater generality: see [BRS09, PRT09] for the case of -variate -nomials with , Section 3 here for connections to -variate -nomials, the forthcoming paper [AAR11] for the general univariate case, and the forthcoming paper [PRRT11] for chamber cone theory for sparse polynomial systems. One of the main goals of our paper is thus to illustrate and clarify the underlying theory in a non-trivial special case. We now state our second main result.

1.2. Sparsity and Univariate Sums of Squares

Recent advances in semidefinite programming have produced efficient algorithms for finding sum of squares representations of certain nonnegative polynomials, thus enabling efficient polynomial optimization under certain conditions. When the input is a sparse polynomial it is then natural to ask if there is a sum of squares representation that also respects sparseness. Indeed, it is well-known that a nonnegative univariate polynomial can always be written as a sum of two squares of, usually non-sparse, polynomials (see, e.g., [Pou71] for refinements). The following result demonstrates that a sparse analogue is either unlikely or much more subtle.

Theorem 1.5.

There do not exist absolute constants and with the following property: Any trinomial that is positive on can be written in the form , for some with having at most terms for all .

Were there to be a sufficiently efficient representation of positive sparse polynomials as sums of squares, one could then try to use semidefinite programming to find such a representation explicitly for a given polynomial. This in turn could yield an efficient reduction from deciding the existence of real roots to a (small) semidefinite programming problem, similar to the techniques of [Par03]. Our last theorem thus reveals an obstruction to this sums of squares approach.

1.3. Related Approaches

The best known algorithms for real root counting lack speed-ups for sparse polynomials like the average-case complexity bound from our first main result. For example, in the notation of Theorem 1.4, [LM01] gives an arithmetic complexity bound of which, via the techniques of [BPR06], yields a bit complexity bound super-linear in . No algorithm with complexity polynomial in (deterministic, randomized, or average-case) appears to have been known before for tetranomials. (See [HTZEKM09] for recent speed benchmarks of univariate real solvers.)

As for alternative approaches, softening our concept of sparse sum of squares representation may still enable speed-ups similar to Theorem 1.4 via semidefinite programming. For instance, one could ask if a positive trinomial of degree always admits a representation as a sum of squares of polynomials with terms. This question appears to be completely open.

Example 1.6.

Observe that a quick derivative computation yields that

attains a unique minimum value of at . So this is nonnegative. On the other hand, one can prove easily by induction that , thus yielding an expression for as a sum of binomials with .

Note also that while we focus on speed-ups that replace the polynomial degree by in this paper, other practically important speed-ups combining semidefinite programming and sparsity are certainly possible (see, e.g., [Las06, KM09]).

2. Background

2.1. Amoebae and Efficient -Discriminant Parametrization

Let us first brieflyreview two important constructions by Gelfand, Kapranov, and Zelevinsky.

Definition 2.1.

Let , let have cardinality , and define the corresponding family of (Laurent) polynomials
where the notation is understood. When for all then we call the support of , also using the notation .

Definition 2.2.

For any field we let . Given any , we then define its amoeba, , to be .

Archimedean Amoeba Theorem.

(weaker version of [GKZ94, Cor. 1.8]) Following the notation of Definition 2.2, the complement of in is a finite disjoint union of open convex sets.

An example of an amoeba of a bivariate polynomial (see Example 2.5 below) appears in the right-hand illustration. While the complement of the amoeba (in white) appears to have convex connected components, there are in fact : the fourth component is a thin sliver emerging further below from the downward pointing tentacle.

Definition 2.3.

Following the notation of Definition 2.1 and letting , we define — the -discriminant variety [GKZ94, Chs. 1 & 9–11] — to be the closure of the set of all such that

has a solution in . We then define (up to sign) the -discriminant, , to be the (irreducible) defining polynomial of when is a hypersurface. Finally, we let denote the real part of .

Remark 2.4.

The considered in this paper will all ultimately be hypersurfaces.

Example 2.5.

Taking , we see that
consists simply of polynomials of the form . The underlying -discriminant is then a polynomial in the having monomial terms and degree . However, while is unwieldy, we can still easily plot the real part of its zero set via the Horn-KapranovUniformization (see its statement below, and the illustration to the right).      

The plotted curve above is the image of the real roots of under the map, i.e., the amoeba of . Amoebae give us a convenient way to introduce polyhedral/tropical methods into our setting. For our last example, the boundary of is contained in the curve above.

-discriminants are notoriously large in all but a few restricted settings. For instance, the polynomial defining the curve above has the following coefficient for : 903947086576700909448402875044761267196347419431440828445529608410806270
…[2062 digits omitted]… …93441588472666704061962310429908170311749217550336.
Fortunately, we have the following theorem, describing a one-line parametrization of .

The Horn-Kapranov Uniformization.

(See [Kap91], [PT05], and [DFS07, Prop. 4.1].)

Given with a hypersurface, the discriminant locus is exactly

the closure of

Thus, once we know the null-space of an matrix, we have a formula parametrizing . Recall that for any two subsets , their Minkowski sum is. Also, for any matrix , we let denote its transpose.

Corollary 2.6.

Following the notation above, let denote the matrix whose column has coordinates corresponding to , let be any real matrix whose columns are a basis for the right null-space of , and define via . Then is the Minkowski sum of the row space of and .

If one is familiar with elimination theory, then it is evident from the Horn-Kapranov Uniformization that discriminant amoebae are subspace bundles over a lower-dimensional amoeba. This is a geometric reformulation of the homogeneities satisfied by the polynomial .

Example 2.7.

Continuing Example 2.5, we observe that has right null-space generated by the respective transposes of and . The Horn-Kapranov Uniformization then tells us that is simply the closure of the rational surface . Note that and have the same roots and that is a well-defined bijection on that preserves sign. Note also that the roots of and differ only by a scaling when has real coefficients, and that is of the form . It then becomes clear that we can reduce the study of to a lower-dimensional slice: intersecting with the plane defined by yields the following parametrized curve in :. In other words, the preceding curve is the closure of the set of all such that has a degenerate root in . Our preceding illustration of the image of within (after taking log absolute values of coordinates) thus has the following explicit parametrization:

A geometric fact about amoebae that will prove quite useful here is the following elegant quantitative result of Passare and Rullgård. Recall that the Newton polytope of a Laurent polynomial is the convex hull of222i.e., smallest convex set containing… the exponent vectors appearing in the monomial term expansion of .

Passare-Rullgård Theorem.

[PR04, Cor. 1] Suppose has Newton polygon . Then .

2.2. Discriminant Chambers and Cones

-discriminants are central in real root counting because the real part of determines where, in coefficient space, the real zero set of a polynomial changes topology. Recall that a cone in is any subset closed under addition and nonnegative linear combinations. The dimension of a cone is the dimension of the smallest flat containing .

Definition 2.8.

Suppose has cardinality and is a hypersurface. We then call any connected component of the complement of in a (real) discriminant chamber. Also let denote the matrix whose column has coordinates corresponding to and let be any real matrix with invertible. If contains an -dimensional cone then we call an outer chamber (of ). All other chambers of are called inner chambers (of ). Finally, we call the formal expression a monomial change of variables, and we refer to images of the form (with an inner or outer chamber) as reduced chambers.

It is easily verified that . The latter notation simply means the image of under right multiplication by the matrix .

Example 2.9.

The illustration from Example 2.5 shows partitioned into what appear to be convex and unbounded regions, and non-convex unbounded region. There are in fact convex and unbounded regions, with the fourth visible only if the downward pointed spike were allowed to extend much farther down. So results in exactly reduced outer chambers.

Note that exponentiating by any as above yields a well-defined multiplicative homomorphism from to when has rational entries with all denominators odd. In particular, the definition of outer chamber is independent of , since (for the considered above) is unbounded and convex iff is unbounded and convex, where is any matrix whose columns are a basis for the orthogonal complement of the row space of .

One can in fact reduce the study of the topology of sparse polynomial real zero sets to representatives coming from reduced discriminant chambers. A special case of this reduction is the following result.

Lemma 2.10.

(See [DRRS07, Prop. 2.17].) Suppose has elements, is not contained in any -flat, has cardinality for all facets of , all the entries of have odd denominator, and is invertible. Also let have respective real coefficient vectors and with and lying in the same reduced discriminant chamber. Then all the complex roots of and are non-singular, and the respective zero sets of and in are diffeotopic. In particular, for , we have that either and have the same number of positive roots or and have the same number of positive roots.

2.3. Integer Linear Algebra and Linear Forms in Logarithms

Certain quantitative results on integer matrix factorizations and linear forms in logarithms will prove crucial for our main algorithmic results.

Definition 2.11.

Let denote the set of matrices with all entries integral, and let denote the set of all matrices in with determinant (the set of unimodular matrices). Recall that any matrix with for all is called upper triangular.

Given any , we then call an identity of the form , with upper triangular and , a Hermite factorization of . Also, if we have the following conditions in addition:

  1. for all .

  2. for all , if is the smallest such that then for all .

then we call the Hermite normal form of .

Proposition 2.12.

We have that for any . Also, for any field , the map defined by , for any unimodular matrix , is an automorphism of .

Theorem 2.13.

[Sto00, Ch. 6, Table 6.2, pg. 94] For any with , the Hermite factorization of can be computed within bit operations. Furthermore, the entries of all matrices in the Hermite factorization have bit size .

The following result is a very special case of work of Nesterenko that dramatically refines Baker’s famous theorem on linear forms in logarithms [Bak77].

Theorem 2.14.

(See [Nes03, Thm. 2.1, Pg. 55].) For any integers with for all , define . Then is bounded above by .

The most obvious consequence of lower bounds for linear forms in logarithms is an efficient way to determine the signs of monomials in integers.

Algorithm 2.15.

Input: Positive integers and with for all .
Output: The sign of .

  1. Check via gcd-free bases (see, e.g., [BS96, Sec. 8.4]) whether . If so, output “They are equal.” and STOP.

  2. Let and

  3. For all (resp. ), let (resp. ) be a rational number agreeing with (resp. ) in its first (resp. ) leading bits.333For definiteness, let us use Arithmetic-Geometric Mean Iteration as in [Ber03] to find these approximations.

  4. Output the sign of and STOP.

Lemma 2.16.

Algorithm 2.15 is correct and, following the preceding notation, runs within a number of bit operations asymptotically linear in
where .

Lemma 2.16 follows immediately from Theorem 2.14, the well-known fast iterations for approximating log (see, e.g., [Ber03]), and the known refined bit complexity estimates for fast multiplication (see, e.g., [BS96, Table 3.1, pg. 43]).

3. Chamber Cones and Polyhedral Models

3.1. Defining and Describing Chamber Cones

Definition 3.1.

Suppose is convex and is the polyhedral cone consisting of all with . We call the recession cone for and, if satisfies(1) and (2) for any , then we call the placed recession cone. In particular, the placed recession cone for for an outer chamber (resp. a reduced outer chamber) is called a chamber cone (resp. a reduced chamber cone) of . We call the facets of the (reduced) chamber cones of (reduced) walls of . We also refer to walls of dimension as rays.

Example 3.2.

Returning to Example 2.5, let us draw the rays that are the boundaries of the reduced chamber cones: While there appear to be just reduced chamber cones, there are in fact , since there is an additional (slender) reduced chamber cone with vertex placed much farther down. (The magnified illustration to the right actually shows nearly parallel rays going downward, very close together.) Note also that reduced chamber cones need not share vertices.

Chamber cones are well-defined since chambers are log-convex, being the domains of convergence of a particular class of hypergeometric series (see, e.g., [GKZ94, Ch. 6]). A useful corollary of the Horn-Kapranov Uniformization is a surprisingly simple and explicit description for chamber cones.

Definition 3.3.

Suppose has cardinality , is not contained in any -flat, and is not a pyramid.444The last assumption simply means that there is no point such that lies in an -flat. Also let be any real matrix whose columns are a basis for the right null space of and let be the rows of . We then call any set of indices satisfying:
             (a) is a maximal rank submatrix of .
             (b) is not the zero vector.
a radiant subset corresponding to .

Theorem 3.4.

Suppose has cardinality , is not contained in any -flat, is not a pyramid, and is a hypersurface. Also let be any real matrix whose columns are a basis for the right null space of and let be the rows of . Finally, let and let denote the row vector whose coordinate is or according as is or not. Then each wall of is the Minkowski sum of the row-space of and a ray of the form for some unique radiant subset of and any . In particular, the number of walls of , the number of chamber cones of , and the number of radiant subsets corresponding to are all identical, and at most .

Note that the hypotheses on are trivially satisfied when has cardinality . Note also that the definition of a radiant subset corresponding to is independent of the chosen basis since the definition is invariant under column operations on .

Remark 3.5.

Theorem 3.4 thus refines an earlier result of Dickenstein, Feichtner, and Sturmfels ([DFS07, Thm. 1.2]) where, in essence, unshifted variants of chamber cones (all going through the origin) were computed for nonpyramidal of arbitrary cardinality. A version of Theorem 3.4 for of arbitrary cardinality will appear in [PRRT11].

Example 3.6.

It is easy to show that a generic satisfying the hypotheses of our theorem will have exactly chamber cones, e.g., Example 2.5. It is also almost as easy to construct examples having fewer chamber cones. For instance, taking , we see that satisfies the hypotheses of Theorem 3.4 and that is a non-radiant subset. So the underlying has only chamber cones.

Proof of Theorem 3.4: First note that by Corollary 2.6, is the Minkowski sum of and the row space of , where . So then, determining the walls reduces to determining the directions orthogonal to the row space of in which becomes unbounded.

Since is in the row space of , we have and thus for all . So we can restrict to the compact subset and observe that becomes unbounded iff for some . In particular, we see that there are no more than reduced walls. Note also that iff tends to a suitable (nonzero) multiple of , in which case the coordinates of becoming unbounded are exactly those with index where is the unique radiant subset corresponding to those rows of that are nonzero multiples of . (The assumption that not be a pyramid implies that can have no zero rows.) Furthermore, the coordinates of that become unbounded each tend to . Note that Condition (b) of the radiance condition comes into play since we are looking for directions orthogonal to the row-space of in which becomes unbounded.

We thus obtain that each wall is of the asserted form. However, we still need to account for the coordinates of that remain bounded. Now, if tends to a suitable (nonzero) multiple of , then it clear that any coordinate of of index tends to (modulo a multiple of added to ). So we have indeed described every wall, and given a bijection between radiant subsets corresponding to and the walls of .

To conclude, note that the row space of has dimension by construction, so the walls are all actually (parallel) -plane bundles over rays. So by the Archimedean Amoeba Theorem, each outer chamber of must be bounded by walls and the walls have a natural cyclic ordering. Thus the number of chamber cones is the same as the number of rays and we are done.

3.2. Which Chamber Cone Contains Your Problem?

An important consequence of Theorem 3.4 is that while the underlying -discriminant polynomial may have huge coefficients, the rays of a linear projection of admit a concise description involving few bits, save for the transcendental coordinates coming from the “shifts” . By applying our quantitative estimates from Section 2.3 we can then quickly find which chamber cone contains a given -variate -nomial.

Theorem 3.7.

Following the notation of Theorem 3.4, suppose and let denote the maximum bit size of any coordinate of . Then we can determine the unique chamber cone containing — or correctly decide if is contained in or more chamber cones — within a number of arithmetic operations polynomial in . Furthermore, if , is the maximum bit size of any coefficient of , and is fixed, then we can also obtain a bit complexity bound polynomial in .

Theorem 3.7 is the central tool behind our complexity results and follows immediately upon proving the correctness of (and giving suitable complexity bounds for) the following algorithm:

Algorithm 3.8.

Input: A subset of cardinality (with not a pyramid and not contained in any             -flat, and a hypersurface) and the coefficient vector of an             .
Output: Radiant subsets and (corresponding to ) generating the walls of the unique                chamber cone containing , or a true declaration that is contained in at least                 chamber cones.

  1. (Preprocessing) Compute the Hermite Factorization and let be the submatrix defined by the rightmost columns of .

  2. (Preprocessing) Let be the rows of , , and let denote the row vector whose coordinate is or according as is or not.

  3. (Preprocessing) Find all radiant subsets corresponding to .

  4. (Preprocessing) For any radiant subset let and let denote the row vector for any fixed .

  5. (Preprocessing) Sort the in order of increasing counter-clockwise angle with the -coordinate ray and let denote the resulting ordered collection of .

  6. (Preprocessing) For any radiant subset let denote the intersection of the lines and , where is the counter-clockwise neighbor of .

  7. Let .

  8. Via binary search, attempt to find a pair of adjacent rays of the form
    containing .

    1. If ( and there is no such pair of rays)
      ( and there is such a pair of rays)
      then output ‘‘Your lies in at least distinct chamber cones.’’ and STOP.

    2. If and there is such a pair of rays, set ,

      delete and from , and GOTO STEP (2).

  9. Output ‘‘Your lies in the unique chamber cone determined by and .’’ and STOP.

Remark 3.9.

An important detail for large scale computation is that the preprocessing steps (-5)–(0) need only be done once per support . This can significantly increase efficiency in applications where one has just one (or a few) and one needs to answer chamber cone membership queries for numerous with the same support.

Proof of Correctness of Algorithm 3.8: First note that the computed matrix indeed has columns that form a basis for the right null-space of . This is because our assumptions on ensure that the rank of is and thus the last rows of consist solely of zeroes.

By construction, Theorem 3.4 then implies that the are exactly the reduced rays for , modulo an invertible linear map. (The invertible map arises because right-multiplication by induces an injective but non-orthogonal projection of the right null-space of onto .)

It is then clear that the preprocessing steps do nothing more than give us a suitable for Theorem 3.4 and a sorted set of reduced rays ready for chamber cone membership queries via binary search. In particular, since the reduced chamber cones cover , the correctness of Steps (1)–(3) is clear and we are done.

In what follows, we will use the “soft-Oh” notation to abbreviate bounds of the form .

Complexity Analysis of Algorithm 3.8: Let us first approach our analysis from the more involved point of view of bit complexity. Our arithmetic complexity bound will then follow upon a quick revisit.

By Theorem 2.13 (which quotes bounds from [Sto00]), Step (-5) takes bit operations. Also, the resulting bit size for the entries of is .

The complexity of Step (-4) is negligible, save for the approximation of certain logarithms. The latter won’t come into play until we start checking on which side of a ray a point lies, so let us analyze the remaining preprocessing steps.

Step (-3) can be done easily through a greedy approach: one simply goes through the rows to see which rows are multiples of . Once this is done, one checks if the resulting set of indices is indeed radiant or not, and then one repeats this process with the remaining rows of . In summary, this entails arithmetic operations on number of bit-size , yielding a total of bit operations.

Step (-2) has negligible complexity.

The comparisons in Step (-1) can be accomplished by computing the cosine and sine of the necessary angles via dot products and cross products. Via the well-known asymptotically optimal sorting algorithms, it is then clear that Step (-1) requires arithmetic operations on integers of bit size , contributing a total of bit operations.

Step (0) has negligible complexity.

At this point, we see that the complexity of the Preprocessing Steps (-5)–(0) is bit operations.

Continuing on to Steps (1)–(3), we now see that we are faced with sidedness comparisons between a point and an oriented line. More precisely, we need to evaluate signs of determinants of matrices of the form . Each such sign evaluation, thanks to Algorithm 2.15 and Lemma 2.16, takes bit operations.

We have thus proved our desired bit complexity bound which, while polynomial in for fixed , is visibly exponential in . Note however that the exponential bottleneck occurs only in the sidedness comparisons of Step (2).

To obtain an improved arithmetic complexity bound, we then simply observe that the sidedness comparisons can be replaced by computations of signs of differences of monomials, simply by exponentiating the resulting linear forms in logarithms. Via recursive squaring [BS96, Thm. 5.4.1, pg. 103], it is then clear that each such comparison requires only arithmetic operations. So the overall number of arithmetic operations drops to polynomial in and we are done.

Let us now state some final combinatorial constructions before fully describing how chamber cones apply to real root counting.

3.3. Canonical Viro Diagrams and the Probability of Lying in Outer Chambers

Our use of outer chambers and chamber cones enables us to augment an earlier construction of Viro. Let us first recall that a triangulation of a point set is simply a simplicial complex whose vertices lie in .

Definition 3.10.

We say that a triangulation of is coherent iff its maximal simplices are exactly the domains of linearity for some function that is convex, continuous, and piecewise linear on the convex hull of . In particular, we will sometimes define such an by fixing the values for just those and then employing the convex hull of the points as ranges over . The resulting graph is known as the lower hull of the lifted point set .

Definition 3.11.

(See Proposition 5.2 and Theorem 5.6 of [GKZ94, Ch. 5, pp. 378–393].) Suppose is finite and the convex hull of has positive volume and boundary . Suppose also that is equipped with a coherent triangulation and a function which we will call a distribution of signs for . We then call any edge with vertices of opposite sign an alternating edge, and we define a piece-wise linear manifold — the Viro diagram — in the following local manner: For any -cell , let be the convex hull of the set of all midpoints of alternating edges of , and then define . When and is the corresponding sequence of coefficient signs, then we also call the Viro diagram of corresponding to .

Example 3.12.

Consider . Then and has convex hull a pentagon. So then there are exactly coherent triangulations, yielding possible Viro diagrams for (drawn in thicker green lines):

Note that all these diagrams have exactly connected components, with each component isotopic to an open interval. Note also that our here is a -variate -nomial.

Definition 3.13.

Suppose has cardinality , is not a pyramid, is not contained in any -flat, and is a hypersurface. Also let be any real matrix whose columns are a basis for the right null space of . For any let us then define where and are the unique radiant subsets corresponding to the unique chamber cone containing . (We set should there not be a unique such chamber cone.) Let us then define to be the convex hull of and let denote the triangulation of induced by the lower hull of . Also, we call any polynomial of the form