An Efﬁcient Algorithm for Eigenvalue Problem of Latin Squares in a Bipartite Min-Max-Plus System

: In this paper, we consider the eigenproblems for Latin squares in a bipartite min-max-plus system. The focus is upon developing a new algorithm to compute the eigenvalue and eigenvectors (trivial and non-trivial) for Latin squares in a bipartite min-max-plus system. We illustrate the algorithm using some examples. The proposed algorithm is implemented in MATLAB, using max-plus algebra toolbox. Computationally speaking, our algorithm has a clear advantage over the power algorithm presented by Subiono and van der Woude. Because our algorithm takes 0.088783 s to solve the eigenvalue problem for Latin square presented in Example 2, while the compared one takes 1.718662 s for the same problem. Furthermore, a time complexity comparison is presented, which reveals that the proposed algorithm is less time consuming when compared with some of the existing algorithms.


Introduction
Time evolution of discrete event dynamic systems can be described through equations composed using three operations the maximum, the minimum and the addition. Such systems are described as min-max-plus systems. The bipartite min-max-plus systems are determined by the union of two sets of equations: one set of equations containing the maximization and the addition; and another set of equations containing the minimization and the addition.
The idea of max-plus algebra was first seen in the 1950s or even at an earlier period. Nowadays, it has been studied intensively. In [1], the authors have investigated the set of invertible linear operators over a subalgebra of max-plus algebra. For a matrix in max-plus algebra, some necessary and sufficient conditions have been established to possess various types of g-inverses including Moore-Penrose inverse [2]. In [3], the authors have characterized the linear operators which preserve the maximal column rank of matrices over max-plus algebra.
Max-plus algebra has many applications in mathematics as well as in different areas such as mathematical physics, optimization, combinatorics, and algebraic geometry [4]. Max-plus algebra is used in machine scheduling, telecommunication networks, control theory, manufacturing systems, parallel processing systems, and traffic control [5][6][7]. Max-plus algebra is also used in image steganography [8]. Max-plus algebra can be used to model disk events related to synchronization and time delays [9]. In [10] the authors have shown how max-plus algebra can be helpful for the dynamic programming of algorithms. In [11], the author has described the whole Dutch railway system by a max-plus system.
The eigenproblems for a matrix A of order n × n are the problems to find out an eigenvalue λ and the eigenvector v, such that Av = λv. In this article, we consider eigenproblems for the bipartite min-max-plus systems. Mostly, power algorithm [12], is used to compute the eigenvalue and eigenvectors in an iterative way. Umer et al. [13] developed an efficient algorithm to solve the eigenvalue problem in max-plus systems, which computes the eigenvalue as a maximal cycle mean and use an iterative approach to determine the eigenvectors. In [14], the authors have demonstrated that the presence of eigenvectors (non-trivial) depend on the position of the greatest and the least elements in the Latin squares in a bipartite min-max-plus system. For further study of eigenproblems for discrete event systems, see [10,[14][15][16].
As per our knowledge and from the literature review, one of the open problems in the max-plus algebra is to come up with an efficient and fast algorithm to solve the eigenproblems for these systems. In this paper, a robust algorithm is developed, that can calculate the eigenvectors corresponding to an eigenvalue λ in an iterative way. In particular, we apply this algorithm to find the eigenvectors (trivial and non-trivial) for Latin squares in bipartite min-max-plus systems. A computational comparison of the proposed algorithm and the power algorithm presented by Subiono and van der Woude [12] is given, which shows the efficiency of the proposed algorithm.
The structure of the paper is along these lines. First of all, some preliminary notions and bipartite min-max-plus systems are presented in Section 2, then a robust algorithm is developed for determining the eigenvalue and eigenvectors of such systems. In Section 3, we present these systems for the Latin squares and calculate trivial and non-trivial eigenvectors for such models. The proposed algorithm and the power algorithm presented by Subiono and van der Woude [12], are implemented in MATLAB (using max-plus algebra toolbox for MATLAB [17]). A time complexity comparison of these algorithms has been given at the end of Section 3. Finally, the conclusion are made in Section 4.

Bipartite Min-Max-Plus Systems
First of all we denote the set of real numbers and the set of whole numbers by R and W respectively, then we define R = R ∪ { }, R τ = R ∪ {τ}, where = −∞, τ = +∞. A matrix or a vector where all components equal to −∞ is represented by , whereas a matrix or a vector where all components equal to +∞ is represented by τ. n denotes the set of first n positive integers, i.e., n = {1, ..., n}.
The following scalar operations are introduced as; r ⊕ s = max {r, s}, for each r, s ∈ R r ⊕ s = min {r, s}, for each r, s ∈ R τ r ⊗ s = r + s, for each r, s ∈ R.
The algebraic structure R min = (R τ , ⊕ , ⊗) represents min-plus algebra and R max = (R , ⊕, ⊗) represents max-plus algebra. Since in both R min and R max the multiplication operator is defined by addition, therefore in both systems the notation for multiplication operator is the same.
The collection of all matrices of order m × n in min-plus and max-plus algebra is represented as R m×n min and R m×n max respectively. While R m min and R m max denotes the set of all vectors in min-plus and max-plus algebra respectively. The scalar operations to matrices are extended as follows. Suppose for i ∈ m, j ∈ n.
If A ∈ R m×r max , B ∈ R r×n max , U ∈ R m×r min and V ∈ R r×n min , then One can see that the notation of the multiplication operator in both systems is different. The addition is defined as maximum (minimum) in R max (respectively, R min ). A bipartite min-max-plus system can be represented as: where u i (l), a ij ∈ R ; w j (l), b ji ∈ R τ ; l ∈ W for all i ∈ m; j ∈ n. These equations can be written as; The above equations can be denoted as; where W is the set of whole numbers and Compactly, system (1) can be written by a mapping M(·), such that , for l ∈ W.
For a system of type (2), the notion of eigenvalue and eigenvectors is defined as follows. A real number λ ∈ R is said to be an eigenvalue corresponding to an eigenvector The cycle time vector in a system of type (2) is defined as The cycle time vector η(A, B) ∈ R n is a vector such that each component is equal to the eigenvalue for the given system of type (2). The cycle time vector is independent of initial vector x(0). In this section, we determine the eigenvalue λ by computing cycle time vector. To compute the eigenvectors, we propose an iterative algorithm. For this purpose, define A λ = −λ ⊗ A and B λ = −λ ⊗ B, corresponding to the eigenvalue λ of a system of type (2). Also define for l ∈ W, where u * (l) ∈ R m and w * (l) ∈ R n τ . System (4) can be denoted as, for l ∈ W. Let v be a vector, then N l (v) represents a vector obtained after applying N on the vector v by l times. A relation between (2) and (5) is shown in the following theorem.

Theorem 1.
Let λ be an eigenvalue for a system of type (2) and v = u(l) w(l) be a vector, then

Corollary 1.
Let v be an eigenvector corresponding to the eigenvalue λ of a system of type (2). Then Theorem 2. Let λ be an eigenvalue of a system of type (2) and let Proof. From Theorem 1, Now we present Algorithm 1 in the following, which gives the eigenvectors corresponding to the eigenvalue λ. But, first we give three basic assumptions in the following that are necessary for the convergence of the algorithm.

1.
For any arbitrary initial vector x(0), the system of type (2), ends up in a periodic behavior, after a finite number of iterations.

2.
Eigenvalue of the system exists.

3.
Every periodic behavior has the same average weight, equal to eigenvalue. (2) 1. Compute the eigenvalue λ, by calculating the cycle time vector η(A, B).
6. If N (v) = v then v is the correct eigenvector and algorithm stops. Else if N (v) = v then go to the following step. 7. Take v as new starting vector and iterate x * (l + 1) = N (x * (l)), until for some t ≥ 0, it holds that . Finally x * (t) is an eigenvector.

Theorem 3.
Let λ be an eigenvalue and v be a vector computed as in Algorithm 1 for a system of type (2), then
These inequalities imply that

Proof.
Since x * (l) = N l (v), which implies that Proof of Algorithm 1 . Since the system ends up in a periodic behavior aftera finite number of iterations, therefore step 3 of the algorithm performs. If N (v) = v then v is the correct eigenvector and clearly algorithm can stop. If N (v) = v then start by considering x * (0) = v as new initial vector and iterate (5). By first assumption, there exist integers r > s ≥ 0, with x * (r) = x * (s). By Lemma 1, x * (l + 1) ≥ x * (l) for all l ∈ {s, ..., r − 1}. Our goal is to show that x * (l + 1) = x * (l) for all l ∈ {s, ..., r − 1}. Suppose on contrary that x * j (l + 1) > x * j (l ), for some integers l , j such that, s ≤ l ≤ r − 1 and 1 ≤ j ≤ n. We obtain that x * j (r) > x * j (s), which is a contradiction because x * (r) = x * (s). Hence x * (l + 1) = x * (l) for all l ∈ {s, ..., r − 1}. Which completes the proof. Example 1. Consider a system of type (2), given as follows: Since the cycle time vector is equal to (2 2 2 2 2 2) T . Therefore the eigenvalue λ = 2.
We get, Now, take the initial state vector The following sequence is obtained, after iterating (5), Since x * (5) = x * (3), therefore s = 3, r = 5. To compute a corresponding eigenvector we proceed with the computation of the vector v.
Now verify that either v is the correct eigenvector or not. So Which shows that the eigenvector v is the correct eigenvector obtained by Algorithm 1.

Latin Squares in Bipartite (Min, Max, Plus)-Systems
A Latin square is a square matrix of order n, with elements from n independent variables over R + in such a way that each row and each column is a different permutation of the n variables [18]. In the following, an example of a Latin square of order 4 is given In this section, we consider Latin squares for systems of type (2) and Algorithm 1 is extended to calculate the eigenvalue and eigenvectors for such type of systems. In [14], authors show that for Latin squares in a system of type (2), the eigenvalue λ is determined as Now, we propose Algorithm 2 to solve eigenvalue problem for Latin squares in a system of type (2) as follows: (2) 1. Compute the eigenvalue as, λ = max (A) + min(B) 2 .

Define
3. Take a starting vector x * (0). 4. Iterate (5), until for some integers r > s ≥ 0, it holds that x * (r) = x * (s). 5. Determine the eigenvector as, 6. If N (v) = v then v is the correct eigenvector corresponding to the eigenvalue λ and algorithm can stops. Else if N (v) = v then go to the following step. 7. Take v as initial state vector and iterate x * (l + 1) = N (x * (l)), until for some t ≥ 0, it holds that x * (t + 1) = x * (t). Finally x * (t) is an eigenvector.
Here we find the eigenvalue and eigenvectors for Latin squares in systems of type (2) by using Algorithm 2. First, recall the power algorithm (Algorithm 3) for systems of type (2), proposed by Subiono and van der Woude [12], then we compare it with Algorithm 2. x(r + 1) = λ ⊗ x(r). Then x(r) is a correct eigenvector of system (2).
To illustrate the Algorithms 2 and 3, consider the following example. In this example, we consider a system of type (2), where A and B are Latin Squares with entries in n and n τ respectively. Example 2. Let A and B are Latin squares in a system of type (2), given as follows:

1.
The eigenvalue λ is given as, By Algorithm 2, Now, take the initial state vector The following sequence is obtained, after iterating (5), Since x * (6) = x * (0), therefore s = 0, r = 6. The required eigenvector v is computed as, Now verify that either v is the correct eigenvector or not. So Which shows that the eigenvector v is the correct eigenvector obtained by Algorithm 2.
Using Algorithm 3 in Example 2, system ends up in a periodic behaviour after 6th iteration and we get s = 0, r = 6 and c = 12. If we consider x(0) = (0 0 0 0 0 0 0 0) T in Example 2, then we get s = 0, r = 2 and c = 4. So in case of Algorithm 3, one can get different value of c for different initial state vectors, while in Algorithm 2, we need not a real number c.

Remark 1.
The main focus in this paper is to develop an efficient algorithm to find out the eigenvectors for systems of type (2). Also, we have made computational experiment to compare the Algorithms 2 and 3 for Latin squares. We have implemented both algorithms in MATLAB for r ∈ A 1 , s ∈ A 2 and c ∈ A 3 such that |A i | = n i , i = 1, 2, 3. Here |A i | represents the cardinality of each set A i . In case of Algorithm 3, it stops if there exists a positive integers r > s ≥ 0 and a real number c with x(r) = x(s) ⊗ c, while in that of Algorithm 2, it stops if for some integers r > s ≥ 0 it holds x * (r) = x * (s). Therefore, the time complexity of Algorithm 3 is O(n 1 n 2 n 3 ), while the time complexity of Algorithm 2 is O(n 1 n 2 ). Thus the proposed algorithm takes less time than the compared one.
The computational efficiency of the proposed method can be seen by comparing the runtimes of Algorithm 2 and 3. Both algorithms are executed under the same Laptop environment with 1.70 GHz CPU, 4 GB RAM, MATLAB (R2015a) simulation software. We computed the time of calculating eigenvalue and eigenvector for Example 2 by both algorithms. The time consumptions of Algorithm 2 and 3 are 0.088783 s and 1.718662 s respectively, which clearly reveals that the proposed algorithm is faster than the other one. Also in case of Algorithm 2, we obtain the eigenvector v by a simple formula, given as v = x * (s) ⊕ ... ⊕ x * (r − 1) however, while using that Algorithm 3 an eigenvector is obtained as v = ⊕ r−s j=1 (λ ⊗(r−s−j) ⊗ x(s + j − 1)).
which is quite difficult compared to Algorithm 2.

Conclusions
The eigenproblem of bipartite min-max-plus systems for Latin squares has been discussed in this work. The iterative Algorithm 1 was developed for the computation of the eigenvectors (trivial and nontrivial) for systems of type (2). In particular, this algorithm was extended to compute the eigenvalue and eigenvectors for Latin squares in a system of type (2). At the end, a computational comparison has been given. Experimental result shows that the proposed Algorithm 2 is much more computationally efficient than the compared one. Of course, Algorithm 2 is only for Latin squares in a system of type (2), while Algorithm 3 may be used for all bipartite min-max-plus systems. Similarly, one can derive an algorithm to calculate the eigenvalue and eigenvectors for separated min-max-plus systems.