LU-Decomposition Computerized Method to Solve Linear Programming Problems

The purpose of this work is to solve Linear Programming (LP) problems using LU factorization. LU method is based on the fact that a square matrix can be factorized into the product of unit lower triangular matrix (L) and upper triangular matrix (U), and the direct solution was obtained without iterations. Three different problem cases were considered and solved using step-by-step calculations as well as using MATLAB. Results show this method is superior than the traditional simplex method with cases of cycling. Citation: Abdulraheem MZ, Mohammad K (2018) LU-Decomposition Computerized Method to Solve Linear Programming Problems. J Appl Computat Math 7: 391. doi: 10.4172/2168-9679.1000391


Introduction
In mathematical optimization, Danzig's simplex method (or simplex algorithm) is popular for linear programming (LP) [1]. LP is a technique for solving a large number of maximization/minimization problems that have the property that the constraints and the objective function are all linear functions of the input variables [2]. It's widely utilized optimization method for solving real-life problems because of its efficacy. LU-decomposition (where 'LU' stands for 'lower upper', and also called LU factorization) factors a matrix as the product of a lower triangular matrix (L) and an upper triangular matrix (U) was introduced by mathematician Alan Turing in 1948 [3,4]. LUdecomposition is basically a modified form of Gaussian elimination. LU decomposition is an effective procedure for solving LP problems, this method can help in accelerating the computation. Over and above, the development of computers and software packages has made LU decomposition easy and attractive method to solve large-scale LP problems very quickly. The simplex algorithm can do the job well, but in some scenarios it suffers from what is called iteration cycling [5,6]. Cycling is defined as "The phenomenon in which the same sequence of basic feasible solutions is generated repeatedly (indefinitely) by the simplex method [7][8][9]. In this paper, we use the LU-decomposition method to solve this issue. In this method, the objective function is considered as a constraint which together with linear inequalities forms a system of linear inequalities. Through applying LU-decomposition method, we get the exact solution without iterations. For the current LP problem, three cases were discussed and explained through solving numerical examples by LU-decomposition later on in this paper.

LU-decomposition
The LU-decomposition method first "decomposes" matrix A into A=L.U. More accurately, if A is an n×n matrix, L and U are also n×n matrices with forms like the following: For the system of equations Ax=b. The motivation for LU-decomposition is based on the observation that systems of equations involving triangular coefficient matrices are easier to deal with [7]. Definition of LU -factorization: If the n×n matrix can be written as the product of a lower triangular matrix L and an upper triangular matrix U, then A=LU is an LU-factorization of A.

Linear programing problem
Linear Equations (LEs): By definition, all equations and inequalities in a LP must be linear: A linear equation in n variables x 1 ,x 2 ,x 3 ,··· ,x n has the form : Where: The coefficients (a's) are real numbers. The (x's) are called the variables of the equation. Linear equations and inequalities are often written using summation notation, which makes it possible to write an equation in a much more compact form. The linear equation above, for example, can be written as follows:  (2) where i=1,2,3...n is a counter. The Decision Variables (DVs): The variables in a LP are a set of quantities that need to be determined in order to solve the problem. The variables are sometimes called DVs because the problem is to decide what value each variable should take. Typically, the variables represent the amount of a resource to use or the level of some activity. Frequently, defining the variables of the problem is one of the hardest and/or most crucial steps in formulating a problem as a linear program. The variables will be represented-very abstractly -as: The Objective Function: The objective of a LP problem will be to maximize or to minimize some numerical value. The objective function indicates how each variable contributes to the value to be optimized in solving the problem. The objective function takes the following general form: Maximize or Minimize: Where: c i is the objective function coefficient corresponding to the i th variable, and x i is the i th decision variable. The Constraints: Constraints are the possible values that the variables of a LP problem may take. They typically represent resource constraints, or the minimum or maximum level of some activity or condition. They take the following general form: Subject to: The Non-negativity Constraints: The variables of LP must always take non-negative values (they must be greater than or equal to zero). The non-negativity constraints are part of all LP formulations, and always included in an LP formulation. They are written as follows:

LP problem-standard form
An LP problem is in standard form if it seeks to maximize the objective function subject to the constraints: Subject to the constraints: Where x i ≥ 0, and b i ≥ 0.

Methods
Consider the following LP problem: The objective is to Maximize Subject to: To find Z, we will rewrite the above LP problem in the form of less than or equal (≤) inequalities as follows: Consider the system of n linear equations in variables: AX=B, such that: a a a n a a a n A a a a n In this way, the objective function is considered as a constraint and z is considered as a variable.
When we obtained an LU -decomposition of a matrix A, we can solve the system of n linear equations in n variables AX=B very effectively in the following two steps: i.
Forward substitution: Write Y=UX and solve LY=B for Y, it starts at the top of the matrix, because L is lower triangular matrix. ii.
Back substitution: Solving UX =Y for X, the matrix U is upper triangular The column matrix X is the solution of the originated system because: AX=LUX=LY=B .

Numerical Examples Explanation
For the current LP problem in this paper, three cases were considered.
Case One: The number of inequalities is equal to the number of variables.
Case Two: The number of inequalities is less than the number of variables.
Case Three: The number of variables is less than the number of inequalities.
If there is a zero row in U, then the presented LP problem has an infeasible solution, thus, the process can be stopped.
Case One: In this case LU factorization is applied to the system of linear equations: AX=B. Firstly, we get the matrix as an initial iteration and then the matrix as final iteration. Maximize: Z=x 1+ 2x 2 −x 3 Subject Finally, we will find the matrix to solve UX+Y by back substitution: On simplification we get Case Two: Add the inequalities in the system till number of inequalities equals the number of variables. We can add the inequalities in the system as below: Consider the first constraint in given linear programming problem.
Choose the non-zero coefficient in this inequality a 2j 6= 0 and add the inequality: a 21 x j ≤ b 2 in the system, continuing in this way till number of inequalities reaches to the number of variables.

Subject to
x 1+ x 2 ≤ 1 The system of linear inequalities is: In this case On simplification we get: Finally, we will find the matrix to the constraints: To solve this case by LU Factorization Method, we will write the LP Problem as follows: The coefficients We need to find L and U such that: A=LU, where: Now we have to use this to find the entries in L and U, by running along the top row to see that: The two matrices are equal, on simplification we get: Following the proposed methodology, we get the following solution: x 1 =3,x 2 =12, and Z=33, solution using MATLAB will be provided in the later on.

Computerized Solution of Lu Factorization
To test the efficiency of the proposed approach i.e. LU Factorization, MATLAB 2014 was used. MATLAB has a set of useful functions for linear programming such as 'Linprog' function. However we will be following a similar approach to the proposed methodology. A small difference exists in the final steps as presented below. To demonstrate the approach Case 1 will be used. The matrix of coefficients 0 A 0 and the right hand side of the system 0 b 0 are inputted. Then the function 0 lu 0 will be utilized. This function creates the lower and upper matrices. Final two steps include using the back slash of MATLAB which applied matrix left division to find the value of matricesY and X, respectively. The final solution i.e. Z value can be found from the X matrix. It should be noticed in MATLAB the A matrix can be a rectangular matrix i.e. with a dimension of m rows and n columns. Numerically, it is shown that non-square matrices don't limit the applicability of this method.

A Case with Cycling
As mentioned earlier in the introduction, Cycling is one of the main limitations in Simplex. The authors are aware that his problem is addressed by many researchers. In this section one example from the work of Zornig will be solved using the proposed LU-decomposition methodology. This particular problem cycles every 4 iterations to its initial form.
Maximize: This result is obtained without iterations, and the optimal solution is reached directly.

Conclusion
Comparing to the complex algorithm, LU factorization method has simple and lesser computations. LU factorization method becomes very mechanistic after practice and the algorithm used is very compact. Moreover, cycling is not an issue for LU Decomposition. LU method is as more efficient than the simplex algorithm. Support these results. Remarkably, LU is an effective method in practice, particularly when the scale of the problem is small. In LU factorization method, the slack variables only if the number of variables is less than the number of inequalities, this not shown to be a problem when using MATLAB.
One limitation of this approach is that there are scenarios the LU factorization did not work properly. In such cases, a new row is added with one of the following constraints: x i ≥ 0 until the solution provides all decision variables are non-negative.