On Application of Max-Plus Algebra to Synchronized Discrete Event System

Max-plus algebra is a discrete algebraic system developed on the operations max ( ) and plus ( ), where the max and plus operations are defined as addition and multiplication in conventional algebra. This algebraic structure is a semi-ring with its elements being real numbers along with e=-∞ and e=0. On the other hand, the synchronized discrete event problem is a problem in which an event is scheduled to meet a deadline. There are two aspects of this problem. They include the events running simultaneously and the completion of the lengthiest event at the deadline. A recent survey on max-plus linear algebra shows that the operations max ( ) and plus ( ) play a significant role in modeling of human activities. However, numerous studies have shown that there are very limited literatures on the application of the max-plus algebra to real-life problems. This idea motivates the basic algebraic results and techniques of this research. This paper proposed the discrepancy method of max-plus for solving n×n system of linear equations with n≤n, and further show that an nxn linear system of equations will have either a unique solution, an infinitely many solutions or no solution whiles nxn linear system of equations has either an infinitely many solutions or no solution in ( ). Also, the proposed concept was extended to the job-shop problem in a synchronized event. The results obtained have shown that the method is very efficient for solving n×n system of linear equations and is also applicable to job-shop problems.


Introduction
Max-plus algebra equipped with max as addition and + as multiplication is a class of discrete algebraic systems, that plays an important role in modeling and analyses of various types of discrete event systems (DES) including control systems, intelligent transportation systems, multiprocessor operating systems, multi-level monitoring, computer networks, telecommunication networks, railway networks, flexible manufacturing systems, traffic control systems, logistic systems, and many more [1,2]. In these systems, the operations max (⨁) and plus (⨂) in conventional algebra refer to addition and multiplication, respectively [4,5]. Let ℝ represent the whole real-line, then, ℝ = ℝ ∪ {−∞}. Suppose , ∈ ℝ , then, we define two operators for addition and multiplication as follows: ⨁y = max( , ) , and ⨂ = + (1) where the priority for ⨂ is supposed to be higher than ⨁ in the conventional algebra's rule and −∞ and 0, are the zero and unit elements for addition and multiplication, which will be denoted by and , respectively. In max-algebra, the binary operations of addition and multiplication in the conventional linear algebra are replaced by maximum and addition respectively. Any problem involving the addition and taking the maximum of numbers, may be possibly describe in max-algebra. However, a nonlinear problem when described in conventional terms may be converted to a max-algebraic problem that is linear with respect to (⊕, ⊗ ) = (max, +) [6].
Recently, the area of discrete even systems has been of interest to numerous researchers in both academic world and industries, all aiming to study various techniques that would model, analyze, and control the complex discrete event systems (DES). Generally, discrete event systems in conventional algebra often lead to a nonlinear description. However, the model is capable of reducing to "linear" for certain subclass of discrete event systems when formulated in the max-plus algebra with max (⨁) and plus (⨂) as its basic operations [3,5,7]. Precisely, discrete event systems whereby no concurrency, which means only the synchronization is been modeled via the operations plus (⨂) (conforming to the period of events: the starting time plus the duration equal the finishing time of an operation), and max (⨁) (conforming to synchronization: a new operation begins immediately the current operations finish) [8,9]. This led to the "linear" description in the max-plus algebra. The class of discrete event systems with only synchronization and in which no choice or concurrency occurs is referred to as max plus-linear discrete event systems (max plus-linear DES), and some typical examples of the system are job rotation problem, queuing systems, serial production lines, job scheduling problems, production systems with a fixed routing schedule, and railway network [3,9,10].
Motivated by the above discussion, in this paper, we studied the discrepancy method of max-plus for solving × system of linear equations with ≤ , and further extended the proposed concept to solve real-life problem of job-shop scheduling in a synchronized event.
The rest of the paper is structured as follows. In section 2, we present some preliminary discussion of max-algebra with definitions of terms which are very important to the research. The max-algebraic system is discussed in Section 3, followed by application to Synchronized discrete event problem in Section 4. Finally, Section 5 present the conclusion and discussion of the research.

Preliminaries
In this section, we present some basic definitions max-algebra, and discussed show how the operations of max-algebra can be extended to matrices and vectors.
Definition 2.1 [6,7,8]. The max-plus semiring ℝ¯ is the set ℝ ∪ {−∞}, equipped with the multiplication (a, b) ↦ a + b and addition (a, b) ↦ max (a, b) and denoted by ⊗ and ⊕ respectively. That is a ⊗ b = a + b and a ⊕ b = max (a, b). The identity element for the multiplication (or unit) is 0 and the identity element for the addition (or zero) is −∞.
The algebraic structure ℝ = (ℝ ℇ ⨁, ⨂) is called max-plus algebra the notation of ℰ = −∞ = 0 [9]. The symbols are used instead of −∞ and 0 to avoid confusion with their roles in conventional algebra and more specifically, emphasize their special meanings. Their algebraic structure ℝ is an idempotent commutative semiring whose structure satisfies propositions.
Definition 2.7 [5]. Let A =� , � ℝ − , then, the negation and transposition of the matrix A i.e. * = in conventional notation will produce the conjugate of the matrix A which is * =( , ).
Throughout this paper, columns (rows) of A= � , � ℝ − will be denoted by 1 … , ( 1 … , ) for simplicity. Also, a matrix or vector would be called finite if none of its entries is −∞ or +∞. Also, the matrices with at least one finite entry on each row or column would be considered, and defined by the following definitions.
Definition 2.8 [5]. Let A ℝ − be a matrix with at least one finite entry on each column (row), then is called column ℝ-astic(row ℝ-astic). However, if is both row and column ℝ-astic, then, it is called doubly ℝ-astic.

Max -Algebraic Linear System
This section will consider the max-algebraic inequalities and linear systems of equations namely where are positive integers. Consider the following linear system of equations in max-algebra, is called the one-sided max-linear system or max algebraic linear system, (1) can be rewritten using conventional notation as follows Subtracting the value of , ∀ from (5) will give From (6), we can obtain a new system by matrix ̅ =( � ij ) = ( , − ), where the right-hand sides of the system is 0, i.e. ̅ ⨂ = 0. This process is referred to normalization. Therefore, we can now say the systems is normalized. Suppose, This implies that normalization is equivalent to the multiplication of the system by the matrix from the left and the matrix can be obtained as follows Example 3.1. Consider the following system Thus, we obtain the following normalization Considering the first equation with ( 1 , 2 , 3 ) being a solution, then, it follows that 13 + 1 ≤ 0, 6 + 2 ≤ 0, 7 + 3 ≤ 0, Or 1 ≤ −13, It is necessary to have at least one of the inequalities in (14) satisfied with equality. Suppose only 1 is considered, then from (13), we have 2 3 , also, the second and third column maxima of 2 and 3 can as well be obtained respectively. From (15), it is obvious that for each equation, at least one of the inequalities must be satisfied with equality. Thus, if the problem has solution as ( 1 , 2 , 3 ), then it implies that for each row of the normalized matrix, there exists at least one column maximum [11,12,13]. Next, we define some notations as follows. Suppose

Case (a):
Considering the case when = , then, it follows implies that Therefore, if we have = ≠ , then we can deduce that ( , ) = ∅ , we will assume that ≠ ≠ .

Case (b): Suppose that
= for some ∈ ; then for any ∈ ( , ) we have = if ≠ , ∈ , which implies that we can remove the ℎ equation of the system. Thus, we let = for each column of where these columns and ≠ (if it exists) of the systems can be removed. Thus, without loss of generality, we can assume that is finite.

Case (c):
If b is finite with containing an row, then, we have ( , ) = ∅. Likewise, if contains an column, that is = for ∈ , setting in a solution x to be any value. Then, we can suppose that is doubly ℝ-astic without loss of generality.
The following corollary follows from Theorem 1 above and are very useful in this study.
Corollary 3.1 [16]. Let ∈ ℝ − be doublyℝ-astic with ∈ ℝ , then statement defined below are equivalent Note that Corollary (3.1) present the criteria for solving system of the form ⨂ = , while, corollary (3.2) define the criteria for presence of a unique solution in the ⨂ = . It follows from these corollaries, that unique solvability in addition to solvability of ⨂ = are equal to the minimal set covering and set covering respectively [16]. Now, considering the solution of matrix equation ⊗ = in general, we construct the theory of linear systems of equations for max plus, where is an n× n matrix, is an × 1 vector and is an n× 1 vector. Solving this system would involve looking at the solution of the equivalent system in arithmetic form. Suppose the arithmetic form is given as = , this system can be rewritten as the following detailed matrix equations where n n nn n n n n From (24) and (25), we have We let the finite part of with dimensions × to be 1, to be From the above discussing, we note that ⨂ = has a solution, then, we have +1 = = −∞ and ⊗ ′ = ′ , and thus ⨂ = has a solution if and only if ′ is a solution to ⊗ ′ = ′ . Therefore, the solution to ⨂ = is given as For a solution with infinite entries in , its solvability can therefore be reduced to the solution of a system with all entries of being finite. In this study would be restricted to the system ⨂ = with all entries of being finite. Suppose, there exist a solution to the system of max-plus equations, then To solve the solution of the system, each component of would be considered separately, for instance, we consider 1 . If the solution to the considered component of the system exists, then, 1 + 1 ≤ for = 1,2,3, … , thus 1 ≤ − 1 , ∀ , and this leads us to the upper bound on as follows: Suppose the (23) has a solution, then it satisfies Similarly, possible solutions for 1 , 2 , … , can be obtained as follows.
To simplify the procedures used to obtain the solution of a system of max-plus equation, we need to introduce another matrix known as the discrepancy matrix as follows.
Note that the matrix contains all the upper bounds of s, each can be obtained via the minimum of the ℎ column of . A similar matrix called the reduced discrepancy matrix is derived from as follows.
is highly needed when predicting the matrix equation ⨂ = number of solutions.

Theorem 3.2
Let ⨂ = be a matrix equation in ((ℝ ⊗,⊕) where A is × matrix, and is an × 1 vector with finite entries. Suppose there exist a zero in , then the matrix equation has no solution. However, assume there exist at least one in each row of , then, we say ′ is a solution ⨂ = .

Proof
Let zero be equal to row of by row , without loss of generality, assume to the contrary that ̅ is a solution of ⊗ = , then Hence ̅ does not satisfy the ℎ equation and thus, not a solution to ⨂ = . The prove is using the contrapositive, that is, assume ′ is not a solution to the given matrix equation. Then, by the above definition ′ ≤ − , ∀ , . Hence max ( + ) ≤ and if ′ is not a solution then there is a with max ( + ) ≤ . This is equivalent to < − , ∀ . Since ′ = min ( − 1 ) for some , which implies that there is no entry in row of that is 1. Now, we know that a solution to ⨂ = exists, and thus, need to define the concept of fixed entries in .

Definition 3.1
The 1's in a row of are variable fixing entries if (1) It is a lone row, or (2) It is said to be in a similar column as a lone one. The other 1's is referred to as slack entries.
To obtain a unique solution, then, every component of have to be fixed, that is, with no slack entries.

Corollary
Let is called max linear system of inequalities or can be referred to as one sided max linear system of inequalities. Numerous researchers have studied the systems of inequalities (33) [12,14,[17][18][19][20][21][22]. The result of the systems can be solved easier and would always produce a solution.
The following theorem can be considered when solving for the solution of the system.

Proof
The prove of this theorem follows from [12,14] ■

Example 3.2 (Max plus system with unique solution). Let
Calculating the discrepancy matrix will give = � � which gives the solution ′ = (0 , 0, 1) . ′ is verified to see that it is not solutions It can be noticed that the column matrix entry of b of (36) is not the same with column matrix entry of b. Nevertheless, a solution x must satisfy 1 ≤ 3, 2 ≤ 3 and 3 ≤ 1 because the components of ′ are the upper bounds. From the third row, it can be seen that A reduced discrepancy matrix is use to predict the number of solutions to the matrix equation ⨂ = .
The table below shows the various example and their  and where the minimum occurs in each column of has been underlined for each entry. Note that they are the 'ones' entries of each correspond .  Column in the matrix minimum entry is the system of inequalities for ′ maximum solution. To amend the system of equalities from this system of inequalities, an equality must exist in each row inequality. Therefore, for a solution to exist, there must be at least one minimum in each row of and . Also, in the ℎ column of , a one (1)    This fails to satisfy the condition that states "at least one minimum must be in each row of , therefore, for a solution to exist, at least a "1" must be in each row of . The above analysis work for × system of equation which can be used as model in solving problem in discrete event system such as job rotation or job scheduling which we considered in next section as application.

Synchronized Discrete Event System
Synchronized discrete event problem is a problem in which an event is scheduled to meet a deadline. There are two aspects of this problem: 1. The events run simultaneously 2. The completion of the lengthiest event has to compulsorily happen exactly at the deadline.
These are events that frequently occur through a very time-sensitive deadline. Examples for such events are the preparation of a plane for a set take off time, the preparation of an athlete before an Olympic Event, or the preparation of a shop before sales. This type of events can be applied to different field such as education [25][26][27], Applied Science [28,29].
In this section, we considered the max-plus algebra to job-shop problem in synchronized discrete event system as follows.
Six shops which are within the same market but are located at some meters from each other were studied. The six shops find out that customers start buying at 7:00 a.m. They all decided to open their shops for customers at exactly 7:00 a.m. Since the shops want to meet that deadline, the Sale Representatives (reps) for each product for each shop are to start restocking before the set time. This will enable the shops to serve their customers on time and other consumers to make more profit because of the competitions. The six shops A, B, C, D, E and F sell six different beverages products, Vigul milk(V), Peak milk(P), Coastal milk(C), Dano milk (D), Cowbell, milk (CB) and Three Crown milk (TC).
The shops work six days within the week, that is from Monday to Saturday. For the shops to avoid losses, each product has one Representative. The time available to the Sale representatives to restock the shops depend on when the shops are opened to them before the set time 8 a.m. The time available for reps and the time each rep spent on each product were taken on each of the 6 days for each of the six shops. The average time of the 6 days for each shop was taken. Suppose we only coordinate the events of a single deadline, then the latest start time can be obtained via the difference between the finish time and individual event duration times. If we are to take shop A for example, when the shop is opened to the reps for V, P, C, D, CB, and TC, the time each rep took was 20 min, 25 min, 30 min, 35 min, 30 min and 35 min respectively. Where they were to finish within 45 min. Obtaining the difference implies that the latest starting time for each event is 25 min, 20 min, 15 min,10 min,15 min and 10 min respectively. After considering the events of all the six shops, we will get a multiple deadline. When we consider the case where we have six shops, each shop will have different time available to the reps for their respective products. This will depend on the size of the shop, quantity of products available to the reps to restock, time the reps report at work, and also the time the shops are opened to the reps to start restock.
Below are the tables for shop A -F for various data taken for the respective shops in the first week (17 th Feb -22 th Feb, 2020).

88
On Application of Max-Plus Algebra to Synchronized Discrete Event System Table 3. Shop A   Day  V  P  C  D  CB  TC  Time available   MON  17  16  20  25  15  19  30   TUE  16  18  27  28  18  20  30   WED  25  17  25  22  23  25  30   THUR  33  25  30  33  27  37  40   FRI  40  46  40  37  30  35  50   SAT  35  35  20  32  35  35  40   TOTAL  166  155  172  177  148  171  220   Average  28  36  29  30  25 29 37    This solution failed because of the underlined entry. As ′ is not a strict solution to the system of equation, then, it will not cause any delay of the deadline of 7am. This shows that representative at shop B, C and E finished their work earlier than expected, when a candidate solution is not a strict to a system of equation, but will not cause delay of any of the deadline, it is referred to as a non-ideal solution.

Conclusion
In this paper, we present the discrepancy method of max-plus for solving an system of linear equations. The proposed method was further applied to real-life problem in a synchronized event. An interesting feature of the research is showing that an linear system of equations will have either a unique solution, an infinitely many solutions or no solution whiles linear system 92 On Application of Max-Plus Algebra to Synchronized Discrete Event System of equations has either an infinitely many solutions or no solution in (ℝ , ⨂ ⨁). More so, the application of the max-plus to real-life problem of job-shop problem has shown that the method can find wider applications in many other fields.