#### Abstract

The principal pivoting algorithm is a popular direct algorithm in solving the linear complementarity problem, and its block forms had also been studied by many authors. In this paper, relying on the characteristic of block principal pivotal transformations, a block principal pivoting algorithm is proposed for solving the linear complementarity problem with an -matrix. By this algorithm, the linear complementarity problem can be solved in some block principal pivotal transformations. Besides, both the lower-order and the higher-order experiments are presented to show the effectiveness of this algorithm.

#### 1. Introduction

For a given matrix and a given vector , the linear complementarity problem is to find a vector such thatwhere the superscript “T” denotes the transpose of a vector. This problem is usually abbreviated as and many problems can be converted into (1) under some conditions, such as the linear and quadratic programming problems, the free boundary problems of journal bearings, and Black-Scholes American option pricing problems (see [110] and the references therein).

To obtain the numerical solution of (1), many authors have presented all kinds of methods in recent decades. Some authors discussed the single principal pivoting algorithms based on the complementarity pivot idea (see [3, 1118]). In [3], the authors presented the principal pivoting algorithm for the case that the matrix was an -matrix, and the concrete matrices were the tridiagonal matrix and the block tridiagonal matrix, which were derived from the free boundary problems of journal bearings. This algorithm was a direct algorithm, and the principal pivoting procedure was carried out element by element in a cycle. So, there needs to be many cycles when the was solved in the end. There were some papers to discuss the block principal pivoting algorithms for (1), such as [1925]. In [20], the authors presented two block principal pivoting algorithms for the LCP and the BLCP, respectively, and the system matrix is the -matrix. About the two block principal pivoting algorithms, the authors gave many numerical experiments to show the effectiveness in [20]. The two block principal pivoting algorithms were designed for the general -matrix and there was a predetermined constant involved in the block principle pivoting algorithms, which was related to the number of the block principal pivotal transformations. Besides the direct algorithms introduced above, there are many iteration methods, in which the modulus-based matrix splitting iteration methods were studied by many authors recently, and a series of related methods had been presented gradually (see [1, 9, 2634] and the references therein). Other solving methods, such as the nonstationary extrapolated modulus algorithms, the projection type iteration methods, and the interior-point iteration methods, can refer to [2, 7, 3541] and the references therein.

The iteration methods are affected by many factors, for instance, the parameter matrix and the matrix splitting forms in the modulus-based matrix splitting related iteration methods and the parameter in the projection type iteration methods. The forms of the direct methods are very simple sometimes, and the solving processes are only determined by the matrix and the vector . Moreover, the solutions obtained by the direct methods are the exact solutions, which are different from the approximate solutions obtained by the iteration methods. In this paper, we further discuss the direct methods for the . We consider a particular linear complementarity problem that the system matrix is an -matrix. Utilizing the characteristic of the -matrix’s block principal pivotal transformation, that is, any block principal pivotal transformation of an -matrix can produce four particular submatrices, we provide a concrete block principal pivoting algorithm based on [3, 6, 7, 11, 20]. The numerical experiments show the effectiveness of this algorithm.

This paper is organized as follows. We introduce the block principal pivoting algorithm idea and present the concrete algorithm in Sections 2 and 3, respectively. Numerical experiments are shown and discussed in Section 4. Finally, we end this paper by the concluding remark in Section 5.

#### 2. Block Principal Pivoting Algorithm

We first briefly review some definitions and notations in the following. The matrix is denoted by if . A matrix is called a -matrix if . A matrix is called an -matrix if it is a -matrix and satisfies . The real vector is denoted by if holds for . All these definitions and notations can refer to [1, 3, 7, 28] and the references therein.

Lemma 1 (see [11]). If is a -matrix and satisfies conditions (1)   and (2)   in (1), then whenever .
For the LCP, since the condition with and are required, it is easy to establish the following conclusion from Lemma 1.

Lemma 2. If is a -matrix and is a solution of (1), then and whenever .
In [3], the authors introduced the two concepts, that is, the basic variable and the nonbasic variable based on (1), and give Table 1.

From the theory of , we know that if the problem is solved, there must exist an equivalent converted corresponding to the solution with , as shown in the form of Table 2, where the LCP() is obtained from the LCP() by the same computation transformations for both the rows and the columns of . The index set corresponds to both the nonbasic variable set of s and the basic variable set of s; meanwhile, the index set corresponds to both the basic variable set of s and the nonbasic variable set of s. Moreover, if the solution is unique, the solution of LCP() as well as the solution of LCP() can be constructed fromAt the same time, can be constructed fromSo, if the LCP() has a unique solution and the sets and are obtained, it can be solved easily from (2) and (3). It is well known that LCP() with an -matrix has a unique solution for any (see [1, 3, 28]); thus the main task is to find the above two sets. Besides, we remark here that Table 2 is only a representation form for the sake of later discussion, which has other representation forms, where and are exchanged, and both and are difference from Table 2 and it is enough to note the index set in the solving process of the LCP().

Problem LCP(, ) is equivalent to the original LCP(). Of course, both the equivalent LCP(, ) and the above corresponding table are not unique and even the original LCP() has a unique solution. Moreover, if we obtain Table 2, from the first two columns and the first row of which, we can construct the solution with of the LCP().

From Lemma 2, we know that if , then . However, if or , we need to judge whether . For an -matrix with order , if we set and set a nonempty set with , then through the block principal pivotal transformation, we can obtain a matrixwhereandis Schur complement matrix of , which is a lower-order -matrix. From (5) and (6), combining with the characteristic of the linear complementarity problem, a block principal pivoting algorithm can be presented to search for the set and solve the LCP(). The basic idea of this algorithm is that we set a small according to the original and then amplify by adding the new indices until the size of keeps unchanged; thus we construct the solution of the LCP() by (2). We show the concrete solving process of block principal pivoting algorithm in the following paragraph.

We denote the negative entry index set of by with and , the other entry index set by , where and denotes the empty set. Then from Lemma 2 we set and carry out the block principal pivotal transformation to the submatrix of , and then we have andThe equation in (7) is an established complementarity problem and the system matrix is still an -matrix with lower-order than the matrix from (6). Then we can select the negative entry index set of the constant vector in the right side of and add it to . At the same time, according to the negative entry index set, we carry out the block principal pivotal transformation to the lower-order complementarity problem (7). These processes can be continued until the constant vector in the last lower-order complementarity problem has no negative element and then keeps unchanged. Once the last is obtained, then we can apply (2) to construct the unique solution of (1).

About the above block principal pivoting algorithm, we have the following discussions.

(1) At the beginning of block principal pivoting algorithm, the solution can be obtained easily if or , that is, and , respectively.

(2) The block principal pivoting algorithm can be divided into two parts: the searching process of and the constructing process of .

(3) The orders of the linear complementarity problems in the block principal pivoting algorithm are decreasing gradually, and the total number of the block principal pivotal transformations is no more than when the LCP() is solved.

#### 3. Algorithm

In this section, based on the discussion in the above section, we present the pseudocodes of the block principal pivoting algorithm as Algorithm 1.

#### 4. Numerical Experiment

In this section, we present three examples. In the first example, we illustrate the solving process of the block principal pivoting algorithm by two lower-order cases. In the second example, we apply the block principal pivoting algorithm to deal with a practical problem, that is, the free boundary value problem about the flow of water through a porous dam, which is a higher-order case. In the third example, we mainly investigate the relationship between the running time and the number of the block principal pivotal transformations in the block principal pivoting algorithm.

Example 1. We set the system matrix in the LCP() to be and consider the variable to be two cases: Thus, the matrix is an -matrix and the LCP() and the LCP() have the same and the original negative element index set which corresponds to the the nonbasic variable set of s and the basic variable set of . Applying the block principal pivoting algorithm to the LCP() and the LCP(), respectively, then we have the last negative element index sets and the solutions are and respectively. Besides, the numbers of the block principal pivoting transformations for the LCP() and the LCP() are 1 and 2, respectively.

Example 2. In this example, we consider the higher-order case and set in the LCP() to be a block tridiagonal -matrix, that is, , whereand is an identity matrix of order . We set with and perform five experiments for , respectively. This problem arises from the finite difference discretization on equidistant grid of a free boundary value problem about the flow of water through a porous dam (see [26] and the references therein). We consider three quantities, that is, the running time (CPU), the number of block principal pivotal transformations (NUM), and the error of the residual vector (ERROR). ERROR is defined as where both “norm” and “min” are the functions in Matlab software (see [1, 26]). Then the numerical results are shown in Table 3.

From Table 3, we can find that the block principal pivoting algorithm is effective and the number of the block principal pivotal transformations is very small in this example. Besides, the precision of the solution is very high and the running time will be increased when the model’s size is enlarged.

Example 3. In this example, we consider the relationship between the running time and the number of block principal pivotal transformations. Set the system matrix to be a tridiagonal -matrix, that is, and set to be an arbitrary vector, that is, , and carry out 10 experiments; then we obtain Table 4.

From Table 4, we can observe that when the number of block principal pivotal transformations is larger, the running time usually increases slightly. However, the relationship between the number of block principal pivotal transformations and the running time is not entirely consistent, which can be found from , and . In addition, although the precision of the solution decreases slightly compared with Example 2 with the increasing number of block principal pivotal transformations, we can see that the precision is still very high.

At the end of this section, we remark that since the LCP is equivalent to the linear complementarity problemwhich is denoted by LCP() here, if is an -matrix ( is called an inverse -matrix), then the original LCP can be solved through solving the LCP() by the block principal pivoting algorithm. In addition, besides the free boundary value problem about the flow of water through a porous dam mentioned in Example 2, there are other two applications where the block principal pivoting algorithm can be utilized: one is Black-Scholes American option pricing problem and the other is the free boundary problem of journal bearings. The discretized approximation models of the two problems are the LCP()s with -matrices and the details can be found in [8, 9] and [3], respectively.

#### 5. Concluding Remark

In this paper, we provide a block principal pivoting algorithm for solving the LCP with an -matrix. By this algorithm, the LCP can be solved in the limited block principal pivotal transformations. The numerical experiments show that this algorithm is effective in practical applications and the numerical solutions possess very high precision.

#### Data Availability

No data were used to support the study in this paper.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Acknowledgments

The first author Fang’s work has been supported by the starting funds of research program (no. 611-612279), Zhaoqing University, China. The author Qiao’s work is partially supported by the President’s Endowed Professorship Program of the University of Texas System. The author Zhao’s work is supported by the Chongqing Research Program of Basic Research and Frontier Technology (no. cstc2016jcyjA0554). The authors are also thankful to Prof. Xiao-Dong Fan for his fruitful discussions.