<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Decomposition Algorithm of Generalized Horner Scheme for Multidimensional Polynomial Evaluation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alexander P. Afanasiev</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Irina I. Emelyanova</string-name>
          <email>emelyanova-123@yandex.ru</email>
          <xref ref-type="aff" rid="aff4">4</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sergei M. Dzyuba</string-name>
          <email>sdzyuba@mail.ru</email>
          <xref ref-type="aff" rid="aff4">4</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Elena V. Putilina</string-name>
          <email>elena@iitp.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute for Information Transmission Problems, Russian Academy of Sciences</institution>
          ,
          <addr-line>Nakhimovsky Prospekt 36-1, Moscow 117218</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Lomonosov Moscow State University</institution>
          ,
          <addr-line>GSP-1, Vorobievy Gory, Moscow 119991</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>National Research University Higher School of Economics</institution>
          ,
          <addr-line>Myasnitskaya str., 20, Moscow 101000</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>National University of Science and Technology MISiS</institution>
          ,
          <addr-line>Leninskiy Prospekt 4, Moscow 119049</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff4">
          <label>4</label>
          <institution>Tver State Technical University</institution>
          ,
          <addr-line>Af. Nikitin emb. 22, Tver 170026</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <fpage>7</fpage>
      <lpage>12</lpage>
      <abstract>
        <p>We suggested a decomposition algorithm of multidimensional polynomials evaluation performing according to the generalized Horner scheme. The generalized Horner scheme is described in detail; we also demonstrate that in the vast majority of real situations this scheme can be decomposed easily and naturally. As a use-example, we study the problem of evaluation of classic quasipolynomials.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <sec id="sec-1-1">
        <title>Let’s consider a multidimensional polynomial</title>
        <p>pn(x) =</p>
        <p>N N
∑ : : : ∑
i1=0
in=0
ai1:::in xi11 : : : xinn ;
(1:1)
where x = (x1; : : : ; xn) is an n-dimensional real data vector, ai1:::in are constant real coefficients of the
polynomial and N is some natural number representing the maximal degree attained by at least one of the variables
x1; : : : ; xn.</p>
        <p>
          The problem of the polynomial evaluation (1.1) is rather popular. It is explained by the fact that different
mathematical objects such as the right sides of ordinary differential equations, constraints of nonlinear
programming problems, initial and boundary conditions of mathematical physics problems and many others are described
by these polynomials
          <xref ref-type="bibr" rid="ref1 ref2">(see [Afanasiev, 2005]–[Afanasiev &amp; Dzyuba, 2015b])</xref>
          .
        </p>
        <p>
          It is well-known that polynomial evaluation of the form (1.1) of one variable is easy to perform in terms of
the Horner scheme allowing in many cases to reduce the number of machine operations resulting in reduction
of computation error
          <xref ref-type="bibr" rid="ref1 ref3 ref5">(see [Afanasiev, 2005], [McCracken &amp; Dorn, 1965]–[Cormen et al., 2009])</xref>
          . As for
multidimensional polynomials several computational algorithms representing different generalizations of Horner scheme
to a multidimensional case are known nowadays
          <xref ref-type="bibr" rid="ref1">(see [Afanasiev, 2005])</xref>
          .
        </p>
        <p>Here we should point out an important work [Dowling, 1990], presenting a multidimensional performance of the
generalized Horner scheme, this performance applying parallel computations. Besides, the work [Dowling, 1990]
provides an important evaluation of parallel computations steps as a function of n and N parameters and of the
number of the processors applied.</p>
        <p>
          The distinctive feature of the indicated algorithms is that the multidimensional analog of Horner scheme,
in contrast to the scalar one, not only reduces the amount of computation and reduces the error, but also
represents additional opportunities. A namely, a possibility of computation process decomposition accompanies
to the advantages of the one-dimensional scheme
          <xref ref-type="bibr" rid="ref1">(see [Afanasiev, 2005])</xref>
          . However, all known results either are
attributed to special cases of polynomial or have no detailed extended characterization.
        </p>
        <p>
          The main goal of this paper is the construction and analysis of complete generalized Horner scheme for
multidimensional polynomials evaluation (1.1). Special focus will be on the description of the scheme and the algorithm
related to the scheme, especially oriented on decomposing of computation process
          <xref ref-type="bibr" rid="ref1">(see [Afanasiev, 2005])</xref>
          .
        </p>
        <p>
          As it will be demonstrated, this variant of the scheme is focused on being performed in a distributed computer
environment. Additionally, we shall note that the stated algorithm was developed to meet the needs of the
optimization theory in connection with the issue of constructing approximate solutions for the problem of control
of nonlinear systems via quadratic criteria within long time intervals
          <xref ref-type="bibr" rid="ref7">(see [Afanasiev et al., 2016])</xref>
          .
2
        </p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Generalized Horner Scheme</title>
      <p>
        The Horner scheme for one-dimensional polynomials is well known and is under study in many papers
        <xref ref-type="bibr" rid="ref1">(see
[Afanasiev, 2005])</xref>
        . The point is as follows.
      </p>
      <p>Let’s consider a real one-dimensional polynomials
p1(x) =</p>
      <p>N
∑ aixi;
i=0
where ai are some real numbers and x is a real variable. According to [5], the Horner scheme for polynomial
(2.1) appears as follows:
(2:1)
(2:2)
(2:3)
(2:4)
of x and y real variables. For the polynomial evaluation (2.3) let’s state y variable and assume</p>
      <p>N N
p2(x; y) = ∑ ∑ aij xiyj</p>
      <p>Remark 1. Let’s clarify the meaning of the Horner scheme use. For this purpose let’s consider a complete
polynomial, i.e. a polynomial in which all ai coefficients are different from zero.</p>
      <p>
        Let’s assume that for the polynomial evaluation by (2.1) the innermost brackets are expanded first. Further
it is easily seen that N multiplications and N additions are required by the Horner scheme for (2.1) polynomial
evaluation. Therewith, the number of machine operations for the evaluation by (2.1) equal to N (N + 1)=2, if only
each x degree is obtained by sequential multiplication by x, i.e. xk = xk 1x
        <xref ref-type="bibr" rid="ref3">(see [McCracken &amp; Dorn, 1965])</xref>
        .
      </p>
      <p>This means that the greater N value the closer to complete is the polynomial (2.1) the Horner scheme use
(2.2) becomes more effective, which allows in similar cases to reduce a number of machine operations essentially
and thus to reduce computation error.</p>
      <p>Let’s illustrate the generalization of the scheme (2.2) meant for multidimensional polynomials evaluation of
the form (1.1) on the following example.</p>
      <p>Example 1. Let’s consider a classic real polynomial
Then if one consider with y defined as polynomial of one x real variable, then, acting by analogy to (2.1) and
(2.2), we hold:
p2(x; y) = ((: : : (( N (y)x +</p>
      <p>N 1(y))x +</p>
      <p>N 2(y))x + : : :
: : : +
2(y))x +
1(y))x +
0(y):</p>
      <p>It is easily seen that with any y defined the scheme (2.5) is a primitive generalization of the one-dimensional
Horner scheme to polynomial (2.3). To obtaining a finer generalization let’s note that each y ! i(y) function is
one-dimensional polynomial. Thus, applying the one-dimensional Horner scheme to polynomial (2.4), we assume
i(y) = ((: : : ((aiN y + ai;N 1)y + ai;N 2)y + : : : + ai2)y + ai1)y + ai0;</p>
      <p>i = 0; : : : ; N:</p>
      <p>Thus (2.5) and (2.6) equalities provide generalized Horner scheme (1.1) for polynomial evaluation (2.3). It is
apparent from these equalities show that in the general case Horner scheme use allows to considerably reduce
computation process in comparison to brute force computation by (2.3).</p>
      <p>Going now over to construction of generalized Horner scheme for polynomial (1.1) in the general case let’s
state x2; : : : ; xn variables and assume</p>
      <p>Let’s now note that each (x2; : : : ; xn) ! i1 (x2; : : : ; xn) function defined by equality (2.7) is a multidimensional
polynomial of x2; : : : ; xn variables. For these polynomials evaluation let’s state x3; : : : ; xn variables and assume</p>
      <sec id="sec-2-1">
        <title>Then we hold</title>
        <p>Then acting by analogy to (2.1) and (2.2) we hold:
(2:5)
(2:6)
(2:7)
(2:8)
(2:9)
i1 (x2; : : : ; xn) =</p>
        <p>ai1i2:::in xi22 : : : xinn ; i1 = 0; : : : ; N:
pn(x) = ((: : : (( N (x2; : : : ; xn)x1 +
N 1(x2; : : : ; xn))x1+
+ N 2(x2; : : : ; xn))x1 + : : : +</p>
        <p>2(x2; : : : ; xn))x1+
+ 1(x2; : : : ; xn))x1 +
0(x2; : : : ; xn):
i1i2 (x2; : : : ; xn) =</p>
        <p>ai1i2i3:::in xi33 : : : xinn ; i1; i2 = 0; : : : ; N:
i1 (x2; : : : ; xn) = ((: : : (( i1N (x3; : : : ; xn)x2+
+ i1;N 1(x3; : : : ; xn))x2 + i1;N 2(x3; : : : ; xn))x2 + : : :
: : : + i12(x3; : : : ; xn))x2 + i11(x3; : : : ; xn))x2 + i10(x3; : : : ; xn);
Acting in a similar way for k = 1; : : : ; n</p>
      </sec>
      <sec id="sec-2-2">
        <title>1 arbitrary value, let’s assume</title>
        <p>N N
= ∑ : : : ∑
ik+1=0
in=0
ai1:::ikik+1:::in xikk++11 : : : xinn ; i1; : : : ; ik = 0; : : : ; N:
It follows that for all k = 2; : : : ; n</p>
      </sec>
      <sec id="sec-2-3">
        <title>1 values</title>
        <p>i1:::ik 1 (xk; : : : ; xn) = (: : : (( i1:::ik 1N (xk+1; : : : ; xn)xk+
+ i1:::ik 1;N 1(xk+1; : : : ; xn))xk + i1:::ik 1;N 2(xk+1; : : : ; xn))xk + : : :)xk+</p>
        <p>+ i1:::ik 10(x3; : : : ; xn); i1; : : : ; ik 1 = 0; : : : ; N:
recurrence relation is correct.</p>
        <p>Provided that
= ((: : : ((ai1:::in 1N xn + ai1:::in 1;N 1)xn + ai1:::in 1;N 2)xn + : : :
: : : + ai1:::in 12)xn + ai1:::in 11)xn + i1:::in 10;</p>
        <p>i1; : : : ; in 1 = 0; : : : ; N:</p>
        <p>The relations (2.8)–(2.10) define the generalized Horner scheme for polynomial evaluation (1.1). In many cases
this scheme allows to reduce computation. As will be seen in section 3, in the general case scheme (2.9) and
(2.10) admits decomposing, and the validity of the following statement is established by simple computation.</p>
        <p>The number of operations for polynomial evaluation (1.1) according to the generalized Horner scheme is
equivalent to the number of operations for evaluation of not more than</p>
        <p>N =
n 1
∑(N + 1)i
i=0
one-dimensional polynomials of the form (2.1) by the Horner scheme.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Algorithm</title>
      <p>For the purpose of implementation of the above-described generalized Horner scheme we will use an n-steps
algorithm focused on the computation process decomposition.</p>
      <p>Step 1. Here we evaluate the functions xn ! i1:::in 1 (xn) by (2.10). Evidently, each of these functions can
be constructed independently. That’s why the process of construction can be decomposed naturally into parallel
evaluations of all these functions.</p>
      <p>Steps 2; : : : ; n 1: At these steps for k = n 1; : : : ; 2 by (2.9) we evaluate the functions (xk; : : : ; xn) !
i1:::ik 1 (xk; : : : ; xn): Like at step 1, each of these functions can be built independently, i.e. here the process of
construction can be, in the general case, also decomposed naturally into parallel evaluations of all these functions.</p>
      <p>Step n: This step is the simplest one: at this step we evaluate the functions x ! pn(x) by (2.8).</p>
      <p>Remark 2. Evidently, the higher the values of n and N are, the greater effect is produced by the computation
process decomposition on parallel nodes. In other words, the generalized Horner scheme efficiency for the nearly
complete polynomials can be additionally boosted by the natural decomposition of the computation process.</p>
      <p>Remark 3. In the course of operation the necessity of polynomial evaluation (1.1) at various x vector
values can occur. Obviously, every such computation doesn’t depend on others and these computations can be
performed in parallel on independent nodes. As it will be shown below in section 4, in some cases the latter
ensures essential simplification of the classic problem of finding the zeros of quasipolynomials (see ex. 2).
4</p>
      <p>Evaluation of the Simplest Quasipolynomial
As one more example of the use of the generalized Horner scheme let’s consider the problem of classical
quasipolynomials evaluation.</p>
      <p>Example 2. Let’s consider</p>
      <p>
        p˜2(t) = p2(t; exp t)
function of t real variable where p2 is the polynomial of x = t and y = exp t variables described in the example 1.
The study of zeros of this function (in general terms, of a quasipolynomial) is essential to the Lyapunov theory
of stability of motion
        <xref ref-type="bibr" rid="ref8">(see [Pontryagin, 1955])</xref>
        . Let’s here turn to more simple problem of its evaluation.
      </p>
      <p>Considering that p2 is polynomial of x = t and y = exp t variables then acting by analogy to (2.5) and (2.6),
we can write</p>
      <p>p˜2(t) = (: : : (( ˜N (t) exp t + ˜N 1(t)) exp t + ˜N 2(t)) exp t + : : :) exp t + ˜0(t);
where</p>
      <p>˜i(t) = (: : : ((aiN t + ai;N 1)t + ai;N 2)t + : : :)t + ai0; i = 0; : : : ; N;
which defines the generalized Horner scheme for the quasipolynomial evaluation.</p>
      <p>Thus according to (4.2) and (4.3) relations it is easy to notice that the generalized Horner scheme described
in the example 1 can be in some cases used efficiently use for classical quasipolynomial evaluation.
(2:10)
(2:11)
(4:1)
(4:2)
(4:3)</p>
      <p>In order to verify this, let’s suppose that the roots of the quasipolynomial (4.3) are localized within a certain
interval [a; b]. Let’s assume some natural number k and state
and
" =
(b</p>
      <p>a)
k
ti = i"; i = 0; : : : ; k:
(4:4)
It seems clear that evaluation of the quasipolynomial (4.1) at any point of the set (4.4) can be performed
independently of the others, i.e. in parallel, for instance, on independent nodes. Thus, providing there are enough
independent nodes, finding the zeros of the quasipolynomial (4.1) requires no great timing budgets. Therewith,
as it was stated in Ex. 1, performing the evaluation by means of the generalized Horner scheme allows, in many
cases, to reduce the number of machine operations. The latter reduces the error and computation time.
5</p>
    </sec>
    <sec id="sec-4">
      <title>Discussion</title>
      <p>The distinctive feature of the generalized Horner scheme described herein is the obvious possibility of computation
process decomposition.</p>
      <p>According to section 2, the computation process decomposition is always possible in case of availability the
additive component distinctive in the polynomial (1.1). This condition is simple and natural because its failure
means that in practice (1.1) represents a direct analogy of a one-dimensional polynomial.</p>
      <p>In other words in almost all real situations the algorithm representing the generalized Horner scheme admits
decomposition. Moreover, the level of the algorithm decomposition is easily rated.</p>
      <p>Actually, let’s consider for simplicity only the first stage of the algorithm. At step 1 of this stage the symbolic
construction of xn ! i1:::in 1 (xn) function is realized provided that each of this functions can be constructed
independently. A number of these functions as it is easy to see can get to (N + 1)(n 1). It follows that the
computation process at this step can in general terms decompose into (N + 1)(n 1) of parallel computation
processes.</p>
      <p>In a similar way, at step 2 of the stage 1 the computation process can be decomposed into (N + 1)(n 2) of
parallel computation processes and so on.</p>
      <p>Thus, according to remark 1, if the total number of one-dimensional polynomials equals to N (see 2.11),
then the total number of machine operations of addition and multiplication is 2N N . Proceeding from the
above, if there are (N + 1)(n 1) processors, then the total number of parallel addition and parallel multiplication
operations, featured during the decomposition of the parallel computation processes, will amount to 2N n, where
n &lt;&lt; N in the general case.</p>
      <p>It should be noted that the number (N + 1)(n 1) can be rather large. That’s why the implementation of the
above-described algorithm is focused, in the general case, on a distributed computer environment featuring a
rather large number of processors.</p>
      <p>Acknowledgements
This work was supported by Russian Scientific Foundation, Project 16-11-10352.</p>
      <p>Kom[Afanasiev &amp; Tarasov, 2006] Afanasiev, A.P., Tarasov, A.S. (2006). Quasi-analytic system solution of differential
equations with polynomial right side. Coll. of works of ISA RAN Problems of estimation in a distributed
environment: distributed systems, communications systems, symbolic models and optimization, (25),
165–183.
[Afanasiev &amp; Dzyuba, 2015a] Afanas’ev, A.P., Dzyuba, S.M. (2015). Method for constructing approximate
analytic solutions of differential equations with a polynomial right-hand side. Comp. Math. and Math.
Phys., 55(10), 1665–1673.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <source>[Afanasiev</source>
          , 2005] Afanasiev,
          <string-name>
            <surname>A.P.</surname>
          </string-name>
          (
          <year>2005</year>
          ).
          <article-title>Extension of trajectory toward optimal control</article-title>
          . Moscow: Kniga/URSS.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <source>[Afanasiev &amp; Dzyuba</source>
          , 2015b]
          <article-title>Afanas'ev,</article-title>
          <string-name>
            <given-names>A.P.</given-names>
            ,
            <surname>Dzyuba</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.M.</surname>
          </string-name>
          (
          <year>2015</year>
          ).
          <article-title>Construction of minimal sets of differential equations with a polynomial right hand-side</article-title>
          .
          <source>Diff. Eqns</source>
          ,
          <volume>51</volume>
          (
          <issue>11</issue>
          ),
          <fpage>1403</fpage>
          -
          <lpage>1412</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <source>[McCracken &amp; Dorn</source>
          , 1965]
          <string-name>
            <surname>McCracken</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dorn</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          (
          <year>1965</year>
          ).
          <article-title>Numerical methods and FORTRAN programming</article-title>
          . New York: John Willey and Sons.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <source>[Levitin</source>
          , 2006] Levitin,
          <string-name>
            <surname>A.V.</surname>
          </string-name>
          (
          <year>2006</year>
          ).
          <article-title>Algorithms. Introduction into development and analysis</article-title>
          . Moscow: Williams.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [Cormen et al.,
          <year>2009</year>
          ] Cormen,
          <string-name>
            <given-names>T.H.</given-names>
            ,
            <surname>Leiserson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.E.</given-names>
            ,
            <surname>Rivest</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.L.</given-names>
            ,
            <surname>Stein</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          (
          <year>2009</year>
          ).
          <article-title>Intorduction to the algorithms</article-title>
          . New York: MIT Press and
          <string-name>
            <surname>McGraw-Hill</surname>
          </string-name>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <source>[Dowling</source>
          , 1990]
          <string-name>
            <surname>Dowling</surname>
            <given-names>M. L.</given-names>
          </string-name>
          (
          <year>1990</year>
          ).
          <article-title>A fast parallel Horner algorithm</article-title>
          .
          <source>SIAM Journal on Computing</source>
          ,
          <volume>19</volume>
          (
          <issue>1</issue>
          ),
          <fpage>133</fpage>
          -
          <lpage>142</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [Afanasiev et al.,
          <year>2016</year>
          ] Afanasiev,
          <string-name>
            <given-names>A.P.</given-names>
            ,
            <surname>Dzyuba</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.M.</given-names>
            ,
            <surname>Emelyanova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.I.</given-names>
            ,
            <surname>Ramazanov</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.B.</surname>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>Optimal control with feedback of some class of nonlinear systems via quadratic criteria</article-title>
          .
          <source>Appl</source>
          . Comp. Math.,
          <volume>19</volume>
          (
          <issue>1</issue>
          ),
          <fpage>78</fpage>
          -
          <lpage>87</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <source>[Pontryagin</source>
          , 1955] Pontryagin,
          <string-name>
            <surname>L.S.</surname>
          </string-name>
          (
          <year>1955</year>
          ).
          <article-title>On the zeroes of some elementary transcendental functions</article-title>
          .
          <source>Amer. Math. Soc. Transl. Ser.</source>
          ,
          <volume>2</volume>
          (
          <issue>1</issue>
          ),
          <fpage>95</fpage>
          -
          <lpage>110</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>