Skip to main content
Springer Nature - PMC COVID-19 Collection logoLink to Springer Nature - PMC COVID-19 Collection
. 2020 Jun 6;12097:27–36. doi: 10.1007/978-3-030-52200-1_3

Chordality Preserving Incremental Triangular Decomposition and Its Implementation

Changbo Chen 13,14,
Editors: Anna Maria Bigatti8, Jacques Carette9, James H Davenport10, Michael Joswig11, Timo de Wolff12
PMCID: PMC7340895

Abstract

In this paper, we first prove that the incremental algorithm for computing triangular decompositions proposed by Chen and Moreno Maza in ISSAC’ 2011 in its original form preserves chordality, which is an important property on sparsity of variables. On the other hand, we find that the current implementation in Triangularize command of the RegularChains library in Maple may not always respect chordality due to the use of some simplification operations. Experimentation show that modifying these operations, together with some other optimizations, brings significant speedups for some super sparse polynomial systems.

Keywords: Triangular decomposition, Chordal graph, Incremental algorithm, Regular chain

Introduction

The method of triangular decomposition pioneered by Ritt [19] and Wu [23] has become a basic tool for computing the solutions of polynomial systems over an algebraically closed field. Given a finite set of polynomials F, this method decomposes F into finitely many systems of triangular shape such that the union of their zero sets is the same as that of F. With such decomposition in hand, many information on the solution set, such as emptiness, dimension, cardinality, etc., can be easily obtained. Triangular decomposition has been studied and gradually improved by many others in both theory [1, 2, 14, 15, 25] and algorithms [7, 10, 12, 13, 16, 17, 22, 24]. Efficient implementations exist in a Maple built-in package RegularChains as well as many other libraries and softwares, such as Epsilon, Wsolve, Magma, and so on.

Nowadays, triangular decomposition has also become an important back-end engine for several algorithms in studying semi-algebraic sets, such as real root classification [24] and comprehensive triangular decomposition of parametric semi-algebraic sets [5], computing sample points of semi-algebraic sets [4], describing semi-algebraic sets [4], as well as computing cylindrical algebraic decompositions and performing quantifier elimination [3, 8, 9]. These algorithms and their implementations make triangular decomposition become an efficient tool in many applications, such as theorem proving, program verification, stability analysis of biological systems, and so on.

To further improve the efficiency of triangular decomposition, one important direction is to explore the structure of input systems, such as symmetry and sparsity. The work of [11] brings the concept of variable sparsity to the world of triangular decomposition by virtue of the chordal graph of polynomial systems. Chordal graph already exists in many other contexts, such as Gauss elimination [20] and semidefinite optimization [21].

It has already been shown that some top-down algorithms [22] (up to minor modification of its original form) preserve chordality [18]. Incremental algorithms [7, 16, 17] are another important class, which compute triangular decompositions by induction on the number of polynomials. It is a natural question to ask if the incremental algorithms can also preserve chordality. In this paper, we provide an affirmative answer to this question for the incremental algorithm proposed in [6, 7]. On the other hand, we find that the current implementation of this algorithm in Triangularize command of the RegularChains library in Maple may not always respect chordality. After a careful examination of the implementation, we point out this is due to the use of some simplification operations. Finally, we show by experimentation that modifying these operations, together with some other optimizations, bring significant speedups for Triangularize on some super sparse polynomial systems.

Basic Lemmas

Definition 1

(Graph). Let Inline graphic and Inline graphic. The (associated) graph Inline graphic of F is an undirected graph defined as follows:

  • The set V of vertices of Inline graphic is the set of variables appearing in F.

  • The set E of edges of Inline graphic is the set of Inline graphic, Inline graphic, where Inline graphic and Inline graphic simultaneously appear in some Inline graphic.

Denote by Inline graphic an operation which returns V.

Definition 2

(Perfect elimination ordering). Let Inline graphic be a graph with vertices Inline graphic. An ordering Inline graphic is a perfect elimination ordering for Inline graphic if for any Inline graphic, the induced subgraph on the set of vertices Inline graphic is a clique. If a perfect elimination ordering Inline graphic exists for Inline graphic, we say Inline graphic is chordal (w.r.t. Inline graphic). We say that a graph Inline graphic with vertices Inline graphic is a chordal completion of Inline graphic, if Inline graphic is chordal and Inline graphic is a subgraph of Inline graphic.

Example 1

Let Inline graphic. Then Inline graphic is illustrated in Fig. 1, where the vertex Inline graphic is renamed as i for short. The ordering Inline graphic is a perfect elimination ordering and Inline graphic is chordal w.r.t. this ordering. Another ordering Inline graphic is not a perfect elimination ordering.

Fig. 1.

Fig. 1.

Chordal graph.

Definition 3

Let Inline graphic be a given ordering and Inline graphic. Let Inline graphic. Let Inline graphic be any chordal completion of Inline graphic w.r.t. the ordering Inline graphic (that is Inline graphic is a perfect elimination ordering for Inline graphic). We say that M preserves chordality in Inline graphic (resp. Inline graphic) if for any Inline graphic, we have Inline graphic (resp. Inline graphic). In the former case, we say that M strongly preserves chordality (for F). In the latter case, that is M preserves chordality in any chordal completion of Inline graphic w.r.t. Inline graphic, we say that M preserves chordality (for F).

Remark 1

Let Inline graphic be a unary operation which maps Inline graphic to Inline graphic. Then it induces a map M which maps Inline graphic to Inline graphic. Let Inline graphic be a binary operation which maps (fg) to O(fg). Then it induces a map M which maps Inline graphic to Inline graphic. For both cases, if M (strongly) preserves chordality, we say that the operation O (strongly) preserves chordality.

Example 2

Consider Inline graphic. Figure 1 depicts a chordal completion Inline graphic of Inline graphic w.r.t. the ordering Inline graphic. Let M be the Triangularize command in Maple 2019, which computes a set of regular chains as follows:

graphic file with name M61.gif

As we see, it does not preserve chordality since the graph of the fifth regular chain is not a subgraph of Inline graphic.

Definition 4

Let Inline graphic be a unary operation. We say that it respects the (elimination) ordering Inline graphic for Inline graphic if Inline graphic.

Lemma 1

If a unary operation O respects the ordering, then it strongly preserves chordality.

Proof

It trivially holds since Inline graphic is a clique for any Inline graphic.

Definition 5

Given Inline graphic, let Inline graphic be the largest variable appearing in f. Let Inline graphic be a binary operation. Let Inline graphic. We say that O respects the ordering Inline graphic (for f and g) if the following are satisfied:

  • If Inline graphic, we have Inline graphic.

  • If Inline graphic, we have Inline graphic or Inline graphic.

Lemma 2

Suppose that O respects the ordering Inline graphic, then we have the following.

  • If Inline graphic, then O strongly preserves chordality.

  • If Inline graphic, then O preserves chordality.

Proof

Let Inline graphic be any chordal completion of Inline graphic and Inline graphic be the common main variable of f and g. By the definition of chordal graph, the subgraph of Inline graphic induced by the set of vertices Inline graphic is a clique. So the conclusion holds.

Corollary 1

The irreducible factorization Factor strongly preserves chordality. If the two input polynomials have the same main variable, then the subresultant chain SubRes, the resultant res, the pseudo remainder prem and the pseudo quotient pquo operations w.r.t. the main variable preserve chordality.

If the input two polynomials do not have the same main variable, then these operations may destroy chordality, see Example 3.

Example 3

Consider the system Inline graphic again from Example 1 and the ordering Inline graphic. We have Inline graphic and Inline graphic. Then Inline graphic. Clearly prem does not preserve chordality for Inline graphic and Inline graphic.

Lemma 3

Let Inline graphic. Let p be a polynomial in F. Assume that F is chordal w.r.t. the variable order Inline graphic. Let Inline graphic. Then there exists a chordal completion Inline graphic of Inline graphic (with the same set of vertices) w.r.t. the order Inline graphic such that Inline graphic.

Proof

Let Inline graphic. For any u in Inline graphic, the set Inline graphic is a also clique since Inline graphic is a clique by the assumption that F is chordal. Thus Inline graphic is a chordal completion of Inline graphic.

The Incremental Algorithm Preserves Chordality

In this section, we prove that the incremental algorithm, namely Algorithm 1, proposed in [7] preserves chordality. The main subroutine of Algorithm 1 is the Intersect operation, which takes a polynomial p and a regular chain T as input, and returns a sequence of regular chains Inline graphic such that

graphic file with name M108.gif 1

where V(p) is the variety of p, W(T) is the quasi-component of T and Inline graphic is the Zariski closure of W(T). Due to limited space, we refer the reader to [7] for a precise definition of these concepts and a detailed description of the algorithm Intersect and its subroutines Extend, IntersectAlgebraic, IntersectFree, CleanChain, and RegularGcd.graphic file with name 495991_1_En_3_Figa_HTML.jpg

Lemma 4

One can transform Algorithm Triangularize into an equivalent one with the original flow graph illustrated by the left subgraph of Fig. 2 replaced by the one depicted in the right subgraph of Fig. 2.

Fig. 2.

Fig. 2.

Transform flow graph of the algorithm.

Proof

The transformation can be done in two steps. Firstly one can easily replace the direct recursions in Extend, Triangularize and IntersectAlgebraic by iterations. Secondly one can make the function calls to Extend, IntersectAlgebraic, IntersectFree, CleanChain, RegularGcd inline. As a consequence, one obtains an equivalent form of Triangularize with the flow graph of function calls depicted in the right subfig of Fig. 2.

Lemma 5

For each algorithm in Fig. 2, any polynomial in it, if appearing in the output of the algorithm or appearing as the output or input of subroutines in Fig. 2 of the algorithm, is obtained through chordality preserving operations. Moreover, if we remove step 1 in Intersect, which calls prem to test if p belongs to the saturated ideal of T (the algorithm is still correct), all basic operations appearing in the algorithm preserve chordality.

Lemma 6

Let Inline graphic be finite and assume that F is chordal. Let p be a polynomial and T be a regular chain of Inline graphic such that Inline graphic and Inline graphic. Let Inline graphic be the processes in the output of Intersect or Inline graphic, then we have Inline graphic. (The output Inline graphic is treated as a special process Inline graphic.) If this is true, we say that Inline graphic and Inline graphic preserves chordality (w.r.t. F).

Proof

We prove this by induction on the rank of the process (pT).

  • Base: For each returned process Inline graphic, if it is obtained without relying on the output of recursive calls to Intersect or Inline graphic, then Inline graphic holds.

  • Induction: For each recursive calls to Intersect or Inline graphic, the rank of input process is less than that of (pT). By the induction hypothesis, the recursive calls preserve chordality. Moreover, by Lemma 5, we notice that the input process for each recursive call is obtained by chordality preserving operations as well as the output process of each recursive call is processed by chordality preserving operations. Thus the lemma holds.

Theorem 1

Algorithm Triangularize preserves chordality.

Proof

We prove it by induction on the number of elements of F. The base case trivially holds. Let Inline graphic and Inline graphic. By Lemma 3, there exists a chordal completion Inline graphic of Inline graphic such that Inline graphic. By induction hypothesis, for each regular chain T in the output of the recursive call to Inline graphic, we have Inline graphic. Then the conclusion follows from Lemma 6.

Modifying the Implementation of Triangularize

Algorithm 1 has been implemented in the RegularChains library with the same name. After carefully tracing the code, we find that the only operation in the implementation of Triangularize that may destroy the chordality is the pseudo-reminder operation prem. As illustrated by Example 3 in Sect. 2, if two input polynomials do not have the same main variable, prem can destroy chordality. In particular, the operation prem was empolyed in several places for performing the simplification Inline graphic, where pq are two polynomials and T is a regular chain. Such simplification does not hurt the correctness of the algorithm, although it may affect the efficiency and should be empolyed with caution. For instance, it was empolyed as a preprocessing step for Intersect but only if the initials of polynomials in T are constants, which may reduce the degree of the polynomial. Note that we have Inline graphic, thus the correctness of Intersect is not hurt by Eq. (1). However, if q is involved in producing polynomials as input or output of some algorithms in Fig. 2, then Triangularize may not preserve chordality. Thus, for all these places, we simply do not call prem to preserve chordality. Note that Inline graphic if and only if p is contained in the saturated ideal of T (membership testing) [6]. If prem is only used for membership testing, we do not suspend the call to prem as it does not affect chordality. There are some other operations, such as iterated resultant, which may not preserve the chordality either. But since they do not produce polynomials as input or output of algorithms in Fig. 2, we keep the calls to them unchanged.

There are several other changes we made to improve the efficiency of the code for chordal input. One is to control the generation of redundant regular chains in Algorithm 1 after each recursive call. Another is to change the order of polynomials in F to solve in Algorithm 1. In the current implementation of Triangularize, one first solves polynomials with smaller rank (in particular with smaller main variables). But this strategy seems to increase the chance of calling operations not preserving chordality. So we instead now first solve polynomials with larger rank. As an example, for lattice-r-10 in Table 1, the two different strategies respectively lead to calling Inline graphic 2659 and 964 times.

Table 1.

Benchmark examples.

minor-k Inline graphic
minor-r-k Inline graphic
lattice-k Inline graphic
lattice-r-k Inline graphic
coloring-k Inline graphic

The implementation preserving chordality is available in Triangularize in the updated RegularChains library (downloadable from http://www.arcnl.org/cchen/software/chordal) through option Inline graphic.

Experiments

Table 2 compares its performance with Inline graphic in Maple 2019. We also include the performance of the regser command of the Epsilon library as a reference. In Table 1, the examples minor-k, lattice-k and coloring-k are chosen from [11]. The examples minor-r-k (resp. lattice-r-k) is a slight modification of minor-k (resp. lattice-k), but have the same associated graph as minor-k (resp. lattice-k).

Table 2.

Benchmark.

Sys n m d regser Tri (K) Tri (L) Tri-C (K) Tri-C (L)
Time c Time c Time c Time c Time c
minor-10 22 10 2 2.334 455 27.08 89 467.6 875 6.738 89 24.75 767
minor-15 32 15 2 86.13 8236 1701.9 987 1147.7 987
minor-18 38 18 2 1402.1 46810
minor-20 42 20 2
minor-r-10 22 10 2 32.05 2214 10.72 1 227.0 498 1.700 1 11.98 351
minor-r-12 26 12 2 336.7 11667 41.30 1 1859.6 1713 5.366 1 75.51 1081
minor-r-14 30 14 2 153.4 1 17.87 1 584.8 3329
minor-r-15 32 15 2 33.23 1 1762.4 5842
lattice-10 13 10 2 0.140 18 7.065 15 7.6 15 0.417 24 0.417 24
lattice-20 23 20 2 1.640 154 8.93 187 8.913 187
lattice-30 33 30 2 19.47 1285 409.4 1549 406.2 1549
lattice-40 43 40 2 259.6 10733
lattice-r-10 13 10 2 0.459 13 21.41 1 26.27 13 0.436 1 0.506 13
lattice-r-15 18 15 2 27.19 18 2.134 1 2.297 18
lattice-r-18 21 18 2 150.2 1 152.7 21
lattice-r-20 23 20 2
coloring-10 10 20 3 6.45 123 13.45 123 9.89 123 4.916 102 4.636 102
coloring-12 12 24 3 56.87 322 92.67 322 56.96 322 23.06 267 22.79 267
coloring-14 14 28 3 986.5 843 667.7 843 380.1 843 128.8 699 130.2 699
coloring-15 15 30 3 315.7 1131 312.7 1131

In Table 2, we write Inline graphic for short as Inline graphic and Inline graphic with Inline graphic as Tri-C. Denote by K and L respectively the Kalkbrener and Lazard triangular decomposition. For each system F, let n be the number of variables, m be the number of polynomials in F, d be the maximum degree of polynomials in F, t be the computation time (in seconds), c be the number of components in the output. The timeout (−) is set as one hour. As we can see from the table, for these particular sparse systems, Tri-C significantly outperforms Inline graphic. Meanwhile, Tri-C and regser each have their own favorite examples.

Conclusion

In this paper, we first proved that the incremental algorithm for computing triangular decompositions proposed in [7] preserves chordality. Then we pointed out that some simplification operations used in the implementation may destroy chordality. We resolve this problem by carefully modifying the implementation in Triangularize and the experimentation shows that significant speedups are obtained for some very sparse polynomial systems. Finally, we remark that more extensive experimentations on diverse polynomial systems are needed to decide the best use of these simplifications with the guidance of theory and possibly the help of artificial intelligence rather than simply relying on experience.

Acknowledgments

The authors would like to thank anonymous referees for helpful comments. This research was supported by NSFC (11771421, 11671377, 61572024), CAS “Light of West China” Program, the Key Research Program of Frontier Sciences of CAS (QYZDB-SSW-SYS026), and cstc2018jcyj-yszxX0002 of Chongqing.

Contributor Information

Anna Maria Bigatti, Email: bigatti@dima.unige.it.

Jacques Carette, Email: carette@mcmaster.ca.

James H. Davenport, Email: j.h.davenport@bath.ac.uk

Michael Joswig, Email: joswig@math.tu-berlin.de.

Timo de Wolff, Email: t.de-wolff@tu-braunschweig.de.

Changbo Chen, Email: chenchangbo@cigit.ac.cn, http://www.arcnl.org/cchen.

References

  • 1.Aubry P, Lazard D, Moreno Maza M. On the theories of triangular sets. J. Symb. Comput. 1999;28(1–2):105–124. [Google Scholar]
  • 2.Boulier, F., Lemaire, F., Moreno Maza, M.: Well known theorems on triangular systems and the D5 principle. In: Proceedings of Transgressive Computing 2006, Granada, Spain (2006)
  • 3.Chen, C., Moreno Maza, M.: An incremental algorithm for computing cylindrical algebraic decompositions. In: Computer Mathematics: Proceedings of ASCM 2012, pp. 199–222 (2014)
  • 4.Chen C, Davenport JH, May JP, Moreno Maza M, Xia B, Xiao R. Triangular decomposition of semi-algebraic systems. J. Symb. Comput. 2013;49:3–26. [Google Scholar]
  • 5.Chen C, Golubitsky O, Lemaire F, Maza MM, Pan W. Comprehensive triangular decomposition. In: Ganzha VG, Mayr EW, Vorozhtsov EV, editors. Computer Algebra in Scientific Computing; Heidelberg: Springer; 2007. pp. 73–101. [Google Scholar]
  • 6.Chen, C., Moreno Maza, M.: Algorithms for computing triangular decompositions of polynomial systems. In: Proceedings of ISSAC, pp. 83–90 (2011)
  • 7.Chen C, Moreno Maza M. Algorithms for computing triangular decomposition of polynomial systems. J. Symb. Comput. 2012;47(6):610–642. [Google Scholar]
  • 8.Chen C, Moreno Maza M. Quantifier elimination by cylindrical algebraic decomposition based on regular chains. J. Symb. Comput. 2016;75:74–93. [Google Scholar]
  • 9.Chen, C., Moreno Maza, M., Xia, B., Yang, L.: Computing cylindrical algebraic decomposition via triangular decomposition. In: Proceedings of ISSAC 2009, pp. 95–102 (2009)
  • 10.Chen XF, Wang DK. The projection of quasi variety and its application on geometric theorem proving and formula deduction. In: Winkler F, editor. Automated Deduction in Geometry; Heidelberg: Springer; 2004. pp. 21–30. [Google Scholar]
  • 11.Cifuentes D, Parrilo PA. Chordal networks of polynomial ideals. SIAM J. Appl. Algebra Geom. 2017;1(1):73–110. [Google Scholar]
  • 12.Dahan, X., Moreno Maza, M., Schost, E., Wu, W., Xie, Y.: Lifting techniques for triangular decompositions. In: Proceedings of ISSC, pp. 108–115 (2005)
  • 13.Gao, X.S., Chou, S.C.: Computations with parametric equations. In: Proceedings of ISSAC, pp. 122–127 (1991)
  • 14.Hubert E. Notes on triangular sets and triangulation-decomposition algorithms I: polynomial systems. In: Winkler F, Langer U, editors. Symbolic and Numerical Scientific Computation; Heidelberg: Springer; 2003. pp. 1–39. [Google Scholar]
  • 15.Kalkbrener M. A generalized euclidean algorithm for computing triangular representations of algebraic varieties. J. Symb. Comput. 1993;15(2):143–167. [Google Scholar]
  • 16.Lazard D. A new method for solving algebraic systems of positive dimension. Discrete Appl. Math. 1991;33(1–3):147–160. [Google Scholar]
  • 17.Moreno Maza, M.: On triangular decompositions of algebraic varieties. Technical report, TR 4/99, NAG Ltd., Oxford, UK (1999). Presented at MEGA-2000
  • 18.Mou, C., Bai, Y.: On the chordality of polynomial sets in triangular decomposition in top-down style. In: Proceedings of ISSAC, pp. 287–294 (2018)
  • 19.Ritt, J.F.: Differential equations from the algebraic standpoint, vol. 14. American Mathematical Society (1932)
  • 20.Rose DJ. Triangulated graphs and the elimination process. J. Math. Anal. Appl. 1970;32(3):597–609. [Google Scholar]
  • 21.Vandenberghe L, Andersen MS. Chordal graphs and semidefinite optimization. Found. Trends Optim. 2015;1(4):241–433. [Google Scholar]
  • 22.Wang D. Elimination Methods. Vienna: Springer; 2001. [Google Scholar]
  • 23.Wu WT. Basic principles of mechanical theorem proving in elementary geometries. J. Auto. Reasoning. 1986;2(3):221–252. [Google Scholar]
  • 24.Yang L, Hou X, Xia B. A complete algorithm for automated discovering of a class of inequality-type theorems. Sci. China Seri. F Inf. Sci. 2001;44(1):33–49. [Google Scholar]
  • 25.Yang, L., Zhang, J.: Searching dependency between algebraic equations: an algorithm applied to automated reasoning. Technical report, International Centre for Theoretical Physics (1990)

Articles from Mathematical Software – ICMS 2020 are provided here courtesy of Nature Publishing Group

RESOURCES