1. Introduction
Discrete best approximation problems, where sample data are fitted to a parameterized function by adjusting parameters, constitute an essential area of study in approximation theory and its applications [
1,
2]. The best approximation problems are formulated to find those values of the parameters which provide a minimum discrepancy between the sample data and approximating function in the sense of some metric defined on a vector space to represent the approximation error. As notable examples of approximation problems, which date back to Laplace’s classic work [
3] (Book 3, Chapter V, §39), one can consider problems where the approximating functions are piece-wise linear and the error is measured by the Chebyshev metric. These problems are still of sufficient interest and find application in the solution of overdetermined systems of linear equations, regression analysis when the distribution of errors has bounded support, and other research and applied contexts.
Since the 1960s, a variety of solutions have been developed to handle the discrete best approximation problems with both Chebyshev and other metrics, as shown in the overviews in [
4,
5]. Methods and techniques used to solve the problems include linear programming [
6,
7,
8,
9], dynamic programming [
10,
11], and other optimization approaches [
5,
12,
13,
14,
15,
16]. The proposed solutions normally offer optimal or near-optimal results that can be obtained with moderate polynomial computational complexity.
Another approach to formulate and solve best approximation problems is based on the models and methods of tropical algebra [
17,
18,
19,
20,
21,
22,
23,
24]. This algebra is concerned with the theory of algebraic systems with idempotent operations and finds applications in a range of areas from algebraic geometry to operations research. An example of such systems is max-plus algebra, which is a tropical (idempotent) semifield thought of as a set of reals, where addition is defined as maximum and multiplication as arithmetic addition. Another example is max-algebra, a tropical semifield of nonnegative reals, where addition is defined as maximum and multiplication as usual.
Reformulation of a range of problems that are nonlinear in conventional mathematics into the setting of tropical algebra transforms them into linear problems in the tropical sense, which facilitates the formal analysis and simplifies the derivation of a solution. Using the representation in terms of tropical algebra appears to be fruitful in problems that use mathematical models based on max or min operations, including minimax optimization problems. Methods of optimization in the context of tropical algebra (tropical optimization) are applied to solve many real-world problems in project scheduling, location analysis, decision-making and other fields. In many cases, the methods of tropical optimization can provide analytical solutions in compact closed form for problems that are known to have only numerical algorithmic solutions available.
Existing solutions to approximation problems in the tropical algebra setting mainly concentrate on the best approximation of vectors in tropical linear spaces [
22,
25,
26]. Applications of tropical algebra to solve discrete best approximation problems of functions, which can be found in recent works on neural networks and machine learning (see, e.g., [
27,
28,
29,
30]), present another line of investigation that needs further exploration. As an attempt to address this need, a general problem of discrete best approximation with respect to a generalized metric is introduced and examined in the framework of tropical algebra in [
31,
32]. The problem is formulated to approximate functions defined on tropical semifields with generalized tropical Puiseux polynomials and rational functions used as approximants.
A Puiseux polynomial is defined in the same way as classical polynomials in which the exponents can be set to rational numbers. Tropical Puiseux polynomials that appear in the approximation, have the form where addition and multiplication are defined in terms of tropical algebra [
33,
34]. Unlike the ordinary Puiseux polynomials with exponents assumed to be rational, the generalized polynomials may have real exponents. The Puiseux polynomials find applications in a range of fields, including algebraic geometry [
20,
23], image processing [
35,
36], cryptography [
37,
38], game theory [
39,
40], neural networks [
30,
41] and others. The rational functions used as approximants take the form of tropical ratios of Puiseux polynomials. In the context of max-plus algebra, the rational functions define ordinary piecewise linear functions, whereas the tropical metric coincides with the standard Chebyshev metric. This offers a great opportunity to handle conventional discrete best Chebyshev approximation problems through the solution of corresponding approximation problems in the tropical algebra setting and makes the development of new methods and techniques of tropical discrete best approximation problems important.
In this paper, we consider discrete best approximation problems that are formulated and solved in the framework of tropical algebra. Given a set of input–output pairs of an unknown function defined on a tropical semifield, the problem is to determine an approximating rational function formed by two Puiseux polynomials as its numerator and denominator. With specified numbers of monomials in both polynomials, the approximation aims at evaluating the exponent and coefficient for each monomial in the polynomials to fit the rational function to the given data in the sense of a tropical distance function.
To solve the approximation problem, we follow the approach developed in [
32,
42] to transform the problem into an approximation of a vector equation with unknown vectors on both sides, where one side corresponds to the numerator polynomial and the other side to the denominator. Each side of the equation involves a matrix with entries dependent on the unknown exponents, multiplied by the vector of unknown coefficients of monomials in the polynomial. We develop a computational procedure based on the alternating algorithm proposed in [
31], which constructs a series of approximate solutions by alternately fixing one side of the equation to an already found result and leaving the other intact.
In the same way as in [
32], each obtained equation with one fixed side is first approximated with respect to the vector of coefficients. We apply the solution proposed in [
43,
44], which results in a vector of coefficients and approximation error, both parameterized by the exponents. Furthermore, the values of exponents are found by minimizing the approximation error with an optimization procedure developed in [
32] on the basis of an agglomerative clustering technique. To illustrate applications, we present results for approximation problems formulated in terms of max-plus algebra, which correspond to ordinary problems of piecewise linear approximation of real functions.
We consider the purpose of this paper as the first communication about the proposed approximation approach, mainly aimed at a general description of the method and confirmation of its workability. A formal convergence analysis that allows estimating the computational complexity of the solution, as well as analytical and experimental comparison with other existing solutions, is intended to be a subject for further research.
The rest of the paper is organized as follows. We start in
Section 2 with an overview of key definitions, notations, and preliminary results of tropical algebra. We continue in
Section 3 to consider tropical polynomials and rational functions.
Section 4 introduces and discusses problems of tropical best discrete approximation by polynomials and rational functions. We describe the procedure of polynomial approximation in detail in
Section 5.
Section 6 presents the main outcome of the study, which combines previous results to develop a procedure of rational approximation. We give numerical and graphical examples in
Section 7 to illustrate the findings.
Section 8 offers some concluding remarks.
2. Preliminary Definitions, Notations and Results
In this section, we outline basic definitions and notations, and describe preliminary results of tropical algebra to present an analytical framework for solving the approximation problems under consideration. For additional details on the theory and methods of tropical mathematics, one may refer to monographs and textbooks [
17,
18,
19,
20,
21,
22,
23,
24], and references therein.
2.1. Tropical Semifield
Consider a set that is closed under operations ⊕ (addition) and ⊗ (multiplication) and has elements (zero) and (one). We assume that is a commutative idempotent monoid, is an Abelian group, and multiplication ⊗ distributes over addition ⊕. Under these assumptions, the algebraic system is referred to as the tropical (or idempotent) semifield.
In the tropical semifield, addition is idempotent, which means that for each . The idempotent addition induces on a partial order such that if and only if . With respect to this order, addition and multiplication are monotone in the sense that if for , then and for any . Addition possesses an extremal property (majority law) which says that and . Finally, the inequality is equivalent to the system of inequalities and .
In what follows, we further assume that addition satisfies the property of selectivity in the form , and thus the order associated with the addition is a total order.
Multiplication is invertible, which provides any with its inverse such that . The integer powers are defined in the usual way as , , and for any and integer . It is assumed that the integer powers can be extended to rational and then to real powers to make exponentiation with real exponents be defined as well. The exponentiation is monotone, which means that for any , the inequality yields the inequality if , and if .
In the algebraic expressions below, the exponents are thought of in the sense of tropical algebra unless otherwise specified. We omit the multiplication symbol ⊗ to save writing.
Examples of the tropical semifields include real semifields that are defined on the sets
and
, where
, and given by
In the semifield , which is also known as max-plus algebra, addition ⊕ is defined as operation max, and multiplication ⊗ as arithmetic addition +. The zero is set to the number , and the one to the arithmetic zero 0. The inverse is equal to the opposite number , and the power to the product in standard arithmetic.
We illustrate the operations in with the next numerical examples (where the symbols + and × indicate the usual arithmetic addition and multiplication).
The semifield (max-algebra) has the operations and , and the neutral elements and . The inversion and exponentiation are defined as usual. The order induced by addition in both semifields and coincides with the natural linear order on . Examples are straightforward and hence are omitted.
Finally, we note that the above semifields are obviously isomorphic to each other by the mappings exp: and log: .
2.2. Distributive Properties
On the basis of the extremal property of addition, a maximum operation is given by for any . A dual minimum operation can then be defined in the following form: if , and otherwise.
We now present distributive properties for addition ⊕ (max) and min, which are used in the solution of approximation problems below. First, assume that there are scalars
for all
and
, where
M and
N are positive integers. Let
denote a partition that divides the set of naturals
into
N parts. The following identity extends the usual distributivity of the operation max over min to provide a distributive property of addition ⊕ over min (see, e.g., [
32]):
where the minimum on the right-hand side is taken over all partitions
.
Suppose that given some functions
for all
, we consider a new function defined as the sum
. The new function is of the form of max-separable functions, which were investigated in [
45,
46,
47]. Because of the separability, the minimization of this function over all
reduces to the evaluation of the minimum of each function
, which leads to the following distributive identity:
2.3. Algebra of Matrices and Vectors
The matrices and vectors with entries in are defined in the usual way. The set of matrices of M rows and N columns is denoted by . The set of column vectors of N elements is denoted by . A matrix (vector) that has all entries equal to is the zero matrix (vector) denoted . A matrix without zero rows (columns) is called row-regular (column-regular). A matrix is referred to as regular if it is both row- and column-regular.
The operations on matrices (vectors) follow the standard entrywise rules, where the arithmetic addition and multiplication are replaced by the operations ⊕ and ⊗. In what follows, matrix (vector) multiplication is understood only in the sense of tropical algebra, and the matrix (vector) multiplication sign ⊗ is omitted. Specifically, for conforming matrices
,
,
, and scalar
x, the matrix operations are given by
The monotonicity properties of the scalar operations ⊕ and ⊗ extend to the matrix (vector) operations where the inequalities are understood entrywise.
Let be a nonzero column vector. The multiplicative conjugate transpose of is a row vector that has the entries if , and otherwise.
The support of a vector
in
is defined as
. For nonzero vectors
and
in
, such that
, the distance between the vectors is given by the function
If , then we put , where ∞ denotes an undefined value greater than any element in . In the case that , we assume that .
In the framework of max-plus algebra
where
, the function
d coincides for all
with the Chebyshev metric, which is given in standard notation by
In the case of max-algebra , the function d can be considered as a generalized metric with values in the interval . Due to the isomorphism between and , this function can be transformed into a metric .
2.4. Best Approximate Solution to Vector Equations
Given a matrix
and vector
, consider the problem of finding vectors
that satisfy the equation with the unknown on one side in the form
where the left-hand matrix-vector multiplication is performed in the tropical algebra sense.
Solutions to this one-sided equation are known in various forms depending on the assumptions and technique used. Since Equation (
4) may have no solution, one can consider finding a best approximate solution in the sense of the metric
d. A vector
is a best approximate solution of the equation if for all vectors
the following inequality holds:
The next approximate solution is given in [
43,
44].
Theorem 1. Let be a regular matrix and a regular vector. Define the scalar . Then, the following statements hold:
The computational complexity of the solution is at most .
Suppose given matrices
and
, we need to find regular vectors
and
that solve the two-sided equation
An alternating algorithm to obtain a best approximate solution to Equation (
5) in the case of regular matrices is proposed and its convergence is examined in [
42], where references to other existing solutions of the problem are also given. The algorithm is described as an iterative computational procedure in the following form (Algorithm 1).
| Algorithm 1: Approximate solution of two-sided equation |
|
As the algorithm output, one obtains the approximation error and approximate solutions and . If , then the obtained vectors and are an exact solution.
We observe that calculation of the squared error and solution vector at each iteration requires no more than operations.
3. Tropical Polynomials and Rational Functions
Tropical polynomials are defined as analogues of the polynomials in the usual setting, where the ordinary addition, multiplication, and exponentiation are replaced by their tropical counterparts. In the approximation problems below, we use tropical analogues of generalized Puiseux polynomials in which the exponents can take any real values.
3.1. Puiseux Polynomial Functions
We consider a (generalized) Puiseux polynomial over
with
N monomials in one variable
x, which is given by
where
are exponents and
are nonzero coefficients.
If interpreted in terms of max-plus algebra
, the polynomial can be expressed using standard arithmetic operations in the form
with
and
, and defines a piecewise linear convex function.
In the context of max-algebra
, the polynomial is represented using ordinary operations as a spline function
where
and
, which may not be convex.
We observe that the isomorphism between the semifields
and
provides a one-to-one correspondence between polynomials given in terms of these semifields. Specifically, taking a logarithm to a base greater than one, which is monotone increasing, transforms a max-algebra polynomial
into a max-plus algebra polynomial as
with new indeterminate
and coefficients
for all
.
As a result, the calculation of polynomials in the context of max-algebra can be directly reduced to that in terms of max-plus algebra and vice versa.
We conclude this subsection with a polynomial optimization problem that is involved in the approximation procedure presented below. Consider a minimization problem of a polynomial function (
6) formulated in the form
where the polynomial is assumed to have exponents
of different signs.
To solve the problem, one can apply the next result obtained in [
48] (see also [
32]).
Lemma 1. The minimum in problem (7) is given byand all solutions of (7) satisfy the condition This solution has computational complexity that grows not faster than .
3.2. Puiseux Rational Functions
Suppose two polynomials of
N and
L monomials are given in the form
Taking these polynomials as a numerator and denominator, we define a (generalized) Puiseux rational function of one variable
x to be
In the setting of max-plus algebra , the rational function appears to be a difference of two piecewise linear convex functions, whereas in max-algebra , this function becomes a ratio between two spline functions.
The class of real difference-of-convex (DC) functions is known to be very rich [
49,
50]. Specifically, any continuous function can be approximated by a DC function, which makes the approximation by Puiseux rational functions theoretically and practically sound.
We note that, as in the case of polynomials, any tropical rational function given in terms of max-algebra can be directly transformed into one in the max-plus algebra setting.
4. Tropical Best Discrete Approximation Problems
We consider the best discrete approximation problems that are formulated and solved in the framework of tropical algebra. Suppose that the sample data of
M values
at points
are given for an unknown function
. The discrete approximation of the function
is to fit the data to a parametric function
by finding a vector of parameters
that achieves minimal difference between both sides of the equations
We use the vector notation
,
and
, and then arrive at a problem of best approximation in the sense of the distance function
d in the form
An approximate solution is found as a minimizer
Below we outline problems of best discrete approximation by Puiseux polynomials and rational functions and discuss solution approaches under various assumptions.
4.1. Approximation by Polynomial Functions
Consider the approximation of an unknown function
by a polynomial function
given by (
6). We formulate the problem to find both exponents
and coefficients
that provide the best agreement between two sides of the equations
To solve the problem, we first introduce the vectors and matrix
With this notation, Equation (
9) can be rewritten in vector form as
We formulate the problem as the best approximation of the vector equation at (
10) in the sense of the distance function
d to find
If the vector of exponents
is fixed in advance, then the entries in the matrix
are completely defined. As a result, a solution of the approximation problem can be obtained by a direct application of Theorem 1. The solution takes no more than
operations to calculate the squared approximation error and the vector of coefficients given by
In the general case, when both vectors of exponents
and coefficients
are unknown, one can apply the procedure proposed in [
31], which combines random search over a set of vectors of exponents with application of Theorem 1 to obtain a vector of coefficients. The procedure performs a number of iterations, each consisting of sampling a new random vector of exponents along with evaluating the error and the vector of coefficients according to (
11). However, as numerical experience shows, the number of iterations required to achieve a fairly accurate solution is quite large even for problems of moderate dimensions and becomes unacceptable as the number of monomials
N increases.
To overcome this difficulty, a more efficient solution approach is developed in [
32]. The approach addresses approximation problems set in terms of max-plus algebra
but can easily be extended to other tropical semifields isomorphic to
, including max-algebra
. The solution starts with an application of Theorem 1 to vector Equation (
10) where
is considered a matrix parameterized by the vector
. As a result, we obtain an approximate solution represented in parametric form as
where
is the squared approximation error.
To complete the solution, we need to minimize the error
with respect to
, which yields the optimal vector of exponents
After calculation of , one can evaluate the minimal squared approximation error and its related vector of coefficients .
We find the minimum at (
12) by transformation into a combinatorial optimization problem and application of a solution procedure based on the agglomerative clustering technique. This procedure requires computational complexity of order no more than
. We describe the solution in more detail in the next section.
4.2. Approximation by Rational Functions
Consider an approximation problem with the same sample data as above, where the unknown function
needs to be approximated by a rational function
given by (
8). We now seek two sets of exponents
and
and two sets of parameters
and
to obtain the best approximation of the equations
To represent Equation (
13) in vector form, we first rewrite these equations as
In addition to the notations
,
and
introduced above, we define the following vectors and matrices:
In vector notation, Equation (
14) takes the form
One can verify that approximation error for Equation (
15) written in terms of the distance function
d coincides with the error of the system at (
13) (see [
31]).
Finally, we formulate a best approximation problem to find
To discuss solutions to problem (
15), first assume that both vectors of exponents
and
are set to some predetermined values, which makes both parameterized matrices
and
become fixed. In this case, the problem is solved by applying Algorithm 1, which produces the squared approximation error
and two vectors of coefficients
and
.
Suppose now that the vectors of exponents
and
are unknown and must be evaluated along with the unknown vectors of coefficients
and
. One of the approaches to handle this approximation problem is to apply a random search procedure described in [
31]. The procedure combines random sampling over all possible vectors of exponents with alternate iterations according to Algorithm 1 to obtain corresponding vectors of coefficients and then calculate the squared approximation error. Those vectors of exponents and coefficients that lead to the minimal error
over all samples are taken as solution vectors
,
,
and
that determine an approximate rational function.
We observe that this random search procedure is based on repeated executions of Algorithm 1 and thus can be much more expensive than the random search procedure for the polynomial approximation described above.
As an alternative to the computationally inefficient random search technique, we propose a procedure that combines alternate calculations according to Algorithm 1 with simultaneous evaluation of exponents and coefficients as described in [
32]. The procedure is developed in the context of max-plus algebra but can be easily extended to solve approximation problems in terms of other isomorphic semifields. Further details on the proposed procedure are given in the subsequent sections.
5. Approximation by Polynomial Functions
We start with the solution proposed in [
32] in the framework of the semifield
(max-plus algebra) for polynomial approximation problems, where both exponents and coefficients of monomials in the approximating polynomial are unknown and thus need to be evaluated. This solution offers an alternating computational scheme of solving a sequence of polynomial approximations derived from the initial rational approximation problem and plays a pivotal role in the new technique of rational approximation.
The solution of the polynomial approximation problem reduces to solving Equation (
10) for both unknown vectors
and
. We implement the procedure developed in [
32], which includes two main stages. The procedure starts with an application of Theorem 1 as the first stage to produce a direct representation of the squared approximation error and the vector of coefficients, both parameterized by the vector of exponents in the form
At the second stage, the procedure minimizes the error to find the optimal vector of exponents
by solving the minimization problem
Substitution of the obtained vector
into (
17) yields
and
and thus completes the solution. In what follows, we describe the solution in more detail. Specifically, we outline the transformation technique of the error function and include the algorithm of minimizing the error from [
32] for the sake of completeness.
5.1. Minimization of Approximation Error
To solve the minimization problem at (
18), we exploit the representation of min through ⊕ and rewrite the objective function as follows:
where the symbols
stand for the functions
Applying identity (
1) puts the objective function into the form
where the minimum is over all partitions
of the set
into
N parts.
After the substitution of the obtained representation for the function
and the change of the order of minimization, the problem at (
18) becomes
The objective function in the last problem is the minimum of a max-separable function, which can be rearranged according to identity (
2) to rewrite the problem as
The evaluation of the objective function in problem (
19) for each partition
involves solving
N inner minimization problems to find
as their minimizers. The maximum (tropical sum) of the minimum values in the inner problems defines the corresponding value of the objective function in (
19). The set of minimizers that produce the minimum of the objective function
over all partitions presents a vector of optimal exponents
, whereas the value
gives the best squared approximation error.
The solution of each inner minimization problem is obtained in terms of the semifield
as follows. In this semifield, the identity
holds for all
since both sides of the identity correspond to the arithmetic product
. Based on this identity, the functions
transform into polynomials, where
p becomes the indeterminate, to write
As a result, the inner minimization problems in (
19) turn to polynomial optimization problems with respect to
p that are solved by application of Lemma 1.
To solve the outer optimization problem at (
19), we apply a computational scheme based on an agglomerative clustering technique, which finds an optimal (near-optimal) partition. The solution starts with the partition of the set
into
M single-element subsets and then iteratively reduces the number of partitions by merging subsets in pairs.
Each subset in a partition defines a polynomial whose minimum value becomes a characteristic of the subset. The maximum of the minimums over all subsets produces the value of the objective function corresponding to the partition. At each step of the scheme, we merge those subsets in the partition for which the merged subset yields a polynomial with the least minimum value over all pairs of subsets. The merging process continues until the number of subsets in a new partition becomes equal to N.
5.2. Error Minimization Procedure
We give a formal description of the overall procedure, which uses sample data to evaluate the optimal approximation error and find corresponding exponents in the framework of the semifield
in the form of Algorithm 2.
| Algorithm 2: Minimization of error function in max-plus algebra |
Input M samples for , fix positive integer N and put . Construct the subsets and form the partition Apply Lemma 1 to select a pair of subsets to satisfy the condition Merge the subsets and to form the partition If , then define the partition
otherwise set k to and go to Step 2. Apply Lemma 1 to find the minimums and corresponding solutions Evaluate the minimum of the function to be
|
5.3. Polynomial Approximation Procedure
We apply Algorithm 2 as a key ingredient in the solution of the polynomial approximation problems in terms of the semifield
. The solution procedure is as follows (Algorithm 3).
| Algorithm 3: Approximation by polynomials in max-plus algebra |
Input M samples for , and fix positive integer N. Define the vectors and parameterized matrix Apply Algorithm 2 to find the vector of exponents and squared error Calculate the vector of coefficients
|
To conclude this section, we note that the polynomial approximation procedure, including the error minimization algorithm, assumes the max-plus algebra setting of the polynomials involved. However, due to the isomorphism between the semifields and , the approximation problems given in the framework of max-algebra can be readily transformed into their counterparts in terms of max-plus algebra. This makes the procedure readily applicable to solve approximation problems by max-algebra polynomials.
6. Approximation by Rational Functions
In this section, we present a new computational approach to solve rational approximation problems given in the framework of the semifield under the assumption that both exponents and coefficients in the numerator and denominator polynomials are unknown. The approach incorporates solving polynomial approximation problems according to Algorithm 3 into the alternating procedure based on Algorithm 1.
We consider the approximation problem represented in the form of (
15), where the vectors of exponents
and
and vectors of coefficients
and
need to be evaluated. We propose to combine alternating computations according to Algorithm 1 intended to handle two-sided vector equations, with the approximation technique provided by Algorithm 3 to solve parameterized one-sided equations that appear in the alternating computations.
We start with the observation that the matrix
is strictly diagonal (does not have zero diagonal entries). We define a matrix
obtained from
by replacing all diagonal entries by their inverses, and see that the following equations are equivalent:
The alternating computations from Algorithm 1 in this context lead to an iterative procedure that alternately solves two equations of the form
where
and
are vectors obtained at previous steps of the procedure. Both equations take the form of (
10), and hence we can solve them by using Algorithm 3.
As an initial approximation, we set and , and note that then . Next, we have , and thus .
We denote
and examine the equation
. This equation is approximated by solving the two-stage minimization problem
The inner minimization problem has its minimum given by Theorem 1 in the form
Application of Algorithm 3 to minimize the function
yields
Furthermore, we calculate the vector
and then approximate the equation
. As before, we represent the approximation problem as follows:
According to Theorem 1, the minimum of the inner problem is written as
We use Algorithm 3 to minimize
, which gives
In the next two iterations, we first calculate the vector and approximate the equation to find the vectors and . Then, we calculate and approximate the equation to find and .
The iterations continue while the squared error is decreasing and stop when the change in two successive squared errors is within a predefined tolerance.
We give a formal description of the procedure in the form of Algorithm 4.
| Algorithm 4: Approximation by rational functions in max-plus algebra |
Input M samples for , and fix positive integers N and L. Define the matrices and vectors Set a squared error tolerance , and put . Calculate the vector and define the function Apply Algorithm 3 to minimize the function , which yields Set k to , and define the vector and function Apply Algorithm 3 to minimize the function , which yields If , then put
and stop; otherwise, if , then put
and stop; otherwise set k to , and go to Step 2.
|
In the same way as for Algorithm 3, the above procedure can be readily adapted to solve rational approximation problems in terms of max-algebra.
7. Numerical Examples and Graphical Illustrations
In this section, we offer examples to present numerical results of the solution of a best discrete approximation problem where a real nonconvex function is approximated in the max-plus algebra setting. We consider a problem of fitting max-plus rational functions to sample data obtained from a function defined in terms of conventional algebra as follows:
Given
values of the input
and output
of the function for
, the problem is to approximate
by a tropical rational function
defined as a ratio of max-plus algebra polynomials with
N and
L monomials in the form
The solution involves the evaluation of vectors , , and that determine the approximating polynomials and and hence the approximating function .
To handle the problem, we apply Algorithm 4 under different settings of the numbers N and L to find the best squared approximation error together with approximating vectors of exponents and coefficients. The tolerance for the squared error is set to .
The results obtained include numerical solutions for the problems where the number N of monomials for the polynomial and the number L for take successive values from 2 to N. Below, for each fixed N, we demonstrate the solution corresponding to that L which yields the minimal approximation error.
To conduct numerical experiments, we use a MATLAB (Release R2021a) code, which combines a collection of functions for the basic computations of tropical algebra with functions that implement the main functionality of the procedure. The code is run on a custom computer equipped with a four-core eight-thread Intel Xeon E3-1231 v3 CPU at 3.40 GHz and 32 GB of DDR3 RAM, and operated under Windows 10 Enterprise 64-bit OS.
We start by setting
, which leads to a minimal squared approximation error
that is attained for
(the results obtained for
do not improve the error). The approximating vectors of exponents and coefficients are given by
The approximating function is written in terms of conventional algebra as
A graphical representation of the solution is shown in
Figure 1.
Furthermore, we set the number
N of monomials in the polynomial
to 3 and solve the approximation problem for various numbers
L of monomials in
. The minimal squared approximation error is achieved if
to be
. The approximation procedure yields vectors of exponents and coefficients that take the form
The obtained approximating function is given using standard arithmetic operations as
and graphically illustrated in
Figure 2.
In the case when
, the minimal squared error is found for
, and it is equal to
. The obtained vectors of exponents and coefficients are
which determines the approximating function (see
Figure 3) in the form
Under the condition that
, the minimal squared error
is attained when
. The obtained vectors of exponents and coefficients are given by
The approximating function takes the form
The solution obtained is shown in
Figure 4.
In the case when
, the minimal squared error is
, which is achieved for
. The approximating vectors have the form
The approximating function (see
Figure 5) is written as
Finally, for
, we obtain the minimal error
if
. We observe that in this case, the solution of the approximation problem leads to the exact solution with
. The obtained vectors of exponents and coefficients are as follows:
The approximating function is given by
The solution is illustrated in
Figure 6.
We conclude this section with a graphical representation of the dynamics of the squared approximation error during the iterations.
Figure 7 demonstrates how the squared error
changes as the number of iterations
k increases in the solutions presented above.
The graphs in
Figure 7 show that in all cases except for the first one, the sequence of squared errors
has a tendency to decrease as
k increases. The unusual behavior of the error value in the case when
and
can be explained by the insufficient number of monomials in the polynomials, which results in unstable behavior of the optimization procedure in Algorithm 2 and thus of the overall solution provided by Algorithm 4.
8. Conclusions
We have considered discrete best approximation problems in the setting of a tropical algebra that deals with semifields and semirings with idempotent addition. Given sample points of the input and output of an unknown function defined on a semifield, the problem is to approximate the function by a rational function in the sense of a generalized metric. The approximating function takes the form of a ratio of Puiseux polynomials that can have real exponents. The approximation problem requires evaluating both the unknown exponents and coefficients of the monomials in the two approximating polynomials.
We developed an iterative computational procedure that is based on the transformation into a problem of approximating a vector equation. Each side of the equation corresponds to one of the polynomials and is represented as a matrix parameterized by unknown exponents, multiplied by an unknown vector of coefficients of monomials in the polynomial. The procedure alternately fixes a vector on one side of this equation and solves the new equation for the unknown exponents and coefficients on the other side. The solution of the last equation involves two stages: the first is the approximation of the equation to derive the approximation error and unknown vector parameterized by unknown exponents, and the second is the minimization of the error to find the exponents. To complete the first stage, we exploited the results of approximating a vector equation with a fixed matrix, which are known in analytical form. To handle the minimization problem in the second stage, we applied a combinatorial solution developed in [
32], which is based on agglomerative clustering.
We demonstrated the practical feasibility and computational efficiency of the approximation procedure by numerical and graphical illustrations. In contrast to the algorithm proposed in [
29], which assumes the exponents in the polynomials to be fixed in advance and concentrates on the evaluation of coefficients, the proposed solution is designed to find the exponents as well as coefficients, which are both considered unknown.
We believe the contribution of this study to be twofold. First, the results obtained provide further development of the theory and methods of tropical algebra as an analytical tool to solve tropical approximation problems. The study offers an alternative approach based on new arithmetic to approximation problems, which differs from the classical solutions known in the context of conventional mathematics. Second, the proposed approximation procedure significantly expands the range of applications of tropical algebra in actual real-world problems. The area of applications of the results includes pattern recognition, signal denoising, data compression, neural network design, and other research and applied domains where the best approximation serves as a key instrument of solution.
A possible drawback of the proposed solution is its computational complexity, which may be somewhat higher than that of existing approximation techniques. However, a correct comparison involves a careful formal assessment of the computational complexity of the solution, which requires a separate study. In any case, our numerical experience has shown that the proposed iterative procedure generally converges in a finite number of steps and provides a reasonably good solution to the approximation problems considered.
Taking into account that the main steps of the procedure have polynomial complexity, and considering the experience gained from the numerical solution of test problems, it can be expected that the proposed procedure is scalable. We reckon that the procedure is quite capable of solving large-scale problems in a reasonable time, but more substantiated conclusions require further experiments, which are intended for future research.
The combinatorial algorithm based on agglomerative clustering, proposed for solving optimization problems, presents the most time-consuming component of the solution. Although this algorithm demonstrates sufficient efficiency in practice, the question of using other approaches to speed up the solution (heuristic algorithms, hybrid methods, parallel computation, etc.) remains open and requires additional investigation.
As was shown in [
32], the approximation procedure developed in the framework of max-plus algebra can be readily adjusted to handle approximation problems in terms of max-algebra. Since the rational functions in the context of max-algebra take the form of splines, the obtained results can be applied for spline approximation of real functions, which needs further experimental and theoretical analysis of the procedure.
The numerical examples given as illustrations were concentrated on a smooth nonconvex function. However, we expect that the proposed procedure will prove to be quite efficient in problems of approximating other types of functions. To demonstrate the robustness and versatility of the approach, further research is necessary to consider approximation problems for a wide range of functions, including non-smooth and discontinuous functions.
Other areas of future research include a formal analysis of the convergence of the procedure and the estimation of its computational complexity. A comprehensive analytical and numerical comparison with existing solutions presents another urgent problem to address.