Abstract

The goal of this paper is to propose a dual version of the direct cosine simplex algorithm (DDCA) for general linear problems. The proposed method has not artificial variables, so it is different from both the two-phase method and big-M method. Our technique solves the dual Klee–Minty problem via two iterations and solves the dual Clausen problem via four iterations. The power of the proposed algorithm is evident from the extensive experimental results on benchmark problems adapted from NETLIB. Preliminary results indicate that this dual direct cosine simplex algorithm (DDCA) reduces the number of iterations of the two-phase method.

1. Introduction

Linear programming plays an important role in the optimization theory. Many real-world problems can be formulated as linear or nonlinear mathematical models. The simplex method is the common tool for solving linear programs. It is an iterative method that was developed by Dantzig [13].

There are many pivot rules for the simplex-type algorithm such as the exterior point simplex algorithm [46], primal-dual exterior point algorithm [7], and max-out-in pivot rule [8]. It is known that the application of the simplex algorithm requires at least one basic feasible solution. On the other hand, the common techniques that are used for determining an initial feasible basis are the two-phase and big-M methods. The main drawback of these techniques lies in requiring the introduction of artificial variables and increasing the dimension of the problem. Corley et al. [9] introduced the cosine simplex algorithm for solving linear programs. Yeh and Corley [10] proposed a simple direct cosine simplex algorithm (DCA) which solves the Klee–Minty Problem [11] via two iterations. They deduced that their algorithm reduced the number of iterations of simplex in most cases in their experimental results. Li and Li [12] explained the relationship between the cosine pivot rule and the most-obtuse-angle pivot rule, proposed by Pan [13]. In this paper, we propose a dual version of a simple direct cosine simplex algorithm (DDCA) which solves the dual Klee–Minty class of problems via two iterations while the two-phase method solves this class in n+1 iterations where n is the size of the problem. Our technique also solves Clausen class of problems via four iterations, but the two-phase method solves this class in 2n-1 iterations where n is the size of the problem. Our technique does not require the introduction of artificial variables.

The rest of the paper is organized as follows. Section 2 describes the proposed DDCA algorithm and its characteristics. Benchmark problems “Klee–Minty and Clausen problems” are presented in Section 3. In Section 4, we introduce illustrations of the proposed method with two examples. Computational experiments are proposed in Section 5. Finally, conclusions and future work are proposed in Section 6.

2. Dual Cosine Simplex Algorithm (DDCA)

We consider the linear programming (LP) problem in standard form:

, where A is an matrix, x and c are n-dimensional vectors, and T denotes transposition. The dual of (P) is the problem.

,where y is an m-dimensional vector.

For constraint i of (D), define as the cosine of angle between the constraints i and the objective function where bi < 0 and N is the index set of the nonbasic variables (Algorithm1).

Require: infeasible basis
While b i < 0
Step 1 (dual feasibility condition): let N is the index set of the nonbasic variables. The leaving variable, xi, is the basic variable having the maximum for minimization problem, where is the angle between the constraint i and the objective function. The tie is broken by choosing the most negative value in the right hand side.
Step 2 (dual optimality condition): given that xi is the leaving variable, the entering variable is the nonbasic variable aij < 0 that corresponds to The ties are broken arbitrary. If for all nonbasic variables, then the problem has no feasible solution.
Step 3: apply a pivoting
End while
The current basis is feasible
Apply the simplex algorithm.

Remark 1. There is no proof for the correctness of the above cosine criteria. Hence, it is not true for ever.

3. Benchmark Problems

In this section, we present two well-known classes of linear programming problems, Klee–Minty class of problems [11] is the first problem and the other is Clausen class of problems [14] as illustrated in the following models:

Klee and Minty [11, 14] proved that the simplex algorithm is an exponential algorithm in 1972 (for the worst case). An interesting result is that the dual simplex method solves the Klee–Minty problem in a polynomial number of iterations. Another challenging exponential example is shown in [14]. The advantage of Clausen’s example [14] is that the dual simplex is exponential on the dual problem, whereas the primal simplex method is exponential on the primal problem.

The following examples show the superiority of our technique over the two-phase method. Example 1 shows that the two-phase method requires 6 tableaus while our technique requires 3 iterations only, without including the initial one.

4. Illustrative Examples

Example 1. Consider the following Random Linear Programming Problem:The variables x3 and x6 are slack variables, but the variables x4 and x5 are the surplus variables for the corresponding constraints. We calculate for every i = 2, 3 (in the first iteration) as follows:The value of is bigger than the value of . Therefore, the variable x4 is the leaving variable. From STEP 2, the entering variable is calculated as follows.
, and therefore, the element x1 is the entering variable. We can construct a new simplex table by the pivoting operations (i.e., Step 3) as shown in Iteration 1 in Table 1. We repeat all above operations until all coefficients in Row 0 are nonpositive in Iteration 3, and x3 = 0, x4 = 2/5, x5 = 9/5, and x6 = 1 are optimal with z = 17/5 in the original problem.
Furthermore, the two-phase method requires 6 iterations, as shown in Table 2, without including the initial one.

Example 2. Dual Klee–Minty problem.
Consider the following dual Klee–Minty problem of size n = 3:The variables x4, x5, and x6 are the surplus variables for the corresponding constraints. We calculate the corresponding in the Iteration 0 for every i = 1, 2, 3 as follows:The value of is bigger than the values of and . We choose x6 as the leaving variable. The entering variable is calculated as follows (STEP 2):Therefore, the element x3 is the entering variable. We can construct a new simplex table by the pivoting operations (i.e., STEP 3) as shown in Iteration 1 in Table 3. We repeat all above operations until all coefficients in Row 0 are nonpositive in Iteration 3, and x1 = 1 and x2 = x3 = 0 are optimal with z = 104 in the original problem.
On the other hand, the two-phase method requires 5 iterations, as shown in Table 4, without including the initial one.

5. Computational Experiments

In this section, we present the computational results of the dual cosine simplex algorithm (DDCA) and two-phase method for dual Klee–Minty and dual Clausen classes of problems. We compare the number of iterations of the dual cosine simplex algorithm (DDCA) with the two-phase method. We used different tolerances to reduce the number of iterations for each benchmark problem. We used the two-phase method [3, 1518] to evaluate the effectiveness of the proposed method. On the other hand, the two-phase method was used for the problems contain “” constraints and/or equality constraints.

The programming language used was MATLAB v7.01 SP2 with default options. All codes were run under 64-bit Window 8.1 Operating System having Core (TM)i5 CPU M 460 @2.53 GHz, 4.00 GB of memory.

It is clear that the basic difference between the dual cosine simplex method (DCSM) and the two-phase method  is that our technique does not involve artificial variables. From Table 5, the contribution of the proposed algorithm is to solve the Klee–Minty problem and Clausen problem with 2 and 4 iterations, respectively. On the other hand, the simplex method with two-phase method spends O(n) iterations for these problems.

Table 6 characterizes 33 NETLIB test problems [19] were used in comparison to evaluate the effectiveness of the proposed methods. For simplicity, we converted the bounded variables and free variables into constraints. The accuracy rates of the solution obtained from the proposed algorithms were tested by LINGO software.

Table 6 contains 6 categories of the problems according to the range of variable numbers as shown in Table 7.

Table 6 contains the largest nonzero number, density, number of variables (after transferring sign constraints), number of constraints (after transferring sign constraints), “” constraint number, “” constraint number, and “=” constraint number.

In general, from Table 8, the contribution of the proposed algorithm is that DDCA is generally better than the two-phase method (22 problems vs. 11 problems). The details of our results are as follows:(a)Six problems with the variable numbers 30–99: DDCA is better than the two-phase method (5 problems vs. one problem)(b)Fifteen problems with the variable numbers 100–500: DDCA is better than the two-phase method (10 problems vs. 5 problems)(c)Five problems with the variable numbers 501–999: DDCA is better than the two-phase method (4 problems vs. one problem)(d)Four problems with the variable numbers 1000–1500: DDCA and two-phase methods are equal (2 problems vs. 2 problems)(e)Two problems with the variable numbers 1501–1999: the two-phase method is better than DDCA (0 problems vs. 2 problems)(f)One problem with the variable numbers over 2000: the two-phase method is better than DDCA (0 problems vs. 1 problem)

6. Conclusions

We proposed a dual version of the direct cosine simplex algorithm (DDCA) for general linear problems. The proposed method has not artificial variables, so it is different from both the two-phase method and big-M method. Our technique solved the dual Klee–Minty problem via two iterations and solved the dual Clausen problem via four iterations. The power of the proposed algorithm is evident from the extensive experimental results on benchmark problems adapted from NETLIB. Preliminary results indicate that this dual direct cosine simplex algorithm (DDCA) reduces the number of iterations of the two-phase method. In future work, we can improve this work by using different algorithms [2024] with other combinations between them.

Data Availability

All data and methods generated or used during the study are available within the article.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

The authors extend their appreciation to the Deanship of Scientific Research at Majmaah University for funding this work under the project number RGP-2019-29.