Applied Mathematics and Computation 250 (2015) 212–220
Contents lists available at ScienceDirect
Applied Mathematics and Computation journal homepage: www.elsevier.com/locate/amc
Real root classification of parametric spline functions q Jinming Wu a,⇑, Renhong Wang b, Xiaolei Zhang a a b
Department of Mathematics, Zhejiang Gongshang University, Hangzhou 310018, China Institute of Mathematical Sciences, Dalian University of Technology, Dalian 116024, China
a r t i c l e
i n f o
Keywords: Parametric splines Real roots Classification Discriminant sequence D-sequence
a b s t r a c t The real root classification of a given parametric spline function is a collection of possible cases of its real root distribution on every interval, together with the conditions of its coefficients must be satisfied for each case. This paper presents an algorithm to deal with the real root classification of a given parametric spline function. Two examples are provided to illustrate the proposed algorithm is flexible. Ó 2014 Elsevier Inc. All rights reserved.
1. Introduction The counting and classifying of the real/imaginary roots of a given polynomial have been the subject of many investigations. The classical Sturm Theorem and Tarski’s Theorem are efficient methods for determining the numbers of real roots of polynomials with constant coefficients, but inconvenient for those with symbolic coefficients (see [1] for details). Fortunately, there are several different methods to determine the number of the distinct real roots of polynomials with symbolic coefficients. Yang et al. [2,3] established the complete discrimination system of a real parametric polynomial, which is sufficient for determining the numbers and multiplicities of the real/imaginary roots, namely, determining the complete root classification. In parallel, Gonzalez-Vega et al. [4] proposed the use of Sturm–Habicht sequences to solve the real roots of univariate polynomials. In 2009, Liang and Jeffrey [5] proposed automatic computation of the complete root classification for a real parametric polynomial. More importantly, the algorithm offered improved efficiency and a new test for non-realizable conditions. Spline function (piecewise polynomial) is a natural generalization of polynomial. Thus, it is of theoretic and practical significance to study the counting and isolating the real roots of spline functions and its related problems. There exists several work on this issue [6–13]. For univariate case, Goodman [6] and de Boor [7] studied the relationship between the number of real roots of a univariate spline and the sequence of its B-spline coefficients, which provides new bounds on the number of real roots of the spline function. In 1989, Grandine [8] proposed a method for finding all real roots of a spline function based on the interval Newton method. In 2007, Morken and Reimers [9] presented an unconditionally quadratically convergent method for computing zeros of spline functions. In 2008, Wang and Wu [10] proposed an algorithm to isolate real roots of a given univariate spline based on the use of Descartes rule of signs with its B-spline coefficients and de Casteljau algorithm. For multivariate case, Lai et al. [11,12] gave the method to compute the supremum and its distribution of the distinct torsion-free real zeros of a given parametric piecewise polynomial system. In 2011, Wu and Zhang[13] presented an algo-
q This work was supported by the National Natural Science Foundation of China (Nos. 11401526, 11101366 and 11071031), the Zhejiang Provincial Natural Science Foundation of China (Nos. LY14A010001 and LQ13A010004). ⇑ Corresponding author. E-mail address:
[email protected] (J. Wu).
http://dx.doi.org/10.1016/j.amc.2014.10.094 0096-3003/Ó 2014 Elsevier Inc. All rights reserved.
213
J. Wu et al. / Applied Mathematics and Computation 250 (2015) 212–220
rithm to isolate the real solutions of two piecewise algebraic curves based on the Krawczyk–Moore iterative algorithm. At the same time, Wu [14] presented an algorithm for computing the real intersection points of piecewise algebraic curves which is primarily based on the interval zeros of the univariate interval polynomial in Bernstein form. A question will arise: Can we count or classify of the real roots of a given spline function? Given a set of spline knots N : 1 6 x0 < x1 < < xN < xNþ1 6 1. The univariate spline space Sn ½x0 ; x1 ; . . . ; xNþ1 is defined as follows:
Sn ½x0 ; x1 ; . . . ; xNþ1 ¼ fSðxÞ 2 C n1 jSi ðxÞ 2 Pn ½x;
i ¼ 0; 1; . . . ; Ng;
ð1Þ
where, Si ðxÞ denotes the restriction of SðxÞ over the interval ½xi ; xiþ1 ; i ¼ 0; 1; . . . ; N, and Pn ½x denotes the set of univariate polynomials with degree 6 n in variable x. The function SðxÞ is said to be of class C n1 if and only if the derivatives S0 ðxÞ; S00 ðxÞ; . . . ; Sðn1Þ ðxÞ exist and are continuous. Certainly, Sn ½x0 ; x1 ; . . . ; xNþ1 is a linear space and its dimension is n þ N þ 1. It is well-known that an arbitrary univariate spline SðxÞ 2 Sn ½x0 ; x1 ; . . . ; xNþ1 has the following unified representation [15]
SðxÞ ¼ S0 ðxÞ þ
N X
cj ðx xj Þnþ ;
ð2Þ
j¼1
where truncation function means xþ ¼ x for x P 0 and xþ ¼ 0 for x < 0, and S0 ðxÞ is a univariate polynomial with degree 6 n on the initial interval ½x0 ; x1 . Firstly, we have the coarse bound of the number of real roots of a given univariate spline. Theorem 1.1. If SðxÞ 2 Sn ½x0 ; x1 ; . . . ; xNþ1 , then the number of the roots of SðxÞ is not greater than n þ N. Proof. Obviously, the number of real roots of SðxÞ on ½x0 ; xNþ1 is equal to the summation of the number of real roots of Si ðxÞ on ½xi ; xiþ1 ; i ¼ 0; 1; . . . ; N. Suppose the number of the real roots of SðxÞ on ½x0 ; xNþ1 is M, then S0 ðxÞ has at least M 1 real root. Inductively, Sðn1Þ ðxÞ has at least M ðn 1Þ real roots. However, it is obvious that piecewise linear spline Sðn1Þ ðxÞ has at most N þ 1 real roots on ½x0 ; xN . Therefore, M ðn 1Þ 6 N þ 1, i.e., M 6 n þ N. It is pointed out that the ‘‘parametric’’ spline function means it contains symbolic coefficients and also allows to have some certain constant coefficients. Secondly, we make the following two conventions for a given parametric spline. SðxÞ is assumed to be ‘‘regular’’. It means that none of the spline knots is the real roots of SðxÞ, i.e.
Sðxi Þ – 0;
i ¼ 0; 1; . . . ; N þ 1:
ð3Þ
SðxÞ is assumed to be non-degenerate. That’s to say,
degðSi ðxÞÞ ¼ n;
i ¼ 0; 1; . . . ; N; Pi
n
ð4Þ 2
where Si ðxÞ ¼ S0 ðxÞ þ j¼1 cj ðx xj Þ . For example, if we give a parametric spline SðxÞ ¼ 2x þ bx þ c þ 2ðx 1Þ4þ þ dðx 2Þ4þ 2 S4 ½0; 1; 2; 3, then SðxÞ has at most 6 real roots (counted with multiplicities) on (0, 3) from Theorem 1.1 until now. In fact, we inevitably encounter another important problem that we want to know all the possible cases of the number of real roots of SðxÞ and its distribution, as well as the conditions on these symbolic coefficients. h 4
Undoubting, one can deal with real root classification of piecewise polynomial on every interval individually. However, the spline function satisfies certain continuity on adjacent knots, we naturally ask a question: Can we tackle the real root classification of parametric splines on the whole? As the authors knowledge, there is no existing result on the real root classification of a given parametric spline till now. In this article, we mainly generalize the methods in papers [3,5] to solve the real root classification of a given univariate parametric spline. From now on, the parametric spline (2) is assumed to be regular and non-degenerate if not specified. The rest of this paper is organized as follows. In Section 2, we recall several basic definitions and results on determining the number of real roots of a given parametric polynomial. In Section 3, we give the algorithm to tackle the real root classification of a given parametric spline, which is the main part of this paper. Finally, two illustrated examples are provided to show the algorithm is flexible in Section 4. Also, we conclude this paper in Section 5. 2. Preliminary In this section, we shall mostly review the existing work with respect to the algorithm proposed by Yang et al. (see [3] for details and references therein). Let f ðxÞ 2 R½x and write
f ðxÞ ¼ a0 xn þ a1 xn1 þ þ an1 x þ an :
214
J. Wu et al. / Applied Mathematics and Computation 250 (2015) 212–220
Definition 2.1. The following ð2n þ 1Þ ð2n þ 1Þ matrix in term of the coefficients,
0
a0
a1
a2
an
B0 B B B B B B B B B B B B @
na0
ðn 1Þa1
an1
a0
a1
an1
0
na0
2an2
1 C C C C C C C C C C C C C A
an an1
a0
a1
an
0
na0
an1
0
a0
a1
an
is called the discriminant matrix of f ðxÞ and denoted by Discr(f). Definition 2.2. Let dk be the kth principal minor of Discrðf Þ, and let Dk ¼ d2k . The n-tuple
fD1 ; D2 ; . . . ; Dn g is called the discriminant sequence of polynomial f ðxÞ. Definition 2.3. We call the list
fsignðD1 Þ; signðD2 Þ; . . . ; signðDn Þg the sign list of a given sequence fD1 ; D2 ; . . . ; Dn g, where signðxÞ is the signum function. Definition 2.4. The revised sign list ½e1 ; e2 ; . . . ; en of f ðxÞ (rsl(f) for short) is constructed from the sign list s ¼ ½s1 ; s2 ; . . . ; sn of f ðxÞ as follows. If ½si ; siþ1 ; . . . ; siþj is a section of s, where
si – 0;
siþ1 ¼ siþ2 ¼ ¼ siþj1 ¼ 0;
siþj – 0;
then we replace the subsection ½siþ1 ; siþ2 ; . . . ; siþj1 with ½si ; si ; si ; si ; si ; si ; . . . such that siþr ¼ ð1Þ½ðrþ1Þ=2 si ; r ¼ 1; 2; . . . ; j 1. Otherwise, let ek ¼ sk , i.e., no changes for other terms.
Theorem 2.1. Let rslðf Þ be the revised sign list of f ðxÞ. If the number of non-vanishing elements in rslðf Þ is l, and the number of sign changes in rsl(f) is m, then f ðxÞ has m pairs of distinct complex conjugate roots and l 2m distinct real roots. 0 The following definition is no more than subresultant polynomial sequence of f ðxÞ and f ðxÞ. Definition 2.5. Let M = Discrðf Þ, the discriminant matrix of f ðxÞ. By Mk;i denote the submatrix formed by the first 2k row of M, the first 2k 1 columns and the 2k þ i column of M. Then, construct polynomials
Pk ðf Þ ¼
k X
detðM nk;i Þxki
i¼0
for k ¼ 0; 1; . . . ; n 1. We call the n-tuple
fP0 ðf Þ; P1 ðf Þ; . . . ; Pn1 ðf Þg the multiple factor sequence of f ðxÞ. 0
Proposition 2.1. If the number of the 0’s in the rsl(f) is k, then Pk ðf Þ ¼ gcdðf ðxÞ; f ðxÞÞ. 0
Definition 2.6. Let D1 ðf Þ denote gcdðf ðxÞ; f ðxÞÞ, and let D0 ðf Þ ¼ f ðxÞ; Dj ðf Þ ¼ DðDj1 ðf ÞÞ; j ¼ 1; 2; . . .. Then fD0 ðf Þ; D1 ðf Þ; D2 ðf Þ; . . .g is called the D-sequence of f ðxÞ. In fact, the discriminant sequences of those polynomials in the D-sequence is enough to determining the multiplicities of real roots of f ðxÞ. Proposition 2.2. If Dj ðf Þ has k real roots with multiplicities n1 ; n2 ; . . . ; nk and Dj1 ðf Þ has m distinct real roots, then m P k, and the multiplicities of these m distinct roots are n1 þ 1; n2 þ 1; . . . ; nk þ 1; 1; . . . ; 1 respectively.
J. Wu et al. / Applied Mathematics and Computation 250 (2015) 212–220
215
It tells us that we can do in this way for D-sequence until for some j that the revised sign list of the discriminant sequence of f does not contains 0 and compute the numbers of the distinct real roots of Dj ðf Þ (using Theorem 2.1), then compute the numbers with multiplicities of the real roots for Dj1 ðf Þ (using Proposition 2.2), and then for Dj2 ðf Þ; . . ., until we obtain the real root classification for f ðxÞ at last. We consider how to compute the number of real roots for f ðxÞ on an interval ða; bÞ. Let
UðxÞ ¼ ð1 xÞn f
b ax ; 1x
hðxÞ ¼ Uðx2 Þ: It is easy to see that the number of the roots of a polynomial f ðxÞ in the interval ða; bÞ, with f ðaÞ – 0 and with f ðbÞ – 0 is equal to the number of negative roots of UðxÞ. The number of negative roots of UðxÞ equals the half number of the roots of hðxÞ. Yang et al. [3] presented a better method to construct the discriminant sequence of hðxÞ directly from the discriminant matrix of f ðxÞ directly. Definition 2.7. By fd1 ; d2 ; . . . ; d2nþ1 g denote the principal minor sequence of Discrðf Þ, we call 2n-tuple
fd1 d2 ; d2 d3 ; . . . ; d2n d2nþ1 g; the negative root discriminant sequence, and denoted by n.r.d. (f). Proposition 2.3. Let fd1 ; d2 ; . . . ; d2nþ1 g be the principal minor sequence of Discrðf Þ and let hðxÞ ¼ f ðx2 Þ. Assume a0 – 0. Then, the discriminant sequence of hðxÞ
D ¼ fD1 ðhÞ; D2 ðhÞ; . . . ; D2n ðhÞg is equal to n.r.d. (f), i.e., Dk ðhÞ ¼ dk ðf Þdkþ1 ðf Þ, up to a factor of the same sign as a0 . Liang et al. [5] gave an improved algorithm to tackle the complete root classification of a parametric polynomial directly using sign lists. Definition 2.8 [1]. Let s ¼ ½sn ; . . . ; s0 be a finite list of elements in R such that sn – 0. Let m < n be such that sn1 ¼ ¼ smþ1 ¼ 0, and sm – 0, and s0 ¼ ½sm ; . . . ; s0 . If there is no such m, then s0 is the empty list. We define inductively
8 if s0 ¼ ;; > < 0; 0 PmVðsÞ ¼ PmVðs Þ þ nm signðsn sm Þ; if n m odd; > : PmVðs0 Þ; if n m ev en;
where
nm ¼ ð1ÞðnmÞðnm1Þ=2 .
PmV(s) is called ‘‘generalized permeance minus variation’’. When all the elements of s are non-zero, PmVðsÞ is the difference between the number of sign permeance and the number of sign variations. The following theorem give the number of distinct real roots in term of sign lists directly. Theorem 2.2 [5]. Let D ¼ ½D1 ; . . . ; Dn be the discriminant sequence of polynomial f ðxÞ with degree n. If PmVðDÞ ¼ r, then f ðxÞ has r þ 1 distinct real roots. The next theorem can be used to detect the non-realizable sign lists in the input conditions. Theorem 2.3 [5]. Let s ¼ ½s1 ; . . . ; sn , and e ¼ ½e1 ; . . . ; en be the sign list and the revised sign list of f ðxÞ, respectively. Then PmVðsÞ ¼ PmVðeÞ 3. Real root classification of parametric splines Let SðxÞ 2 Sn ½x0 ; x1 ; . . . ; xNþ1 be a univariate parametric spline. The real root classification (RRC) of SðxÞ on ½x0 ; xNþ1 is denoted by
n o n o n o ½0 ½0 ½1 ½1 ½N ½N n1 ; n2 ; . . . ^ n1 ; n2 ; . . . ^ . . . n1 ; n2 ; . . . ;
ð5Þ
½i
where nk denotes the multiplicities of the distinct real roots of SðxÞ on the interval ½xi ; xiþ1 . The purpose of RRC of a given parametric spline SðxÞ is to derive a collection of all possible cases of its real roots on ½x0 ; xNþ1 , together with the conditions of its coefficients must be satisfied for each case. Let
x x x iþ1 i ; 1x ½i h ðxÞ ¼ U½i ðx2 Þ; i ¼ 0; 1; . . . ; N:
U½i ðxÞ ¼ ð1 xÞn Si
ð6Þ
216
J. Wu et al. / Applied Mathematics and Computation 250 (2015) 212–220
With the above discussion, we can easily have Proposition 3.1.
Zero½Si ðxÞjðxi ;xiþ1 Þ ¼ Zero½U½i ðxÞjð1;0Þ ¼
1 ½i Zero½h ðxÞjð1;þ1Þ ; 2
ð7Þ
where, Zero½pðxÞjða;bÞ denotes the number of real roots of pðxÞ on ða; bÞ (counted with multiplicities). As to the number of distinct real roots of SðxÞ, we have the following conclusion. ½i
Proposition 3.2. Given a parametric spline SðxÞ and let U½i ðxÞ and h ðxÞ be defined as (6). By principal minor sequence of DiscrðU½i Þ. Set
n o ½i ½i ½i ½i ½i ½i D½i ¼ d1 d2 ; d2 d3 ; . . . ; d2n d2nþ1 ;
n
½i
½i
½i
d1 ; d2 ; . . . ; d2nþ1
o
denote the
i ¼ 0; 1; . . . ; N:
If PmVðD½i Þ ¼ ri , then the number of the distinct real roots of SðxÞ is
1 2
PN
i¼0 ðr i
þ 1Þ.
Proof. It is obvious that the number of distinct real roots of SðxÞ is the summation of the number of distinct real roots of ½i Si ðxÞ; i ¼ 0; 1; . . . ; N. From Proposition 2.3, we know D½i is the discriminant sequence of h ðxÞ. Then, we can easily arrive the result from Proposition 3.1 and Theorem 2.2. ½i
Remark 3.1. Though we construct the discriminant sequence of h ðxÞ from the discriminant matrix of U½i ðxÞ directly, we delete the non-zero positive factor in every term of D½i . It greatly reduces the computational cost compared to algorithm in [5]. Remark 3.2. Since the spline function satisfies continuity Siþ1 ðxÞ Si ðxÞ ¼ ciþ1 ðx xiþ1 Þn , the only difference between D½i and D½iþ1 is that the latter has a more parameter ciþ1 . That’s to say, if the signðD½i Þ is determined, then the possibility of signðD½iþ1 Þ becomes very small. This phenomenon can be seen from our numerical experiments clearly. Now, we introduce some notations used in the subsequent algorithms. PRRC(n, N): the possible real root classification of SðxÞ 2 Sn ½x0 ; . . . ; xNþ1 on every interval ðxi ; xiþ1 Þ; i ¼ 0; 1; . . . ; N. It is the unions of the set of partition of 0; 1; . . . ; n þ N (using Theorem 1.1). For example,
PRRCð2; 1Þ ¼ ff0g ^ f0g; f0g ^ f1g; f0g ^ f2g; f0g ^ f1; 1g; f1g ^ f0g; f1g ^ f1g; f1g ^ f2g; f1g ^ f1; 1g; f2g ^ f0g; f2g ^ f1g; f1; 1g ^ f0g; f1; 1g ^ f1gg: It tells us that it possibly exists twelve different cases for real root classification of a given parametric spline SðxÞ 2 S2 ½x0 ; x1 ; x2 on ðx0 ; x2 Þ. Every element in PRRC(n, N) has the same meaning as defined in (5). ½i
½i
rrc: the element in PRRC(n, N) and it has the form rrc ¼ rrc0 ^ rrc1 ^ ^ rrcN , where rrci ¼ fn1 ; n2 ; . . .g reveals the number and multiplicity of real roots of Si ðxÞ on ðxi ; xiþ1 Þ. Take rrc ¼ f2g ^ f1; 1g for example, it means that SðxÞ has one real root with multiplicity 2 on ðx0 ; x1 Þ and two simple real roots on ðx1 ; x2 Þ. L(rrc): we define LðrrcÞ ¼ fL0 g ^ fL1 g ^ ^ fLN g, where Li ¼ Hðrrci Þ denotes the number of elements in rrci , i.e., the number of distinct real roots of SðxÞ on interval ðxi ; xiþ1 Þ. Take rrc ¼ f2g ^ f1; 1g for example, we have LðrrcÞ ¼ f1g ^ f2g and it shows that SðxÞ has one distinct real root on ðx0 ; x1 Þ and two distinct real roots on ðx1 ; x2 Þ. MS: the set of possible multi-sign lists from the discriminant sequence of D ¼ D½0 ^ D½1 ^ ^ D½N and denoted by n o MS ¼ msjms ¼ ms½0 ^ ms½1 ^ ^ ms½N ; ms½i 2 S½i , where S½i denotes the set of all possible sign lists from D½i ; i ¼ 0; 1; . . . ; N. Classify (S½i ; ri ): the subset of S½i of which the maximal index of non-vanishing members is r i . For example, if the multisign list S½i ¼ f½1; 1; 1; 1; ½1; 1; 1; 1; ½1; 1; 0; 0g, then
ClassifyðS½i ; 4Þ ¼ f½1; 1; 1; 1; ½1; 1; 1; 1g; ClassifyðS½i ; 2Þ ¼ f½1; 1; 0; 0g: MinusOne(rrc): MinusOneðrrcÞ ¼ rrc0 f1g ^ rrc1 f1g ^ ^ rrcN f1g. Take rrc ¼ f3g ^ f2; 1g for example, we have MinusOneðrrcÞ ¼ f2g ^ f1; 0g We first compute all possible multi-sign list MS for SðxÞ for a given rrc 2 PRRCðn; NÞ.
217
J. Wu et al. / Applied Mathematics and Computation 250 (2015) 212–220
Algorithm 3.1. SplineMS(S(x),rrc) Input A given parametric spline SðxÞ 2 Sn ½x0 ; x1 ; . . . ; xNþ1 and a given rrc Output The set MS of SðxÞ w.r.t. rrc. xi x Þ and h ðxÞ ¼ U½i ðx2 Þ, we compute the discriminant Step 1 For every i 2 f0; 1; ; . . . ; Ng. Set U½i ðxÞ ¼ ð1 xÞn Si ðxiþ11x ½i
½i
sequence D½i of each polynomial h ðxÞ (By using Proposition 3.2). Step 2. Compute LðrrcÞ ¼ fL0 g ^ fL1 g ^ ^ fLN g and the MS0 (all possible multi-sign lists from the discriminant sequence D ¼ D½0 ^ D½1 ^ ^ D½N ). Step 3. Compute MS ¼ fms 2 MS0 jPmVðms½i Þ ¼ PmVðrslðms½i ÞÞ ¼ 2Li 1; i ¼ 0; . . . ; Ng, Step 4. Return MS.
From Proposition 3.2, we know that SplineMSðSðxÞ; rrcÞ is a set of all possible multi-sign lists for SðxÞ having Li distinct real roots on every interval ½xi ; xiþ1 ; i ¼ 0; . . . ; N. The algorithm also gives the necessary and sufficient conditions for P SðxÞ 2 Sn ½x0 ; x1 ; . . . ; xNþ1 having Ni¼0 Li total distinct real roots on ½x0 ; xNþ1 . Obviously, if Li ¼ 0 or Li ¼ n, then we do not require any further computation for Si ðxÞ on ½xi ; xiþ1 . Take PRRC(3,1) for example, we perform the algorithm SplineMSðSðxÞ; rrcÞ and will obtain the necessary and sufficient conditions for SðxÞ having rrc as possible cases of its real root distribution directly when rrc 2 ff1; 1; 1g^ f0g; f0g ^ f0g; f0g ^ f1; 1; 1gg. ½i It is noted that the number of real roots h ðxÞ is even. That’s to say, the number of non-vanishing members of the revised ½i sign list of D is even. ½i Since S½i denotes the set of all possible sign lists from discriminant sequence D½i of polynomial h ðxÞ with degree 2n and Sn ½i ½i ½i we set Gk ¼ ClassifyðS ; kÞ, Then S ¼ k¼1 G2k because the number of real roots of h ðxÞ is always a multiple of 2. From the ½i
½i
Proposition 2.1, we know D1 ðh Þ ¼ P 2n2k ðh Þ. It is a polynomial of degree 2n 2k and it is used to determine the multiplicity ½i
of the distinct real root of Si ðxÞ on interval ðxi ; xiþ1 Þ. By Proposition 2.2, the distinct real roots of D1 ðh Þ is MinusOneðrrci Þ. And, ½i
the above computation can be repeated for D1 ðh Þ and MinusOneðrrci Þ until the last entry of the sign list is non-zero. The algorithm to compute the multiplicity of the distinct real root according to the mixed lists is outlined as follows. Algorithm 3.2. MultiRootðSi ðxÞ; rrci Þ Input Si ðxÞ and rrci . Output A sequence of mixed lists (the conditions for Si ðxÞ having rrci as a possible case of its real root distribution). xi x Þ and h ðxÞ ¼ U½i ðx2 Þ. Step 1. Set U½i ðxÞ ¼ ð1 xÞn Si ðxiþ11x ½i
½i
½i
Step 2. Compute h ðxÞ ¼ D1 ðh ðxÞÞ (Using Proposition 2.1). ½i
Step 3. Compute mi ¼ deg h ðxÞ; rrci :¼ MinusOneðrrci Þ, and Li ¼ Hðrrci Þ. Step 4. Compute S½i ¼ fms½i jPmVðms½i Þ ¼ PmVðrslðms½iÞ Þ ¼ 2Li 1g. Step 5. If S½i ¼ ;, then return NULL. else if Li ¼ 0 or Li ¼ mi or ClassifyðS½i ; mi Þ ¼ S½i , then return S½i . else for j from 2Li to m by 2 do Gj ¼ ClassifyðS½i ; jÞ if Gj – ; then if i ¼ m then return Gj else go to Step 2. else return NULL.
It is from the discussion (see [5] for details) that output can be viewed as a couple of tree whose nodes consist mix lists. The necessary and sufficient conditions for a polynomial Si ðxÞ on ½xi ; xiþ1 having rrci as a possible case of its real root distribution is a single chain of mixed lists connected using conjunction (^). Now, suppose that the leaves are labeled by k. Let Ni be the chain of mixed lists obtained by connecting the nodes from the kth leaf to its root using conjunction. Then, the output conditions can be expressed as the disjunction of these chains. Finally, we outline the algorithm to derive the real root classification of a given parametric spline, together with the conditions of its coefficients must be satisfied.
218
J. Wu et al. / Applied Mathematics and Computation 250 (2015) 212–220
Algorithm 3.3. RRC(S(x)) Input Given a parametric spline SðxÞ 2 Sn ½x0 ; x1 ; . . . ; xNþ1 . Output The real root classification of SðxÞ, as well as the necessary and sufficient conditions of its coefficients must be satisfied. Step 1. Compute PRRCðn; NÞ and LðrrcÞ ¼ fL0 g ^ fL1 g ^ ^ fLN g; rrc 2 PRRCðn; NÞ. Step 2. If Li ¼ 0 or Li ¼ n for all i 2 f0; 1; . . . ; Ng, then we run SplineMSðSðxÞ; rrcÞ and obtain MS. Else, we perform n o MultiRootðSi ðxÞ; rrci Þ and obtain S½i . Then, MS ¼ ms½0 ^ ms½1 ^ ^ ms½N ; ms½i 2 S½i . Step 3. Output MS and the conditions on its necessary and sufficient coefficients according to the multi-sign lists MS.
It is obvious that the set MS is the multi-sign lists of SðxÞ having rrc ¼ rrc0 ^ rrc1 ^ ^ rrcN as possible cases of its real root distribution. The algorithm also gives the necessary and sufficient conditions of its coefficients must be satisfied for each case. Remark 3.3. Although the Step 3 in Algorithm 3.1 is used to filter the non-realizable sign lists to a certain extent, it is not guaranteed that all non-realizable sign lists are detected. That’s to say, the output contains excessive non-realizable conditions. It is an important and complex problem on semi-algebraic set and it is difficult to study. In this article, we use the tofind command in DISCOVERER package developed by Xia [16] to determine whether these conditions can be realized or not.
4. Illustrated examples In this section, two simple examples are provided to show the proposed algorithm is flexible. 2
Example 4.1. Find the real root classification of a given parametric spline SðxÞ ¼ x2 þ bx þ c þ dxþ on ð1; þ1Þ. This problem is equivalent to find the number of negative real roots of S0 ðxÞ ¼ x2 þ bx þ c, and positive real roots of S1 ðxÞ ¼ ð1 þ dÞx2 þ bx þ c, respectively. We assume the conditions c – 0 and 1 þ d – 0 hold since SðxÞ is regular and non-degenerate. Set U½0 ðxÞ ¼ S0 ðxÞ; U½1 ðxÞ ¼ S1 ðxÞ and compute the negative root discriminant sequences of DiscrðU½0 ðxÞÞ and DiscrðU½1 ðxÞÞ
n o n o 2 : 2 2 D½0 ¼ 2; 2b; bðb 4cÞ; cðb 4cÞ ¼ 1; D1 ; D1 D3 ; D2 D23 ; x n o n o 2 : 3 4 4 2 4 2 D½1 ¼ ð1 þ dÞ ; 2bð1 þ dÞ ; bð1 þ dÞ ðb 4cð1 þ dÞÞ; cð1 þ dÞ ðb 4cð1 þ dÞÞ ¼ D4 ; D1 ; D1 D5 ; D2 D25 ; where,
D1 ¼ b;
D2 ¼ c;
D4 ¼ 1 þ d;
2
D3 ¼ b 4c; 2
D5 ¼ b 4cð1 þ dÞ
: and x ¼ y denotes that x equals y by discarding a positive factor. The real root classification of SðxÞ is: (1) (2) (3) (4) (5) (6) (7) (8) (9)
f1; 1g ^ f0g () ½D1 > 0 ^ D2 > 0 ^ D3 > 0 ^ D4 > 0 f1; 1g ^ f1g () ½D1 > 0 ^ D2 > 0 ^ D3 > 0 ^ D4 < 0 f2g ^ f0g () ½D1 > 0 ^ D3 ¼ 0 ^ D4 > 0 f2g ^ f1g () ½D1 > 0 ^ D3 ¼ 0 ^ D4 < 0 f1g ^ f0g () ½D2 < 0 ^ D4 < 0 ^ D5 < 0 _ ½D2 < 0 ^ D1 6 0 ^ D4 < 0 ^ D5 P 0 f1g ^ f1g () ½D2 < 0 ^ D4 > 0 f1g ^ f1; 1g () ½D2 < 0 ^ D1 > 0 ^ D4 < 0 ^ D5 > 0 f1g ^ f2g () ½D2 < 0 ^ D1 > 0 ^ D4 < 0 ^ D5 ¼ 0 f0g ^ f0g () ½D2 > 0 ^ D3 < 0 ^ D4 > 0 ^ D5 < 0 _ ½D2 > 0 ^ D3 < 0 ^ D1 P 0 ^ D4 > 0 ^ D5 > 0 _ ½D2 > 0 ^ D1 6 0 ^ D3 > 0 ^ D4 > 0 ^ D5 < 0 (10) f0g ^ f1g () ½D2 > 0 ^ D3 < 0 ^ D4 < 0 _ ½D1 6 0 ^ D2 > 0 ^ D3 > 0 ^ D4 < 0 (11) f0g ^ f2g () ½D2 > 0 ^ D3 < 0 ^ D1 < 0 ^ D5 ¼ 0 _ ½D1 < 0 ^ D2 > 0 ^ D3 > 0 ^ D5 ¼ 0 (12) f0g ^ f1; 1g () ½D2 > 0 ^ D3 < 0 ^ D1 6 0 ^ D4 > 0 ^ D5 > 0 _ ½D1 6 0 ^ D2 > 0 ^ D3 > 0 ^ D4 > 0 ^ D5 > 0.
219
J. Wu et al. / Applied Mathematics and Computation 250 (2015) 212–220
Let us explain several cases of the RRC of SðxÞ on ð1; 1Þ. For example, the algorithm SplineMSðSðxÞ; f1; 1g ^ f0gÞ is designated to generate the conditions for SðxÞ having two distinct real roots on ð1; 0Þ and no real root on ð0; 1Þ. It turns out that the output is MS ¼ f½1; 1; 1; 1 ^ ½1; 1; 1; 1; ½1; 1; 1; 1 ^ ½1; 1; 1; 1½1; 1; 1; 1 ^ ½1; 1; 0; 0g. The termination conditions is certainly satisfied and MS is just we want. These conditions can be expressed as ½D1 > 0 ^ D2 > 0 ^ D3 > 0 ^ D4 > 0. We consider the element f2g ^ f0g 2 PRRCð2; 1Þ and explain the case (3). We run the algorithm SplineMSðSðxÞ; f2g ^ f0gÞ and the output is MS ¼ f½1; 1; 0; 0 ^ ½1; 1; 1; 1; ½1; 1; 0; 0 ^ ½1; 1; 1; 1; ½1; 1; 0; 0 ^ ½1; 1; 0; 0g. We also have to determine ½0
½0
2
the possible sign lists of the polynomials in D sequence of h ðxÞ and D1 ðh ðxÞÞ ¼ 8bx 16c. We do the algorithm ½0
MultiRootðS0 ðxÞ; f2gÞ and found the sign list of D1 ðh ðxÞÞ is always ½1; 1; 1; 1. The termination condition holds. Thus, case (3) holds if and only if MS ¼ f½1; 1; 0; 0 ^ ½1; 1; 1; 1; ½1; 1; 0; 0 ^ ½1; 1; 1; 1½1; 1; 0; 0 ^ ½1; 1; 0; 0g. These conditions can be expressed as ½D1 > 0 ^ D3 ¼ 0 ^ D4 > 0. Other cases can be explained similarly. Now we consider case (9). It describes that SðxÞ > 0; 8x 2 ½1; 1. It equals to the output of algorithm SplineMSðSðxÞ; f0g ^ f0gÞ. The outcome is MS ¼ f½1; 0; 0; 1 ^ ½1; 0; 0; 1; ½1; 1; 1; 1 ^ ½1; 1; 1; 1; ½1; 1; 1; 1 ^ ½1; 1; 1; 1g. Thus, we can reach the necessary and sufficient conditions for SðxÞ > 0; 8x 2 ½1; 1 as defined in case (9). From the RRC of SðxÞ, we can obtain the conditions on b; c; d such that sðxÞ P 0; 8x 2 ð1; 1Þ, i.e., case (3), case (9) or case (11) holds. Meanwhile, we also found the maximum of the number of the real roots of SðxÞ is 3 (counted with multiplicity) if and only if one of cases (2), (4) (7) and (8) hold. The RRC of a given parametric spline is useful and we can know the distribution of real p roots ffiffiffi connivently without solving it numerically. For example, given a spline function with constant coefficients SðxÞ ¼ x2 þ 2x sin 1 þ ln 2 x2þ . It is easy to see D2 < 0 ^ D4 > 0 and it corresponds to the case (6). Therefore, SðxÞ has one single real root on ð1; 0Þ and one single real root on ð0; 1Þ. Example 4.2. Solve the real root classification of a given cubic parametric spline SðxÞ 2 S3 ½1; 0; 1 and 3 SðxÞ ¼ x3 þ bx þ c þ dxþ . This problem is equivalent to find the number of negative real roots of S0 ðxÞ ¼ x3 þ bx þ c and real roots of S1 ðxÞ ¼ ð1 þ dÞx3 þ bx þ c on ð0; 1Þ, respectively. Also, the conditions 1 þ d – 0; c – 0 and 1 þ b þ c þ d – 0 hold since the spline is regular and non-degenerate. 1 Set U½0 ðxÞ ¼ S0 ðxÞ; U½1 ðxÞ ¼ ð1 xÞn S1 1x ¼ 1 þ b þ c þ d ð2b þ 3cÞx þ ðb þ 3cÞx2 cx3 , and compute the negative root discriminant sequence of DiscrðU½0 ðxÞÞ and DiscrðU½1 ðxÞÞ, respectively,
2 n o : 3 2 3 3 ¼ 1; 0; 0; D1 ; D21 D3 ; D2 D23 3; 0; 0; 24b ; 4b 4b þ 27c2 ; c 4b þ 27c2 n 2 2 3 2 ¼ 3c3 ; 3c4 ðb þ 3cÞ; 2b c4 ðb þ 3cÞ; 2b c4 2b þ 3bc þ 2b c þ 9c2 þ 3bcd þ 9c2 d ; 3 2 3 c4 ð1 þ dÞ 2b þ 3bc þ 2b c þ 9c2 þ 3bcd þ 9c2 d 4b þ 27c2 þ 27c2 d ; 2
2 3 c4 ð1 þ dÞ ð1 þ b þ c þ dÞ 4b þ 27c2 þ 27c2 d
D½0 ¼ D½1
: ¼fD2 ; D4 ; D21 D4 ; D21 D6 ; D5 D6 D7 ; D27 D8 g; where
D1 ¼ b;
D2 ¼ c 3
D3 ¼ 4b þ 27c2 ; D4 ¼ b þ 3c; D5 ¼ 1 þ d 3
2
D6 ¼ 2b þ 3bc þ 2b c þ 9c2 þ 3bcd þ 9c2 d; 3
D7 ¼ 4b þ 27c2 þ 27c2 d; D8 ¼ 1 þ b þ c þ d: By a through and detailed analysis on the sign list of D½0 and D½1 , the real root classification of SðxÞ is: (1) f2g ^ f1g () ½D1 < 0 ^ D2 < 0 ^ D3 ¼ 0 ^ D5 > 0 ^ D8 > 0 (2) f2g ^ f0g () ½D1 < 0 ^ D2 < 0 ^ D3 ¼ 0 ^ D6 6 0 ^ D7 < 0 ^ D8 < 0 _ ½D1 < 0 ^ D2 < 0 ^ D3 ¼ 0 ^ D5 > 0 ^D7 > 0 ^ D8 < 0 (3) f1; 1g ^ f1g () ½D2 < 0 ^ D3 < 0 ^ D5 > 0 ^ D8 > 0 (4) f1; 1g ^ f0g () ½D2 < 0 ^ D3 < 0 ^ D6 6 0 ^ D7 < 0 ^ D8 < 0 _ ½D2 < 0 ^ D3 < 0 ^ D5 >0 ^D7 > 0 ^ D8 < 0 _ ½D2 < 0 ^ D3 < 0 ^ D6 < 0 ^ D7 ¼ 0 (5) f1g ^ f2g () ½D2 > 0 ^ D6 < 0 ^ D7 ¼ 0 (6) f1g ^ f1; 1g () ½D2 > 0 ^ D5 > 0 ^ D6 6 0 ^ D7 < 0 ^ D8 > 0 (7) f1g ^ f1g () ½D2 > 0 ^ D8 < 0
220
J. Wu et al. / Applied Mathematics and Computation 250 (2015) 212–220 Table 1 Running times of the two examples. Example
Example 4.1
Example 4.2
Running times (s)
45.3
97.6
(8) f1g ^ f0g () ½D2 > 0 ^ D5 > 0 ^ D6 6 0 ^ D7 > 0 ^ D8 > 0 _ ½D2 > 0 ^ D5 < 0 ^D6 6 0 ^ D7 < 0 ^ D8 > 0 _ ½D2 > 0^ D6 P 0 ^D8 > 0 _½D2 > 0 ^ D4 < 0 ^ D6 > 0 ^ D7 ¼ 0 (9) f0g ^ f2g () ½D2 < 0 ^ D3 > 0 ^ D6 > 0 ^ D7 ¼ 0 (10) f0g ^ f1; 1g () ½D2 < 0 ^ D3 > 0 ^ D5 < 0 ^ D6 P 0 ^ D7 > 0 ^ D8 < 0 (11) f0g ^ f1g () ½D2 < 0 ^ D3 > 0 ^ D8 > 0 (12) f0g ^ f0g () ½D2 < 0 ^ D3 > 0 ^ D5 > 0 ^ D7 > 0 ^ D8 < 0 _ ½D2 < 0 ^ D3 > 0 ^ D5 < 0 ^ D7 < 0 ^ D8 < 0 _ ½D2 < 0 ^D3 > 0 ^ D5 > 0 ^ D6 6 0 ^ D7 < 0 ^ D8 < 0 _ ½D2 < 0 ^ D3 > 0 ^ D5 < 0 ^ D6 6 0 ^ D7 > 0 ^ D8 < 0 _ ½D2 < 0 ^ D3 > 0 ^ D4 < 0 ^ D6 < 0 ^ D7 ¼ 0 Let us explain several cases of the RRC of SðxÞ on ð1; 1Þ. For example, For the case f1; 1; 1g ^ f0g 2 PRRCð3; 1Þ and the output of SplineMSðU; f1; 1; 1g ^ f0gÞ is the empty sequence NULL, they are not realizable. So it is not realizable that SðxÞ has three distinct real roots on ð1; 0Þ and no real root on (0, 1). Similarly, the elements in f1; 1; 1g ^ f1g; f2; 1g ^ f0g; f2; 1g ^ f1g; f3g ^ f0g; f3g ^ f1g; f0g ^ f1; 1; 1g; f1g ^ f1; 1; 1g; f0g ^ f1; 2g; f1g ^ f1; 2g; f0g ^ f3g ; f1g ^ f3g; f1; 1g ^ f1; 1g; f1; 1g ^ f2g; f2g ^ f1; 1g; f2g ^ f2gg PRRCð3; 1Þ are all not realizable. From the RRC of SðxÞ, we can obtain the conditions on b; c; d such that sðxÞ P 0; 8x 2 ð1; 1Þ, i.e., case (2), case (9) or case (12) holds. Meanwhile, we found the maximum of the number of the real roots of SðxÞ on ð1; 1Þ is 3 if and only if one of the following cases (1), (3), (5) and (6) holds. The discussion of computational complexity of the algorithm, at least on the computational efficiency is vital. We list the running times for the above two examples. Obviously, the proposed algorithm is relatively complex and time-consuming (see Table 1). Remark 4.1. Since the real root classification of spline functions is relatively complex especially when the splines possess higher degree and more parameters, so we only give two relatively simple examples to verify the flexibility of the proposed method. Indeed, we implement the above two examples by using Maple and DISCOVERER even though they may be solved by hand. We can implement other examples and the algorithm is relatively time-consuming even though we add manual intervention.
5. Conclusion In this paper, we propose an algorithm for the real root classification of a given spline function. It is primarily based on the existing work on complete root classification of a parametric polynomial. However, the proposed algorithm is not guaranteed that all non-realizable sign lists are detected and deleted. Moreover, the automatic computation of real root classification of a given spline function deserves further consideration. We will continue this issues in future work. Acknowledgments We appreciate the reviewers and editors for their careful reading, valuable comments, timely review and reply. References [1] S. Basu, R. Pollack, M.F. Roy, Algorithms in Real Algebraic Geometry, Springer-Verlag, 2003. [2] L. Yang, J.Z. Zhang, X.R. Hou, Nonlinear Algebraic Equation System and Automated Theorem Proving, Shanghai Scientific and Technological Education Publishing House, Shanghai, 1996. [3] L. Yang, Recent advances on determining the number of real roots of parametric polynomials, J. Symb. Comput. 28 (1999) 225–242. [4] L. Gonzalez-Vega, H. Lombardi, T. Recio, M.F. Roy, Sturm–Habicht sequences, determinants and real roots of univariate polynomials, in: B.F. Caviness, J.R. Johnson (Eds.), Quantifier Elimination and Cylindrical Algebraic Decomposition, Springer-Verlag, 1998, pp. 300–316. [5] S.X. Liang, D.J. Jeffrey, Automatic computation of the complete root classification for a parametric polynomial, J. Symb. Comput. 44 (2009) 1487–1501. [6] T.N.T. Goodman, New bounds on the zeros of spline functions, J. Approx. Theory 76 (1) (1994) 123–130. [7] C. de Boor, The multiplicity of a spline zero, Ann. Numer. Math. 4 (1997) 229–238. [8] T.A. Grandine, Computing zeros of spline functions, CAGD 6 (1989) 129–136. [9] K. Morken, M. Reimers, An unconditionally convergent method for computing zeros of splines and polynomials, Math. Comput. 76 (2007) 845–865. [10] R.H. Wang, J.M. Wu, Real roots isolation of spline functions, J. Comput. Math. 26 (2008) 69–75. [11] Y.S. Lai, R.H. Wang, J.M. Wu, Real zeros of the zero-dimensional parametric piecewise algebraic variety, Sci. China (Ser. A) 52 (2009) 817–832. [12] Y.S. Lai, R.H. Wang, J.M. Wu, Solving parametric piecewise polynomial systems, J. Comput. Appl. Math. 236 (2011) 924–936. [13] J.M. Wu, X.L.Zhang, An algorithm for isolating the real solutions of piecewise algebraic curves, J. Appl. Math., vol. 2011, 10p, http://dx.doi.org/10.1155/ 2011/658282 (Article ID 658282). [14] J.M. Wu, Real intersection points of piecewise algebraic curves, Appl. Math. Lett. 25 (2012) 1299–1303. [15] R.H. Wang, Numerical Approximation, Higher Education Press, Beijing, 1999. [16] B.C. Xia, DISCOVERER: a tool for solving semi-algebraic systems, ACM SIGSAM Bull. 41 (2007) 102–103.