Next Article in Journal
Comparative Study of Estimation Methods for a New Family of Copula-Based Reversible Markov Chains
Previous Article in Journal
Univariate Linear Normal Models: Optimal Equivariant Estimation
Previous Article in Special Issue
Approximation of Bivariate Functions by Generalized Wendland Radial Basis Functions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Tropical Solution of Discrete Best Approximation Problems

by
Nikolai Krivulin
Faculty of Mathematics and Mechanics, St. Petersburg State University, Universitetskaya Emb. 7/9, 199034 St. Petersburg, Russia
Mathematics 2025, 13(22), 3660; https://doi.org/10.3390/math13223660
Submission received: 2 October 2025 / Revised: 10 November 2025 / Accepted: 11 November 2025 / Published: 15 November 2025

Abstract

We consider discrete best approximation problems in the setting of tropical algebra, which is concerned with the theory and application of algebraic systems with idempotent operations. 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 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 data in the sense of a tropical distance function. To solve the problem, we transform it 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 involves a matrix with entries dependent on the unknown exponents, multiplied by the vector of unknown coefficients of monomials. We propose an algorithm that constructs a series of approximate solutions by alternately fixing one side of the equation to an already-found result and leaving the other side intact. Each equation obtained is approximated with respect to the vector of coefficients, which yields this vector and approximation error, both parameterized by exponents. The exponents are found by minimizing the error with an optimization procedure based on an agglomerative clustering technique. To illustrate, we present results for an approximation problem in terms of max-plus algebra (a real semifield with addition defined as maximum and multiplication as arithmetic addition), which corresponds to an ordinary problem of piecewise linear approximation of real functions. As our numerical experience shows, the proposed algorithm converges in a finite number of steps and provides a reasonably accurate solution to the problems considered.

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 X that is closed under operations ⊕ (addition) and ⊗ (multiplication) and has elements 0 (zero) and 1 (one). We assume that ( X , , 0 ) is a commutative idempotent monoid, ( X { 0 } , , 1 ) is an Abelian group, and multiplication ⊗ distributes over addition ⊕. Under these assumptions, the algebraic system ( X , , , 0 , 1 ) is referred to as the tropical (or idempotent) semifield.
In the tropical semifield, addition is idempotent, which means that x x = x for each x X . The idempotent addition induces on X a partial order such that x y if and only if x y = y . With respect to this order, addition and multiplication are monotone in the sense that if x y for x , y X , then x z y z and x z y z for any z X . Addition possesses an extremal property (majority law) which says that x x y and y x y . Finally, the inequality x y z is equivalent to the system of inequalities x z and y z .
In what follows, we further assume that addition satisfies the property of selectivity in the form x y { x , y } , and thus the order associated with the addition is a total order.
Multiplication is invertible, which provides any x 0 with its inverse x 1 such that x x 1 = 1 . The integer powers are defined in the usual way as x 0 = 1 , x p = x x p 1 , x p = ( x 1 ) p and 0 p = 0 for any x 0 and integer p > 0 . 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 x , y 0 , the inequality x y yields the inequality x r y r if r 0 , and x r y r if r > 0 .
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 R { } and R + { 0 } , where R + = { x R | x > 0 } , and given by
R max , + = ( R { } , , 0 , max , + ) , R max = ( R + { 0 } , 0 , 1 , max , × ) .
In the semifield R max , + , which is also known as max-plus algebra, addition ⊕ is defined as operation max, and multiplication ⊗ as arithmetic addition +. The zero 0 is set to the number , and the one 1 to the arithmetic zero 0. The inverse x 1 is equal to the opposite number x , and the power x y to the product x × y in standard arithmetic.
We illustrate the operations in R max , + with the next numerical examples (where the symbols + and × indicate the usual arithmetic addition and multiplication).
  • Addition:
    1 1 = 1 ( max ( 1 , 1 ) = 1 ) , 0 ( 3 ) = 0 ( max ( 0 , 3 ) = 0 ) , 2 0 = 2 ( max ( 2 , ) = 2 ) .
  • Multiplication:
    1 1 = 2 ( 1 + 1 = 2 ) , 2 ( 3 ) = 1 ( 2 + ( 3 ) = 1 ) , 1 0 = 0 ( 1 + ( ) = ) .
  • Exponentiation:
    1 2 = 2 ( 1 × 2 = 2 ) , ( 2 ) 1 / 3 = 2 / 3 ( ( 2 ) × ( 1 / 3 ) = 2 / 3 ) , 1 1 = 1 ( 1 × ( 1 ) = 1 ) .
The semifield R max (max-algebra) has the operations = max and = × , and the neutral elements 0 = 0 and 1 = 1 . The inversion and exponentiation are defined as usual. The order induced by addition in both semifields R max , + and R max coincides with the natural linear order on R . Examples are straightforward and hence are omitted.
Finally, we note that the above semifields are obviously isomorphic to each other by the mappings exp: R max , + R max and log: R max R max , + .

2.2. Distributive Properties

On the basis of the extremal property of addition, a maximum operation is given by max ( x , y ) = x y for any x , y X . A dual minimum operation can then be defined in the following form: min ( x , y ) = ( x 1 y 1 ) 1 if x , y 0 , and min ( x , y ) = 0 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 x i j X for all i = 1 , , M and j = 1 , , N , where M and N are positive integers. Let { I 1 , , I N } denote a partition that divides the set of naturals { 1 , , M } 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]):
i = 1 M min 1 j N x i j = min { I 1 , , I N } j = 1 N i I j x i j ,
where the minimum on the right-hand side is taken over all partitions { I 1 , , I N } .
Suppose that given some functions f j : X X for all j = 1 , , N , we consider a new function defined as the sum f 1 ( x 1 ) f N ( x N ) . 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 x 1 , , x N reduces to the evaluation of the minimum of each function f j ( x j ) , which leads to the following distributive identity:
min x 1 , , x N j = 1 N f j ( x j ) = j = 1 N min x j f j ( x j ) .

2.3. Algebra of Matrices and Vectors

The matrices and vectors with entries in X are defined in the usual way. The set of matrices of M rows and N columns is denoted by X M × N . The set of column vectors of N elements is denoted by X N . A matrix (vector) that has all entries equal to 0 is the zero matrix (vector) denoted 0 . 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 A = ( a i j ) , B = ( b i j ) , C = ( c i j ) , and scalar x, the matrix operations are given by
( A B ) i j = a i j b i j , ( A C ) i j = k a i k c k j , ( x A ) i j = x a i j .
The monotonicity properties of the scalar operations ⊕ and ⊗ extend to the matrix (vector) operations where the inequalities are understood entrywise.
Let x = ( x i ) be a nonzero column vector. The multiplicative conjugate transpose of x is a row vector x = ( x i ) that has the entries x i = x i 1 if x i 0 , and x i = 0 otherwise.
The support of a vector x = ( x i ) in X N is defined as supp ( x ) = { i | x i 0 , 1 i N } . For nonzero vectors x = ( x i ) and y = ( y i ) in X N , such that supp ( x ) = supp ( y ) , the distance between the vectors is given by the function
d ( x , y ) = i supp ( x ) y i 1 x i x i 1 y i = y x x y .
If supp ( x ) supp ( y ) , then we put d ( x , y ) = , where denotes an undefined value greater than any element in X . In the case that x = y = 0 , we assume that d ( x , y ) = 1 .
In the framework of max-plus algebra R max , + where 1 = 0 , the function d coincides for all x , y R N with the Chebyshev metric, which is given in standard notation by
d ( x , y ) = max 1 i N | x i y i | = max 1 i N max ( x i y i , y i x i ) .
In the case of max-algebra R max , the function d can be considered as a generalized metric with values in the interval [ 1 , ) R + . Due to the isomorphism between R max and R max , + , this function can be transformed into a metric d ( x , y ) = log d ( x , y ) .

2.4. Best Approximate Solution to Vector Equations

Given a matrix A X M × N and vector b X M , consider the problem of finding vectors x X N that satisfy the equation with the unknown on one side in the form
A x = b ,
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 x * is a best approximate solution of the equation if for all vectors x the following inequality holds:
d ( A x * , b ) d ( A x , b ) .
The next approximate solution is given in [43,44].
Theorem 1.
Let  A  be a regular matrix and   b  a regular vector. Define the scalar Δ = ( A ( b A ) ) b . Then, the following statements hold:
  • The best approximation error for Equation (4) is equal to
    d ( A x * , b ) = Δ ;
  • The best approximate solution of (4) is given by
    x * = Δ ( b A ) .
  • If  Δ = 1 , then the equation has exact solutions, including the maximal solution x * = ( b A ) .
The computational complexity of the solution is at most O ( M N ) .
Suppose given matrices A X M × N and B X M × L , we need to find regular vectors x X N and y X L that solve the two-sided equation
A x = B y .
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 A x = B y
  • Input regular matrices A , B and regular vector x 0 ; put k = 0 .
  • Calculate the squared approximation error and vector
    Δ k = ( B ( ( A x k ) B ) ) A x k , y k + 1 = Δ k ( ( A x k ) B ) .
  • If Δ k = 1 or y k + 1 = y j for some j < k , then set
    Δ * = Δ k , x * = x k , y * = y k + 1 ,
    and stop; otherwise set k to k + 1 .
  • Calculate the squared approximation error and vector
    Δ k = ( A ( ( B y k ) A ) ) B y k , x k + 1 = Δ k ( ( B y k ) A ) .
  • If Δ k = 1 or x k + 1 = x j for some j < k , then set
    Δ * = Δ k , x * = x k + 1 , y * = y k ,
    and stop; otherwise set k to k + 1 .
  • Go to step 2.
As the algorithm output, one obtains the approximation error Δ * and approximate solutions x * and y * . If Δ * = 1 , then the obtained vectors x * and y * are an exact solution.
We observe that calculation of the squared error and solution vector at each iteration requires no more than O ( M max ( N , L ) ) 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 X with N monomials in one variable x, which is given by
P ( x ) = j = 1 N θ j x p j = θ 1 x p 1 θ N x p N , x 0 ,
where p 1 , , p N R are exponents and θ 1 , , θ N X are nonzero coefficients.
If interpreted in terms of max-plus algebra R max , + , the polynomial can be expressed using standard arithmetic operations in the form
P ( x ) = max 1 j N ( p j × x + θ j ) , x R ,
with p 1 , , p N R and θ 1 , , θ N R , and defines a piecewise linear convex function.
In the context of max-algebra R max , the polynomial is represented using ordinary operations as a spline function
P ( x ) = max 1 j N ( θ j × x p j ) , x R + ,
where p 1 , , p N R + and θ 1 , , θ N R + , which may not be convex.
We observe that the isomorphism between the semifields R max , + and R max 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 P ( x ) into a max-plus algebra polynomial as
P ( x ) = log P ( x ) = max 1 j N ( log θ j + p j × log x ) = max 1 j N ( p j × x + θ j )
with new indeterminate x = log x and coefficients θ j = log θ j for all j = 1 , , N .
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
min x > 0 j = 1 N θ j x p j ,
where the polynomial is assumed to have exponents p j 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 by
μ = 1 j , k N p j < 0 , p k > 0 θ j p k p j p k θ k p j p j p k 1 j N p j = 0 θ j ,
and all solutions of (7) satisfy the condition
1 j N p j < 0 μ 1 / p j θ j 1 / p j x min 1 j N p j > 0 μ 1 / p j θ j 1 / p j .
This solution has computational complexity that grows not faster than O ( N 2 ) .

3.2. Puiseux Rational Functions

Suppose two polynomials of N and L monomials are given in the form
P ( x ) = j = 1 N θ j x p j , Q ( x ) = j = 1 L σ j x q j .
Taking these polynomials as a numerator and denominator, we define a (generalized) Puiseux rational function of one variable x to be
R ( x ) = P ( x ) Q ( x ) = θ 1 x p 1 θ N x p N σ 1 x q 1 σ L x q L , x 0 .
In the setting of max-plus algebra R max , + , the rational function appears to be a difference of two piecewise linear convex functions, whereas in max-algebra R max , 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 y 1 , , y M at points x 1 , , x M are given for an unknown function f : X X . The discrete approximation of the function f ( x ) is to fit the data to a parametric function F θ : X X by finding a vector of parameters θ that achieves minimal difference between both sides of the equations
F θ ( x i ) = y i , i = 1 , , M .
We use the vector notation x = ( x i ) , y = ( y i ) and F θ ( x ) = ( F θ ( x i ) ) , and then arrive at a problem of best approximation in the sense of the distance function d in the form
min θ d ( F θ ( x ) , y ) .
An approximate solution is found as a minimizer
θ * = arg min θ d ( F θ ( x ) , y ) .
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 f ( x ) by a polynomial function P ( x ) given by (6). We formulate the problem to find both exponents p 1 , , p N and coefficients θ 1 , , θ N that provide the best agreement between two sides of the equations
θ 1 x i p 1 θ N x i p N = y i , i = 1 , , M .
To solve the problem, we first introduce the vectors and matrix
y = y 1 y M , p = p 1 p N , θ = θ 1 θ N , X ( p ) = x 1 p 1 x 1 p N x M p 1 x M p N .
With this notation, Equation (9) can be rewritten in vector form as
X ( p ) θ = y .
We formulate the problem as the best approximation of the vector equation at (10) in the sense of the distance function d to find
( p * , θ * ) = arg min p , θ d ( X ( p ) θ , y ) .
If the vector of exponents p is fixed in advance, then the entries in the matrix X ( p ) 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 O ( M N ) operations to calculate the squared approximation error and the vector of coefficients given by
Δ * = ( X ( p ) ( y X ( p ) ) ) y , θ * = Δ * ( y X ( p ) ) .
In the general case, when both vectors of exponents p 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 R max , + but can easily be extended to other tropical semifields isomorphic to R max , + , including max-algebra R max . The solution starts with an application of Theorem 1 to vector Equation (10) where X ( p ) is considered a matrix parameterized by the vector p . As a result, we obtain an approximate solution represented in parametric form as θ ( p ) = δ ( p ) ( y X ( p ) ) where δ ( p ) = ( X ( p ) ( y X ( p ) ) ) y is the squared approximation error.
To complete the solution, we need to minimize the error δ ( p ) with respect to p , which yields the optimal vector of exponents
p * = arg min p ( X ( p ) ( y X ( p ) ) ) y .
After calculation of p * , one can evaluate the minimal squared approximation error Δ * = δ ( p * ) and its related vector of coefficients θ * = Δ * ( y X ( p * ) ) .
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 O ( max ( M 4 , ( M N ) 3 M 3 ) ) . 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 f ( x ) needs to be approximated by a rational function R ( x ) given by (8). We now seek two sets of exponents p 1 , , p N and q 1 , , q L and two sets of parameters θ 1 , , θ N and σ 1 , , σ L to obtain the best approximation of the equations
θ 1 x i p 1 θ N x i p N σ 1 x i q 1 σ L x i q L = y i , i = 1 , , M .
To represent Equation (13) in vector form, we first rewrite these equations as
θ 1 x i p 1 θ N x i p N = y i ( σ 1 x i q 1 σ L x i q L ) , i = 1 , , M .
In addition to the notations p , θ and X ( p ) introduced above, we define the following vectors and matrices:
q = q 1 q L , σ = σ 1 σ L , Y = y 1 0 0 y M , Z ( q ) = x 1 q 1 x 1 q L x M q 1 x M q L .
In vector notation, Equation (14) takes the form
X ( p ) θ = Y Z ( q ) σ .
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
( p * , θ * , q * , σ * ) = arg min p , θ , q , σ d ( X ( p ) θ , Y Z ( q ) σ ) .
To discuss solutions to problem (15), first assume that both vectors of exponents p and q are set to some predetermined values, which makes both parameterized matrices X ( p ) and Z ( q ) 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 p and q 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 p * , q * , θ * 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 R max , + (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 p 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
δ ( p ) = ( X ( p ) ( y X ( p ) ) ) y , θ ( p ) = δ ( p ) ( y X ( p ) ) .
At the second stage, the procedure minimizes the error to find the optimal vector of exponents p * by solving the minimization problem
min p δ ( p ) .
Substitution of the obtained vector p * into (17) yields Δ * = δ ( p * ) and θ * = θ ( p * ) 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:
δ ( p ) = ( X ( p ) ( y X ( p ) ) ) y = i = 1 M j = 1 N ( φ i ( p j ) ) 1 1 = i = 1 M min 1 j N φ i ( p j ) ,
where the symbols φ i stand for the functions
φ i ( p ) = y i x i p ( y 1 1 x 1 p y M 1 x M p ) , i = 1 , , M .
Applying identity (1) puts the objective function into the form
δ ( p ) = min { I 1 , , I N } j = 1 N i I j φ i ( p j ) ,
where the minimum is over all partitions { I 1 , , I N } of the set { 1 , , M } into N parts.
After the substitution of the obtained representation for the function δ ( p ) and the change of the order of minimization, the problem at (18) becomes
min { I 1 , , I N } min p 1 , , p N j = 1 N i I j φ i ( p j ) .
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
min { I 1 , , I N } j = 1 N min p j i I j φ i ( p j ) .
The evaluation of the objective function in problem (19) for each partition { I 1 , , I N } involves solving N inner minimization problems to find p 1 * , , p N * 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 δ ( p ) over all partitions presents a vector of optimal exponents p * , whereas the value Δ * = δ ( p * ) gives the best squared approximation error.
The solution of each inner minimization problem is obtained in terms of the semifield R max , + as follows. In this semifield, the identity x y = y x holds for all x , y R since both sides of the identity correspond to the arithmetic product x × y . Based on this identity, the functions φ i ( p ) transform into polynomials, where p becomes the indeterminate, to write
φ i ( p ) = y i p x i ( y 1 1 p x 1 y M 1 p x M ) , i = 1 , , M .
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 { 1 , , M } 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 R max , + in the form of Algorithm 2.
Algorithm 2: Minimization of error function δ ( p ) in max-plus algebra
  • Input M samples ( x i , y i ) for i = 1 , , M , fix positive integer N and put k = 1 .
    Define the polynomials
    φ i ( p ) = j = 1 M y j 1 y i p x j x i , i = 1 , , M .
    Construct the subsets and form the partition
    I 1 ( 0 ) = { 1 } , , I M ( 0 ) = { M } ; P ( 0 ) = { I 1 ( 0 ) , , I M ( 0 ) } .
  • Apply Lemma 1 to select a pair of subsets to satisfy the condition
    ( U ( k ) , V ( k ) ) = arg min U , V P ( k 1 ) U V min p i U φ i ( p ) i V φ i ( p ) .
  • Merge the subsets U ( k ) and V ( k ) to form the partition
    P ( k ) = ( P ( k 1 ) { U ( k ) , V ( k ) } ) { U ( k ) V ( k ) } .
  • If M k = N , then define the partition
    P * = { I 1 * , , I N * } = P ( M k ) = { I 1 ( M k ) , , I N ( M k ) } ;
    otherwise set k to k + 1 and go to Step 2.
  • Apply Lemma 1 to find the minimums and corresponding solutions
    δ 1 * = min p i I 1 * φ i ( p ) , , δ N * = min p i I N * φ i ( p ) ; p 1 * = arg min p i I 1 * φ i ( p ) , , p N * = arg min p i I N * φ i ( p ) .
  • Evaluate the minimum of the function δ ( p ) to be
    Δ * = j = 1 N δ j * = max 1 j N δ j * .

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 R max , + . The solution procedure is as follows (Algorithm 3).
Algorithm 3: Approximation by polynomials in max-plus algebra
  • Input M samples ( x i , y i ) for i = 1 , , M , and fix positive integer N.
    Define the vectors and parameterized matrix
    y = y 1 y M , p = p 1 p N , X ( p ) = x 1 p 1 x 1 p N x M p 1 x M p N .
    Construct the function
    δ ( p ) = ( X ( p ) ( y X ( p ) ) ) y .
  • Apply Algorithm 2 to find the vector of exponents and squared error
    p * = arg min p δ ( p ) , Δ * = δ ( p * ) .
  • Calculate the vector of coefficients
    θ * = Δ * ( y X ( p * ) ) .
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 R max , + and R max , 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 R max , + 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 p and q 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 Y is strictly diagonal (does not have zero diagonal entries). We define a matrix Y 1 obtained from Y by replacing all diagonal entries by their inverses, and see that the following equations are equivalent:
X ( p ) θ = Y Z ( q ) σ , Z ( q ) σ = Y 1 X ( p ) θ .
The alternating computations from Algorithm 1 in this context lead to an iterative procedure that alternately solves two equations of the form
X ( p ) θ = b , Z ( q ) σ = a ,
where a and b 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 σ 0 = 1 and q 0 = 1 , and note that then Z ( q 0 ) = 1 1 T . Next, we have Z ( q 0 ) σ 0 = 1 , and thus Y Z ( q 0 ) σ 0 = y .
We denote b 1 = Y Z ( q 0 ) σ 0 = y and examine the equation X ( p ) θ = b 1 . This equation is approximated by solving the two-stage minimization problem
min p min θ d ( X ( p ) θ , b 1 ) .
The inner minimization problem has its minimum given by Theorem 1 in the form
δ 1 ( p ) = ( X ( p ) ( b 1 X ( p ) ) ) b 1 .
Application of Algorithm 3 to minimize the function δ 1 ( p ) yields
p 1 = arg min p δ 1 ( p ) , Δ 1 = δ 1 ( p 1 ) , θ 1 = Δ 1 ( b 1 X ( p 1 ) ) .
Furthermore, we calculate the vector a 2 = Y 1 X ( p 1 ) θ 1 and then approximate the equation Z ( q ) σ = a 2 . As before, we represent the approximation problem as follows:
min q min σ d ( Z ( q ) σ , a 2 ) .
According to Theorem 1, the minimum of the inner problem is written as
δ 2 ( q ) = ( Z ( q ) ( a 2 Z ( q ) ) ) a 2 .
We use Algorithm 3 to minimize δ 2 ( q ) , which gives
q 2 = arg min q δ 2 ( q ) , Δ 2 = δ 2 ( q 2 ) , σ 2 = Δ 2 ( a 2 Z ( q 2 ) ) .
In the next two iterations, we first calculate the vector b 3 = Y Z ( q 2 ) σ 2 and approximate the equation X ( p ) θ = b 3 to find the vectors p 3 and θ 3 . Then, we calculate a 4 = Y 1 X ( p 3 ) θ 3 and approximate the equation Z ( q ) σ = a 4 to find q 4 and σ 4 .
The iterations continue while the squared error Δ k 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 ( x i , y i ) for i = 1 , , M , and fix positive integers N and L.
    Define the matrices and vectors
    X ( p ) = x 1 p 1 x 1 p N x M p 1 x M p N , Y = y 1 0 0 y M , Z ( q ) = x 1 q 1 x 1 q L x M q 1 x M q L , q 0 = 1 , σ 0 = 1 .
    Set a squared error tolerance ε > 0 , and put k = 1 .
  • Calculate the vector and define the function
    b k = Y Z ( q k 1 ) σ k 1 , δ k ( p ) = ( X ( p ) ( b k X ( p ) ) ) b k .
  • Apply Algorithm 3 to minimize the function δ k ( p ) , which yields
    p k = arg min p δ k ( p ) , Δ k = δ k ( p k ) , θ k = Δ k ( b k X ( p k ) ) .
  • Set k to k + 1 , and define the vector and function
    a k = Y 1 X ( p k 1 ) θ k 1 , δ k ( q ) = ( Z ( q ) ( a k Z ( q ) ) ) a k .
  • Apply Algorithm 3 to minimize the function δ k ( q ) , which yields
    q k = arg min q δ k ( q ) , Δ k = δ k ( q k ) , σ k = Δ k ( a k Z ( q k ) ) .
  • If Δ k > Δ k 1 , then put
    Δ * = Δ k 1 , p * = p k 1 , θ * = θ k 1 , q * = q k 2 , σ * = σ k 2 ,
    and stop; otherwise, if Δ k > ε 1 Δ k 1 , then put
    Δ * = Δ k , p * = p k 1 , θ * = θ k 1 , q * = q k , σ * = σ k ,
    and stop; otherwise set k to k + 1 , 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:
f ( x ) = 3 ( x 1 ) 2 sin ( x ) + 1 / 4 , x [ 0 , 2 ] .
Given M = 21 values of the input x i = 1 + ( i 1 ) / 10 and output y i = f ( x i ) of the function for i = 1 , , M , the problem is to approximate f ( x ) by a tropical rational function
R ( x ) = P ( x ) / Q ( x ) ,
defined as a ratio of max-plus algebra polynomials with N and L monomials in the form
P ( x ) = θ 1 x p 1 θ N x p N , Q ( x ) = σ 1 x q 1 σ L x q L .
The solution involves the evaluation of vectors p * = ( p 1 * , , p N * ) T , θ * = ( θ 1 * , , θ N * ) T , q * = ( q 1 * , , q L * ) T and σ * = ( σ 1 * , , σ L * ) T that determine the approximating polynomials P * ( x ) and Q * ( x ) and hence the approximating function R * ( x ) = P * ( x ) / Q * ( x ) .
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 ε = 0.0001 .
The results obtained include numerical solutions for the problems where the number N of monomials for the polynomial P ( x ) and the number L for Q ( x ) 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 N = 2 , which leads to a minimal squared approximation error Δ * = 0.3099 that is attained for L = 2 (the results obtained for L > 2 do not improve the error). The approximating vectors of exponents and coefficients are given by
p * = 0.0628 3.8735 , θ * = 0.5100 4.6017 , q * = 2.4888 0.1216 , σ * = 0.4150 0.0793 .
The approximating function is written in terms of conventional algebra as
R * ( x ) = max ( 0.0628 x + 0.5100 , 3.8735 x 4.6017 ) max ( 2.4888 x + 0.4150 , 0.1216 0.0793 ) .
A graphical representation of the solution is shown in Figure 1.
Furthermore, we set the number N of monomials in the polynomial P ( x ) to 3 and solve the approximation problem for various numbers L of monomials in Q ( x ) . The minimal squared approximation error is achieved if L = 3 to be Δ * = 0.1158 . The approximation procedure yields vectors of exponents and coefficients that take the form
p * = 0.5398 2.2198 4.3520 , θ * = 0.8577 2.2300 5.5099 , q * = 1.9879 0.0228 0.2545 , σ * = 0.5678 0.0200 0.2349 .
The obtained approximating function is given using standard arithmetic operations as
R * ( x ) = max ( 0.5398 x + 0.8577 , 2.2198 x 2.2300 , 4.3520 x 5.5099 ) max ( 1.9879 x + 0.5678 , 0.0228 x + 0.0200 , 0.2545 x 0.2349 ) ,
and graphically illustrated in Figure 2.
In the case when N = 4 , the minimal squared error is found for L = 4 , and it is equal to Δ * = 0.0590 . The obtained vectors of exponents and coefficients are
p * = 0.6204 0.4634 2.9159 4.4184 , θ * = 0.8898 0.1250 3.1989 5.5992 , q * = 3.0464 1.1501 0.1395 0.1971 , σ * = 0.6693 0.3938 0.0702 0.1452 ,
which determines the approximating function (see Figure 3) in the form
R * ( x ) = max ( 0.6204 x + 0.8898 , 0.4634 x 0.1250 , 2.9159 x 3.1989 , 4.4184 x 5.5992 ) max ( 3.0464 x + 0.6693 , 1.1501 x + 0.3938 , 0.1395 x 0.0702 , 0.1971 x 0.1452 ) .
Under the condition that N = 5 , the minimal squared error Δ * = 0.0370 is attained when L = 3 . The obtained vectors of exponents and coefficients are given by
p * = 0.6350 0.5005 1.7163 2.9842 4.3541 , θ * = 0.8840 0.1512 1.5518 3.2623 5.4317 , q * = 3.0609 1.1647 0.2332 , σ * = 0.6525 0.3770 0.1524 .
The approximating function takes the form
R * ( x ) = max ( 0.6350 x + 0.8840 , 0.5005 x 0.1512 , 1.7163 x 1.5518 , 2.9842 x 3.2623 , 4.3541 x 5.4317 ) max ( 3.0609 x + 0.6525 , 1.1647 x + 0.3770 , 0.2332 x 0.1524 ) .
The solution obtained is shown in Figure 4.
In the case when N = 6 , the minimal squared error is Δ * = 0.0113 , which is achieved for L = 5 . The approximating vectors have the form
p * = 0.6251 0.0174 1.1035 2.3810 3.5666 4.4863 , θ * = 0.8792 0.3250 0.8195 2.4170 4.1332 5.6611 , q * = 3.0511 1.1548 0.0151 0.2506 0.2524 , σ * = 0.6348 0.3593 0.0298 0.1626 0.1657 .
The approximating function (see Figure 5) is written as
R * ( x ) = max ( 0.6251 x + 0.8792 , 0.0174 x + 0.3250 , 1.1035 x 0.8195 , 2.3810 x 2.4170 , 3.5666 x 4.1332 , 4.4863 x 5.6611 ) , max ( 3.0511 x + 0.6348 , 1.1548 x + 0.3593 , 0.0151 x 0.0298 , 0.2506 x 0.1626 , 0.2524 x 0.1657 ) .
Finally, for N = 7 , we obtain the minimal error Δ * < ε if L = 5 . We observe that in this case, the solution of the approximation problem leads to the exact solution with Δ * = 0 . The obtained vectors of exponents and coefficients are as follows:
p * = 0.6963 0.3512 0.5419 1.7577 3.0256 4.0567 4.5718 , θ * = 0.9254 0.6586 0.1955 1.5961 3.3066 4.9000 5.7934 , q * = 3.1222 1.2260 0.0863 0.2746 0.2880 , σ * = 0.6754 0.3999 0.0108 0.1782 0.2036 .
The approximating function is given by
R * ( x ) = max ( 0.6963 x + 0.9254 , 0.3512 x + 0.6586 , 0.5419 x 0.1955 , 1.7577 x 1.5961 , 3.0256 x 3.3066 , 4.0567 x 4.9000 , 4.5718 x 5.7934 ) , max ( 3.1222 x + 0.6754 , 1.2260 x + 0.3999 , 0.0863 x + 0.0108 , 0.2746 x 0.1782 , 0.2880 x 0.2036 ) .
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 Δ k 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 Δ k has a tendency to decrease as k increases. The unusual behavior of the error value in the case when N = 2 and L = 2 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.

Funding

This research received no external funding.

Data Availability Statement

No new data were created or analyzed in this study.

Acknowledgments

The author is very grateful to the anonymous reviewers for their valuable comments and suggestions, which have been incorporated into the revised manuscript.

Conflicts of Interest

The author declares no conflicts of interest.

References

  1. Mhaskar, H.N.; Pai, D.V. Fundamentals of Approximation Theory; Narosa Publishing House: New Delhi, India, 2000. [Google Scholar]
  2. Steffens, K.G. The History of Approximation Theory; Birkhäuser: Boston, MA, USA, 2006. [Google Scholar] [CrossRef]
  3. de Laplace, P.S. Mécanique Céleste; Bowditch, N., Translator; Hillard, Gray, Littlè, and Wilkins: Boston, MA, USA, 1832; Volume 2. [Google Scholar]
  4. Conn, A.R.; Li, Y. The Computational Structure and Characterization of Nonlinear Discrete Chebyshev Problem; Technical Report 88-956; Department of Computer Science, Cornell University: Ithaca, NY, USA, 1988. [Google Scholar]
  5. Szusz, E.K.; Willms, A.R. A linear time algorithm for near minimax continuous piecewise linear representations of discrete data. SIAM J. Sci. Comput. 2010, 32, 2584–2602. [Google Scholar] [CrossRef][Green Version]
  6. Stiefel, E. Note on Jordan elimination, linear programming and Tchebycheff approximation. Numer. Math. 1960, 2, 1–17. [Google Scholar] [CrossRef]
  7. Osborne, M.R.; Watson, G.A. On the best linear Chebyshev approximation. Comput. J. 1967, 10, 172–177. [Google Scholar] [CrossRef]
  8. Watson, G.A. On an algorithm for nonlinear minimax approximation. Commun. ACM 1970, 13, 160–162. [Google Scholar] [CrossRef]
  9. Sposito, V.A. Minimizing the maximum absolute deviation. ACM SIGMAP Bull. 1976, 51–53. [Google Scholar] [CrossRef]
  10. Gluss, B. Further remarks on line segment curve-fitting using dynamic programming. Commun. ACM 1962, 5, 441–443. [Google Scholar] [CrossRef]
  11. Camponogara, E.; Nazari, L.F. Models and algorithms for optimal piecewise-linear function approximation. Math. Probl. Eng. 2015, 2015, 876862. [Google Scholar] [CrossRef]
  12. Stone, H. Approximation of curves by line segments. Math. Comp. 1961, 15, 40–47. [Google Scholar] [CrossRef]
  13. Cameron, S.H. Piece-Wise Linear Approximation; Technical Note CSTN-106; Computer Sciences Division, IIT Research Institute: Chicago, IL, USA, 1966. [Google Scholar]
  14. Tomek, I. Two algorithms for piecewise-linear continuous approximation of functions of one variable. IEEE Trans. Comput. 1974, 23, 445–448. [Google Scholar] [CrossRef]
  15. Imai, H.; Iri, M. An optimal algorithm for approximating a piecewise linear function. J. Inf. Process. 1986, 9, 159–162. [Google Scholar]
  16. Dell’Accio, F.; Guessab, A.; Milovanović, G.V.; Nudo, F. Truncated Gegenbauer-Hermite weighted approach for the enrichment of the Crouzeix-Raviart finite element. BIT Numer. Math. 2025, 65, 24. [Google Scholar] [CrossRef]
  17. Kolokoltsov, V.N.; Maslov, V.P. Idempotent Analysis and Its Applications; Mathematics and Its Applications; Springer: Dordrecht, The Netherlands, 1997; Volume 401. [Google Scholar] [CrossRef]
  18. Golan, J.S. Semirings and Affine Equations Over Them; Mathematics and Its Applications; Springer: Dordrecht, The Netherlands, 2003; Volume 556. [Google Scholar] [CrossRef]
  19. Heidergott, B.; Olsder, G.J.; van der Woude, J. Max Plus at Work; Princeton Series in Applied Mathematics; Princeton University Press: Princeton, NJ, USA, 2006. [Google Scholar]
  20. Itenberg, I.; Mikhalkin, G.; Shustin, E. Tropical Algebraic Geometry; Oberwolfach Seminars; Birkhäuser: Basel, Switzerland, 2007; Volume 35. [Google Scholar] [CrossRef]
  21. Gondran, M.; Minoux, M. Graphs, Dioids and Semirings; Operations Research/Computer Science Interfaces; Springer: New York, NY, USA, 2008; Volume 41. [Google Scholar] [CrossRef]
  22. Butkovič, P. Max-Linear Systems; Springer Monographs in Mathematics; Springer: London, UK, 2010. [Google Scholar] [CrossRef]
  23. Maclagan, D.; Sturmfels, B. Introduction to Tropical Geometry; Graduate Studies in Mathematics; AMS: Providence, RI, USA, 2015; Volume 161. [Google Scholar] [CrossRef]
  24. Kenoufi, A.O.; Gondran, M.; Gondran, A. Tropical Mathematics and Applications to Theoretical Physics and Scientific Computing; De Gruyter: Berlin, Germany, 2025. [Google Scholar] [CrossRef]
  25. Akian, M.; Gaubert, S.; Niţică, V.; Singer, I. Best approximation in max-plus semimodules. Linear Algebra Its Appl. 2011, 435, 3261–3296. [Google Scholar] [CrossRef]
  26. Saadi, O. Zero-Sum Repeated Games: Accelerated Algorithms and Tropical Best-Approximation. Ph.D. Thesis, Institut Polytechnique de Paris, Palaiseau, France, 2021. [Google Scholar]
  27. Zhang, L.; Naitzat, G.; Lim, L.H. Tropical geometry of deep neural networks. In Proceedings of the 35th International Conference on Machine Learning, Stockholm, Sweden, 10–15 July 2018; Dy, J., Krause, A., Eds.; PMLR: Cambridge, MA, USA, 2018; Volume 80, pp. 5824–5832. [Google Scholar]
  28. Maragos, P.; Charisopoulos, V.; Theodosis, E. Tropical geometry and machine learning. Proc. IEEE 2021, 109, 728–755. [Google Scholar] [CrossRef]
  29. Dunbar, A.; Ruthotto, L. Alternating minimization for regression with tropical rational functions. Alg. Stat. 2024, 15, 85–111. [Google Scholar] [CrossRef]
  30. Kordonis, I.; Maragos, P. Revisiting tropical polynomial division: Theory, algorithms, and application to neural networks. IEEE Trans. Neural Netw. Learn. Syst. 2025, 36, 15978–15992. [Google Scholar] [CrossRef]
  31. Krivulin, N. Algebraic solution of tropical best approximation problems. Mathematics 2023, 11, 3949. [Google Scholar] [CrossRef]
  32. Krivulin, N. On solution of tropical discrete best approximation problems. Soft Comput. 2024, 28, 12097–12112. [Google Scholar] [CrossRef]
  33. Markwig, T. A field of generalised Puiseux series for tropical geometry. Rend. Sem. Mat. Univ. Politec. Torino 2010, 68, 79–82. [Google Scholar]
  34. Grigoriev, D. Tropical Newton-Puiseux polynomials. In Computer Algebra in Scientific Computing; Gerdt, V.P., Koepf, W., Seiler, W.M., Vorozhtsov, E.V., Eds.; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2018; Volume 11077, pp. 177–186. [Google Scholar] [CrossRef]
  35. Li, D. Morphological template decomposition with max-polynomials. J. Math. Imaging Vision 1992, 1, 215–221. [Google Scholar] [CrossRef]
  36. Wang, J. Tropical algebra with high-order matrix for multiple-noise removal. J. Low Freq. Noise Vib. Act. Control 2023, 42, 898–910. [Google Scholar] [CrossRef]
  37. Chen, J.; Grigoriev, D.; Shpilrain, V. Tropical cryptography III: Digital signature. J. Math. Cryptol. 2024, 18, 20240005. [Google Scholar] [CrossRef]
  38. Durcheva, M. Tropical cryptography–The state of the art and future prospects. Athens J. Sci. 2025, 12, 189–204. [Google Scholar] [CrossRef]
  39. Esparza, J.; Gawlitza, T.; Kiefer, S.; Seidl, H. Approximative methods for monotone systems of min-max-polynomial equations. In Automata, Languages and Programming, Proceedings of the 35th International Colloquium, ICALP 2008, Reykjavik, Iceland, 7–11 July 2008; Aceto, L., Damgård, I., Goldberg, L.A., Halldórsson, M.M., Ingólfsdóttir, A., Walukiewicz, I., Eds.; Lecture Notes in Computer Science; Springer: Berlin, Germany, 2008; Volume 5125, pp. 698–710. [Google Scholar] [CrossRef]
  40. Béreau, A. Tropical Polynomial Systems and Game Theory. Ph.D. Thesis, Institut Polytechnique de Paris, Palaiseau, France, 2024. [Google Scholar]
  41. Li, Z.; Wang, C. Achieving sharp upper bounds on the expressive power of neural networks via tropical polynomials. IEEE Trans. Neural Netw. Learn. Syst. 2025, 36, 2931–2945. [Google Scholar] [CrossRef]
  42. Krivulin, N.K. On the solution of a two-sided vector equation in tropical algebra. Vestnik St. Petersburg Univ. Math. 2023, 56, 172–181. [Google Scholar] [CrossRef]
  43. Krivulin, N.K. On solution of a class of linear vector equations in idempotent algebra. Vestn. St. Petersburg Univ. Appl. Math. 2009, 5, 63–76. (In Russian) [Google Scholar]
  44. Krivulin, N. A solution of a tropical linear vector equation. In Advances in Computer Science; Yenuri, S., Ed.; Recent Advances in Computer Engineering Series; WSEAS Press: Athens, Greece, 2012; Volume 5, pp. 244–249. [Google Scholar]
  45. Zimmermann, K. On max-separable optimization problems. In Algebraic and Combinatorial Methods in Operations Research; Burkard, R.E., Cuninghame-Green, R.A., Zimmermann, U., Eds.; North-Holland Mathematics Studies; North-Holland: Amsterdam, The Netherlands, 1984; Volume 95, pp. 357–362. [Google Scholar] [CrossRef]
  46. Zimmermann, K. Disjunctive optimization, max-separable problems and extremal algebras. Theoret. Comput. Sci. 2003, 293, 45–54. [Google Scholar] [CrossRef][Green Version]
  47. Tharwat, A.; Zimmermann, K. One class of separable optimization problems: Solution method, application. Optimization 2010, 59, 619–625. [Google Scholar] [CrossRef]
  48. Krivulin, N. Algebraic solution of tropical polynomial optimization problems. Mathematics 2021, 9, 2472. [Google Scholar] [CrossRef]
  49. Hartman, P. On functions representable as a difference of convex functions. Pacific J. Math. 1959, 9, 707–713. [Google Scholar] [CrossRef]
  50. Tuy, H. Convex Analysis and Global Optimization, 2nd ed.; Springer Optimization and Its Applications; Springer: Cham, Switzerland, 2016; Volume 110. [Google Scholar] [CrossRef]
Figure 1. Approximation by a max-plus rational function R * ( x ) with N = 2 and L = 2 .
Figure 1. Approximation by a max-plus rational function R * ( x ) with N = 2 and L = 2 .
Mathematics 13 03660 g001
Figure 2. Approximation by a max-plus rational function R * ( x ) with N = 3 and L = 3 .
Figure 2. Approximation by a max-plus rational function R * ( x ) with N = 3 and L = 3 .
Mathematics 13 03660 g002
Figure 3. Approximation by a max-plus rational function R * ( x ) with N = 4 and L = 4 .
Figure 3. Approximation by a max-plus rational function R * ( x ) with N = 4 and L = 4 .
Mathematics 13 03660 g003
Figure 4. Approximation by a max-plus rational function R * ( x ) with N = 5 and L = 3 .
Figure 4. Approximation by a max-plus rational function R * ( x ) with N = 5 and L = 3 .
Mathematics 13 03660 g004
Figure 5. Approximation by a max-plus rational function R * ( x ) with N = 6 and L = 5 .
Figure 5. Approximation by a max-plus rational function R * ( x ) with N = 6 and L = 5 .
Mathematics 13 03660 g005
Figure 6. Approximation by a max-plus rational function R * ( x ) with N = 7 and L = 5 .
Figure 6. Approximation by a max-plus rational function R * ( x ) with N = 7 and L = 5 .
Mathematics 13 03660 g006
Figure 7. Evolution of squared approximation error Δ k as the number of iterations k increases.
Figure 7. Evolution of squared approximation error Δ k as the number of iterations k increases.
Mathematics 13 03660 g007
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Krivulin, N. Tropical Solution of Discrete Best Approximation Problems. Mathematics 2025, 13, 3660. https://doi.org/10.3390/math13223660

AMA Style

Krivulin N. Tropical Solution of Discrete Best Approximation Problems. Mathematics. 2025; 13(22):3660. https://doi.org/10.3390/math13223660

Chicago/Turabian Style

Krivulin, Nikolai. 2025. "Tropical Solution of Discrete Best Approximation Problems" Mathematics 13, no. 22: 3660. https://doi.org/10.3390/math13223660

APA Style

Krivulin, N. (2025). Tropical Solution of Discrete Best Approximation Problems. Mathematics, 13(22), 3660. https://doi.org/10.3390/math13223660

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop