1. Introduction
Recognized as one of the foundational formulations in optimal transport theory, the Monge–Kantorovich (MK) problem provides the theoretical framework for a wide range of applications, including image registration, mass redistribution problems, numerical approximation of measures, and modern machine learning models [
1,
2,
3]. Efficiently solving this problem requires approximating measures and cost functions defined on high-dimensional spaces, which leads to significant computational challenges, particularly when fine discretizations are used or when progressively refined solutions are sought [
4,
5,
6,
7].
The Monge–Kantorovich problem is formulated as follows. Let
X and
Y be two compact subsets of
. We denote by
the family of finite measures on
. Given
, its marginal measures on
X and
Y are defined by
and
for each
-measurable set
and
. Let
c be a real-valued function defined on
, and let
and
be finite measures on
X and
Y, respectively. The Monge–Kantorovich mass transfer problem is then given by
which constitutes a linear optimization problem over the space of positive measures with prescribed marginals [
5,
6].
Wavelet-based multiresolution analysis (MRA), particularly Haar MRA, provides a natural framework for constructing hierarchical approximations of the MK problem. In this approach, the involved measures and cost functions are projected onto nested approximation spaces, yielding a sequence of discrete problems at increasing resolution levels. This multiscale structure significantly reduces the computational complexity of the problem while preserving its essential features [
8,
9,
10,
11]. However, even within this framework, obtaining an optimal solution at a fine resolution may still require solving large-scale transportation problems.
Multiresolution schemes based on wavelet decompositions have already been successfully applied to the Monge–Kantorovich problem. In particular, Haar-based approximations have been used to construct discrete versions of the MK problem and to derive efficient numerical schemes for its solution [
12,
13,
14]. These approaches exploit the hierarchical nature of the wavelet transform to obtain good initial approximations at coarse levels, which are then refined as the resolution increases.
To further enhance computational efficiency, we propose complementing the wavelet-based approximation with an automaton specifically designed to operate on permutations. This automaton uses local cost information to guide transitions between feasible solutions, ensuring that each transition preserves feasibility while improving or maintaining the value of the objective function. The underlying structure of the automaton is closely related to classical assignment and transportation problems [
15,
16,
17], and its behavior can be interpreted as a metaheuristic refinement strategy [
4].
In our approach, the multiresolution analysis provides an initial feasible solution that is close to optimal at each resolution level. Specifically, we apply the discrete wavelet transform to the cost function and solve the corresponding transportation problem whose cost matrix consists of the approximation coefficients. This reduced problem involves only one quarter of the variables of the original discrete problem, leading to a substantial reduction in computational cost. Similar strategies have been shown to be effective in previous studies [
12,
13,
14].
The solution obtained for the transportation problem at the approximation level is then extended to a feasible solution of the original problem by incorporating the detail coefficients of the wavelet decomposition. This extended solution serves as the initial state of the tuning automaton. The final states reached by the automaton are taken as approximations of the optimal solution of the Monge–Kantorovich problem. The convergence and stability of such approximation procedures are supported by classical results on approximation schemes and convergence of measures [
5,
6,
18].
The content of this article is as follows: In
Section 2, we present a series of preliminary results on multiresolution analysis (MRA) and wavelet transforms that will be applied to obtain approximations of the Monge–Kantorovich problem. In
Section 3, we present an adjustment automaton for the permutation group. This tool will be fundamental in the development of this article, as it will allow us to improve the solutions to transportation problems. In
Section 4, we present the discretizations of the Monge–Kantorovich problem, noting that the feasible solutions are permutations and defining a function on each state of the automaton (permutation and position) that will allow us to ensure that the next state is better than, or at least equal to, the current one. We then present some examples to illustrate how the automaton works, starting from a random permutation. In
Section 5, we present several classic examples of Monge–Kantorovich problems, giving approximations of the solutions based on a methodology for solving transportation problems at each level of multiresolution analysis using the wavelet transform and the tuning automaton for permutations.
2. Preliminaries
This section presents the theoretical foundations underlying the proposed methodology. In particular, it presents multiresolution analysis (MRA) based on Haar wavelets and its extension to the two-dimensional case, along with the properties of measure projection through multiscale approximations.
A multiresolution analysis (MRA) on the real line is defined as a sequence in the function space of . These subspaces satisfy the following properties:
- (1).
, for every .
- (2).
.
- (3).
.
- (4).
.
- (5).
There exists a function
, called the scaling function, such that the collection
forms an orthonormal system of translates and
Let
and
, where
denotes the characteristic function of the set
A. For each pair
, we define the functions:
where
. Thus, the Haar multiresolution analysis (Haar-MRA) on
is the sequence of subspaces
generated by the scaling function
. Moreover, the set
forms a basis of
and for each
, the space
is decomposed as the direct sum
, where
The Haar multiresolution analysis on
can be extended to
by defining the scaling function as
, along with the Haar wavelet functions on
defined by
Using these functions, we define the spaces
where
and
represent the dilatation and translation operators
a and
, respectively. These operators are explicitly defined as:
Hence, the sequence
of subspaces of
constitutes the Haar-MRA on
. Consequently, we obtain the following decomposition:
where
The Haar scaling system consists of all functions of the form
while the Haar scaling system is the collection of all functions
for all
.
In the two-dimensional Haar decomposition, the wavelet system , , and corresponds to the horizontal, vertical, and diagonal detail components, respectively. Thus, each resolution level produces a low-pass approximation together with exactly three high-pass components.
It is well known that the collection of functions
forms an orthonormal basis for
. Furthermore, the collection
also constitutes an orthonormal basis for
.
Thus, the approximation operator at the level
is defined as
for all
. The detail operators at this level are defined as
with
. Note that the projection satisfies the following decomposition
We now describe the approximation operator
and detail operators
,
and
from the geometric point of view. Given that
fixed, we consider the square defined by
This square can be decomposed as a disjoint union of the following squares:
Thus, we have that
where the sets
, with
, are illustred in
Figure 1.
Consequently, for
the operator
acts as a discretization of
f that is constant over the disjoint squares
. For more details on the fundamental results in multiresolution analysis, see the following works: [
9,
10,
11,
13].
Additionally, let X be a compact subset of . We assume that is a measure absolutely continuous with respect to the Lebesgue measure , whose Radon-Nikodym derivative satisfies .
It is well known that
as
. Moreover, by the compactness of
X, we have the estimate
Therefore, the approximation of the measure in the level j defined by is absolutely continuous with respect to the Lebesgue measure . If we further assume that the measure has support contained in X, then the approximations converge to in both the and sense.
Note that for each , there exists an integrable function such that for every Lebesgue measurable set , where denotes the expectation of g with respect to the Lebesgue measure.
Finally, the fact that each the measure
has compact support implies that the sequence
converges weakly to the measure
. For further details on the approximation of a measure using multiresolution analysis, see [
12,
13].
3. Adjustment Automaton over Permutations
This section introduces a finite automaton defined on the permutation group , designed to refine discretized feasible solutions to the Monge–Kantorovich (MK) problem. The automaton serves as a central tool in the subsequent section, where it enables systematic local adjustments that reduce the associated cost and thereby improves solution quality.
An automaton is a theoretical model of computation used to describe and analyze systems that process inputs and produce outputs according to a prescribed set of states and transition rules. Formally, an automaton is defined as follows:
Definition 1. An automaton is defined as a 5-tuple:where: Q is a finite set of states,
Σ is a finite set of input symbols called the alphabet,
is the transition function,
is the initial state,
is the set of accepting (or final) states.
Explanation of the Components:
- 1.
States (Q). At any given time, the automaton occupies one of a finite number of states. These states encode the internal configuration of the system and may be interpreted as its “memory.”
- 2.
Alphabet (). The input alphabet is a finite set of symbols that the automaton is capable of reading. For instance, in the case of binary inputs, one has .
- 3.
Transition Function (). The transition function specifies how the automaton evolves from one state to another in response to an input symbol. Formally, it is a mapping
Given a state and an input symbol , the value determines the subsequent state of the automaton.
- 4.
Initial State (). Computation begins at the distinguished initial state , from which the automaton starts processing the input.
- 5.
Accepting States (F). A subset is designated as the set of accepting (or final) states. An input string is said to be accepted by the automaton if, after the entire input has been processed, the automaton terminates in a state belonging to F.
Further information on the automaton is provided in [
19,
20]. We now recall the following concept:
Definition 2. Let with , and let . A permutation on n is an invertible function . The set of all permutations on n, together with function composition, forms a group called the symmetric group of degree n, which is denoted by .
A permutation
can be represented as an array (or list) of length
n, where the
i-th entry specifies the image of
i under
. Formally, a permutation
is represented as:
The inverse of a permutation
is the permutation
such that:
To compute
from the array representation of
, one swaps the indices and the corresponding values. A detailed discussion of permutations can be found in [
21].
Example 1. Let . Then its inverse permutation is given by We can represent the permutation
by the matrix
, defined by
Example 2. Let . Its matrix representation is given by Observe that for each fixed permutation
and fixed index
k, the components of
associated with the position
k take the following form.
The second row indicates the position in the array associated with the permutation , while k denotes the position at which the automaton acts.
Example 3. To exemplify the above paragraph, we consider the following permutation with respect to position . The inverse permutation is given by Now, calculate the distinguished position with respect to , which are sinceand Finnally, the matrix representation is given by Remark 1. In the figures presented in Section 5, the graphs representing the permutations (feasible solutions) are numbered from bottom to top and from left to right. Moreover, the positions of the 1’s are represented by colored points. In contrast, in the previous matrix representation, the numbering is carried out from top to bottom and from right to left. For example, considering the row reordering used in Section 5, the previous matrix corresponds to the following arrangement. Finally, the representation of the permutation using colored points is as follows: The neighbors’ interpretation is as follows. The neighbors of
in the matrix representation are those positions that contain the value 1 in the rows and columns adjacent to position
, since
is fixed, we will refer to the position
simply as position
k. Explicitly, these positions are:
For simplicity, we will write
to denote the neighbors of position
k, which are illustrated in
Figure 2.
Definition 3. We define an adjusted automaton constructed from the elements of in the following manner: we consider the 5-tuplewhere: is a finite set of states,
is a finite set of input symbols called the alphabet,
is the transition function, which is defined bywhere is the initial state, where is any element of .
is the set of accepting (or final) states.
4. Improving Solutions of the Monge–Kantorovich Problem via an Adjustment Automaton on the Permutation Group
In this section, we present a hybrid methodology that integrates Haar wavelet-based multiresolution analysis (MRA) with a finite automaton acting on permutations, with the aim of obtaining optimal solutions to the Monge–Kantorovich (MK) problem.
This approach exploits the hierarchical structure of MRA to construct an initial approximate solution, which is subsequently refined through local adjustments performed by the automaton described in the previous section.
M-K Problem and MRA
A measure is said to be a feasible solution to the problem if it satisfies (3) and the pairing is finite. The problem is said to be solvable if there exists a feasible measure that attains the optimal value of the objective functional. In this case, is referred to as an optimal solution of (3).
Moreover, assuming that is absolutely continuous with respect to the Lebesgue measure on and that and are absolutely continuous with respect to the Lebesgue measure on , the problem admits a natural discretization via Haar multiresolution analysis on .
Recall that, according to Equation (3), the Monge–Kantorovich problem at level
j is given by:
for each
-measurable set
and
, where
,
and
are the projections to level
j of the measures
,
and
to the respective Haar MRA.
In particular, we consider the
problem with cost function
, base sets
, and marginal measures
. Since practical applications typically involve discretized formulations, the application of multiresolution analysis on
leads us to the following objective problem:
Here,
denotes the portion of the initial mass
located at the interval
on the
x-axis that is allocated to the interval
on the
y-axis. We refer to the
j-discrete unit square as the grid formed by the squares
(see (9)), which partitions the set
into
blocks, each naturally identified with the point
.
The above formulation is an assignment problem, which is a particular case of the transport problem. The problem instance has a number of agents and a number of tasks. Any agent can be assigned to perform any task, incurring some cost that may vary depending on the agent-task assignment. The Hungarian method is a combinatorial optimization algorithm that solves the assignment problem in polynomial time and which anticipated later primal–dual methods. It was developed and published in 1955 by Harold Kuhn, who gave it the name “Hungarian method” because the algorithm was largely based on the earlier works of two Hungarian mathematicians, Dénes Kőnig and Jenő Egerváry. For more details, see [
15,
16,
17].
We assume the existence of a simple solution to (12). That is, is a feasible solution such that, for any with , it necessarily holds that for all and for all .
All feasible solutions of (12) correspond to permutations
. Consequently, we employ the automaton introduced in
Section 3, with
in this setting.
Our objective is to improve a given solution of (12), where
denotes the associated cost matrix. Based on this cost matrix and the current state of the automaton, we introduce the following quantities.
Definition 4. We define the evaluation function of the state associated with the matrix as follows:where the values for are given by (13). The interpretation of the evaluation function is the following:
If then any change improves the feasible solution.
If then the change in the positions and k (in the array representation of ) is the better local change that improves the feasible solution.
If then the change in the positions and k is the better local change that improves the feasible solution.
If then the change in the positions and k is the better local change that improves the feasible solution.
If then the change in the positions and k is the better local change that improves the feasible solution.
By construction, if we consider a state
and apply the automaton with the alphabet symbol
, we obtain the following.
It is clear that both
and
are feasible solutions of (12). Moreover, by construction of function
f defined in (14), we have
equivalently
where
and
denote the entries of the matrices associated with
and
, respectively, as defined in (10).
In summary, we have the following result.
Theorem 1. Consider the transport problem given by (12) and consider a state where is a permutation and a feasible solution of the transport problem. Let f be a function that evaluates a state with respect to a cost matrix given by (14). If , thenequivalently Given an initial state of the automata
, we applied the automata to improve the feasible solution
as follows.
Thus, we find that the final state of the automaton is given by . Therefore, the final state of the automaton provides an improved solution compared to the initial state .
Example 4. Figure 3 illustrates the application of the tuning automaton to the Monge–Kantorovich problem with cost function , discretized at level 3, which produces a cost matrix of size . The first image corresponds to a randomly generated feasible solution, obtained from a random permutation. The remaining images show the successive adjustments performed by the automaton as it evaluates possible swaps between neighboring elements.
In each step, the colored markers indicate the candidate solution under evaluation. The green dots represent the elements involved in the swap currently being tested, while the yellow dots correspond to assignments that remain fixed during that evaluation step.
The evaluation process proceeds sequentially by rows. Starting from row 0, the algorithm evaluates possible exchanges with neighboring elements; the process then continues with row 1, and so on until all rows have been examined.
The last image corresponds to the optimal solution obtained using the Hungarian algorithm. In this example, the solution produced by the proposed automaton coincides with the optimal solution.
5. Examples of the Proposed Methodology Based on Wavelets and an Automaton
The automaton constitutes a viable alternative for improving feasible solutions. Nevertheless, it is desirable for its initial state to be a feasible solution to the Monge–Kantorovich problem that already provides a close approximation to the optimal solution. To construct such an initial solution, we adopt the first stage of the scheme proposed in [
13], which is then used as the input for the automaton.
Our approximation scheme consists of the following steps:
- 1.
Discretization of the cost function: The cost function is discretized at level j, and the resulting discretized cost is denoted by .
- 2.
Application of the wavelet transform: Applying the wavelet transform to , we obtain:
a low-pass component, denoted by ;
three high-pass components, denoted by , , and .
- 3.
Solution of the problem: Using the cost function
and the methodology proposed in [
12], we compute an optimal solution
to the
problem.
- 4.
Feasible solution construction for problem: Using together with the high-pass components , , and , we construct a feasible solution at level j with the following properties:
- (a)
- (b)
- (c)
- (d)
.
Here, denotes the sign function. In other words, the support of is contained in the support of . The components and do not participate in the construction, as they affect the boundary conditions of the problem. Finally, the sign of determines the direction in which the solution is scaled.
- 5.
Implementation of the automaton: We use the feasible solution as the input to the automaton defined in (11). The automaton’s output yields the final approximation.
5.1. Example 1
In this example, we consider the cost function
. In
Figure 4, the left side represents the discretization for level 5, where the cost function turns out on a cost matrix of
, and the right side represents 3-dimensional graphics of the cost function.
According to [
12], the optimal solution
at this level is illustrated in
Figure 5, where the red points indicate the optimal assignments of the transportation problem.
Below, we present the implementation of the algorithm described at the beginning of this section.
Applying the wavelet transform to the previous function, we obtain the decomposition in
Figure 6.
Here, the upper-left figure illustrates the lower-level approximation, the upper-right figure depicts the horizontal details, the lower-left figure shows the vertical details, and the lower-right figure corresponds to the diagonal details.
By solving the transportation problem for the cost function given by the approximation at the lower level, we obtain the measure
. The goal is to construct a feasible solution
(level 5) from
and the components
,
, and
, as illustrated in
Figure 7.
Below, we implement the automaton defined in (11), as illustrated in
Figure 8:
The upper figures illustrate the movements performed by the tuning automaton when the initial state is given by the right-hand panel of
Figure 7. The green dots indicate the positions at which the automaton performed local optimizations. For clarity, steps in which no changes occurred are omitted.
The lower-left figure represents the final solution obtained by our procedure, which consists of applying the wavelet transform, solving the transportation problem with a cost matrix (level 4), extending the solution, and subsequently applying the automaton (level 5).
The lower-right figure shows the solution obtained by directly solving the transportation problem with a
cost matrix (level 5), as described in [
12]. The solution obtained by our algorithm and the one obtained by directly applying the Hungarian algorithm are not identical; however, both produce the same minimum value, and therefore they can be considered equivalent solutions.
In the numerical experiments presented in this work, the proposed automaton consistently converged to an optimal assignment. However, a complete theoretical characterization of the convergence properties of the method, including the precise conditions under which the optimal solution is unique, remains an open question. Determining such conditions and establishing formal convergence guarantees constitutes an interesting direction for future research.
5.2. Example 2
In this example, we consider the cost function
. The discretized function at level
is shown in the following
Figure 9:
The feasible
solution at this level, according to [
12], is shown in the following
Figure 10:
On the other hand, by applying the wavelet transform to the discretization at level
, we obtain the decomposition in
Figure 11, analogous to that shown in
Figure 6.
By solving the transportation problem for the cost function given by the approximation at the lower level, we obtain the measure
. From this solution, we obtain the feasible solution
(
Figure 12) in a form analogous to that presented in
Figure 7.
In this case, the measure
constructed from
coincides with the feasible measure
. Consequently, the automaton performs no modifications, as shown in
Figure 13, which are analogous to those presented in the comparison carried out in the previous example.
5.3. Example 3
In this example, we consider the cost function
. The discretized function at level
is shown in the following
Figure 14:
According to [
12], the feasible measure
at this level is illustrated in
Figure 15.
By applying the wavelet transform to the discretization at level
, we obtain the decomposition in
Figure 16, which is analogous to that shown in
Figure 6.
The solution of the transportation problem corresponding to the cost function given by the lower-level approximation produces the measure
. From this result, we obtain a feasible solution
(
Figure 17), presented in a form analogous to that depicted in
Figure 7.
Figure 18 illustrates both the changes produced by the implementation of the automaton on the feasible measure
, resulting in the feasible measure
, and the sequence of candidate solutions generated by the tuning automaton after applying the scaling procedure. The process begins with the approximation obtained after scaling and performing an initial adjustment, and each subsequent image corresponds to a new approximation produced while evaluating possible swaps. The penultimate image represents the final solution obtained by the automaton, whereas the last image shows the optimal solution computed using the Hungarian algorithm for comparison.
6. Conclusions
An important part of this work was the introduction of an automaton on the permutation group, which proved to be a useful tool to improve feasible solutions to the transportation problem associated with the MK problem. This represents a significant contribution to automata theory applied to optimization problems.
In all examples of transportation problems (assignment problem) associated with classic Monge–Kantorovich problems with a continuous cost function, these problems have the number of agents . Therefore, solving this type of problem with the Hungarian algorithm has a computational cost of .
Our methodology for solving the resulting transportation problems consists of the following steps:
- 1.
Apply the wavelet transform to a cost matrix of size , which has a computational cost of .
- 2.
Solve the transportation problem (assignment problem) over the approximation coefficients of the wavelet transform. At this coarser resolution level the problem involves agents, which is simpler than the original assignment problem. This reduced assignment problem is solved using the Hungarian algorithm in order to obtain an optimal assignment for the smaller cost matrix.
- 3.
Extending the solution from level to level j has a computational cost of , since it is only a fixed number of steps for each element of an array of size .
- 4.
The computational cost of the linear automaton over the size of the array , which is .
Therefore, the computational cost of this methodology for solving the transportation problem associated with the MK problem is significantly lower than that of applying the Hungarian algorithm directly. Since steps 1, 3, and 4 of our algorithm are of order , the main computational cost of the methodology is concentrated in step 2. In this work, this step is solved by applying the Hungarian algorithm to a reduced problem involving only half of the agents.
Although the order of the Hungarian algorithm for this reduced problem is , which in the worst case has the same asymptotic order, in practice fewer operations are required. Furthermore, to solve the problem with agents, our algorithm can be applied again, reducing the problem to one with agents, and so on. The study of the limits and scope of these techniques constitutes a direction for future research.
Furthermore, this methodology produced results equivalent to those obtained with the Hungarian algorithm for transport problems associated with MK problems. To illustrate this, three examples were presented at the level , clearly demonstrating that equivalent results are obtained.
In the transportation problems considered in this article, the cost matrices are obtained from discretizations of a continuous function, which provides a certain degree of local stability to the matrix coefficients. Future work will aim to explore the limits of this technique in settings where the cost matrix exhibits higher entropy.
In
Figure 3, the process begins with a random initial solution, to which the automaton is directly applied in order to solve the problem under consideration. In this case, the automaton successfully finds the optimal solution at level 3. However, the application of the automaton at higher levels of resolution was not investigated. As a direction for future research, it would be of interest to analyze the scope and limitations of applying the automaton to more general assignment problems, particularly in cases where the cost matrix is not derived from the discretization of a continuous function.
In addition, the technique will be evaluated by applying a greater number of multiresolution levels to the cost function in order to analyze its performance and robustness.
The automaton-based refinement strategy proposed in this work could also be applied to the optimal partial transport problem. In that setting, only a portion of the total mass is transported, which introduces additional constraints in the assignment structure. The local adjustment mechanism of the automaton, which operates through sequential swaps of assignments, could be adapted to handle partial matching by allowing unassigned elements or slack variables to represent unused mass. Although such an extension would require modifications to the state representation and the evaluation rules of the automaton, the underlying idea of iterative local refinement remains applicable. Investigating this extension and analyzing its numerical behavior constitutes an interesting direction for future research.