Abstract
Zero-one quadratic programming is a classical combinatorial optimization problem that has many real-world applications. However, it is well known that zero-one quadratic programming is non-deterministic polynomial-hard (NP-hard) in general. On one hand, the exact solution algorithms that can guarantee the global optimum are very time consuming. And on the other hand, the heuristic algorithms that generate the solution quickly can only provide local optimum. Due to this reason, identifying polynomially solvable subclasses of zero-one quadratic programming problems and their corresponding algorithms is a promising way to not only compromise these two sides but also offer theoretical insight into the complicated nature of the problem. By combining the basic algorithm and dynamic programming method, we propose an effective algorithm in this paper to solve the general linearly constrained zero-one quadratic programming problem with a k-diagonal matrix. In our algorithm, the value of k is changeable that covers different subclasses of the problem. The theoretical analysis and experimental results reveal that our proposed algorithm is reasonably effective and efficient. In addition, the placement of the phasor measurement units problem in the power system is adopted as an example to illustrate the potential real-world applications of this algorithm.
1. Introduction
Optimization problems normally fall into two categories, one for continuous variables and the other for discrete variables. The latter one is called combinatorial optimization, which is an active field in applied mathematics [1]. Common problems are the maximum flow problem, traveling salesman problem, matching problem, knapsack problem, etc. Among those famous combinatorial optimizations, zero-one quadratic programming (01QP), whose variables can only be either 0 or 1 [2], is very important and attracts a lot of attention.
Zero-one quadratic programming, which can be divided into constrained (01CQP) and unconstrained (01UQP), is a combinatorial optimization and has practical significance. For example, it can be applied in circuit design [3], pattern recognition [4], capital budgeting [5], portfolio optimization [6], etc. Except for these well known applications, 01QP also has potential applications in the nonlinear control related fields [7,8,9,10,11]. Among these applications, the phasor measurement unit (PMU) placement has been widely studied. Phasor measurement units can be used in dynamic monitoring, system protection, and system analysis and prediction. Therefore, the placement of PMU has become an important issue. As the scale of the electric grid grows, the PMU placement problem becomes more difficult and must be addressed considering certain requirements. In [12], a modified bisecting search combined with simulated annealing method was proposed, and the latter randomly selected arrays were used to test the observability of the system. Considering the incomplete observability of the system, a calculation method based on graph theory was proposed in [13]. This method is time-consuming, and with the increase of dimensions, the calculation load is too heavy. An integer linear programming method [14] and an improved algorithm [15] were put forward, considering system redundancy, and full and incomplete observability. Researchers in [16] proposed a binary programming method considering the joint placement of the conventional measurement units and phasor measurement units.
Zero-one quadratic programming also has some theoretical significance. Many classical problems, such as the max-cut problem [17,18] and max-bisection problem [19] can be converted to zero-one quadratic programming. Therefore, designing the algorithm that can solve 01QP effectively and efficiently is very meaningful not only in practical fields but also in theoretical fields.
However, zero-one quadratic programming is a well known NP-hard problem in general. The common solutions are exact solution and heuristic algorithms. Exact solution algorithms can guarantee the global optimum. In [20], the branch-and-bound method was used to solve zero-one quadratic programming problems without constraints. In [21,22], some exact solutions were proposed by means of geometric properties. Penalty parameters were introduced to solve zero-one quadratic programming problems with constraints in [23]. But exact solution algorithm are very time consuming and suitable for small scale problems only. Oppositely, heuristic algorithms, such as simulated annealing [24], genetic algorithms [25], neural networks [26], and ant colony algorithms [27], can solve the medium and large scale problems quickly in general. But most of them can only find the local optimum.
Therefore, identifying polynomially solvable subclasses of zero-one quadratic programming problems and their corresponding algorithms is a promising way to not only compromise these two sides but also offer theoretical insight into the complicated nature of the problem. In our past studies [28,29], the problem of five-diagonal matrix quadratic programming with linear constraints has been solved effectively. In [30], an algorithm for solving 01QP with a seven-diagonal matrix Q was presented. However, for these algorithms, the applicable problem is very specific. This narrows their applications. Then, we proposed an algorithm for the unconstrained problems with a k-diagonal matrix in [31]. In this paper, based on our previous results, we further propose an algorithm for the general linearly constrained zero-one quadratic programming problem with a k-diagonal matrix by combining the basic algorithm and dynamic programming method. For the algorithm we proposed, the value of k is changeable. That means the algorithm can cover different subclasses of the problem. The theoretical analysis and experimental results reveal that our proposed algorithm is reasonably effective and efficient. We also apply the algorithm to real-world applications and then verify its feasibility.
The main contributions of this paper are reflected in the following aspects: (1) The previous algorithm targeted a fixed k value in Q matrix. While the algorithm in this paper targeted a general problem with changeable k values. (2) We analyze the time complexity and give the proof process of the rationality of the algorithm. (3) We apply the algorithm to the phasor measurement units placement in real-world application.
This paper is organized as follows: in Section 2, we review the algorithm of solving unconstrained zero-one k-diagonal matrix quadratic programming. In Section 3, a constrained zero-one k-diagonal matrix quadratic programming algorithm with the proof of the algorithm is proposed. Application of zero-one quadratic programming in the phasor measurement units placement is put forward in Section 4. Experimental results and discussion are given in Section 5. We draw our conclusions and put forward the prospects in Section 6.
2. Basic Algorithm to 01UQP
The following Equation (1) shows the form of the k-diagonal matrix zero-one quadratic programming problem. The special point is the form of the matrix Q called the k-diagonal matrix, where .
where , indicates that it is a symmetric matrix. Note that all the numbers in this matrix are zero except and .
Based on past works [30,31], we can have the algorithm, as follows, to solve 01UQP. The feasibility and effect of the algorithm can be seen in [31]. Figure 1 shows the Algorithm 1 process intuitively.
| Algorithm 1 Process of solving 01UQP |
|
Figure 1.
Flow chart of the zero-one unconstrained quadratic programming (01UQP) algorithm.
3. Basic Algorithm to 01CQP
3.1. 01CQP Algorithm Description
Consider the constrained k-diagonal matrix zero-one quadratic programming problem:
where Q has the same meaning as that of the 01UQP formula in Section 2, , .
In this section, we utilize the dynamic programming method to solve the 01CQP problem. To apply the dynamic programming method, we introduce a state variable and a stage variable , which should satisfy the following iteration. can be expressed as:
We only need to consider the integer point of the state space since and . Since satisfies , we define a set .
Algorithms 2 and 3 show the detailed calculation process.
| Algorithm 2 Calculation Method of |
We will get a series of functions after executing Case 1.
We can see that there is only one function corresponding to each state when , and there are several to each state when . To save storage and computational time, should be selected satisfactorily in the next step. We need to find the optimal and , that the optimizing process refers to for Algorithm 3. |
| Algorithm 3 and |
|
According to the above algorithm, the maximum number of functions per is shown in Table 1. The primary time is spent generating the state table. The number of times that the core steps calculated is focused on the state number in Table 1. In total, we need to update the state table n times and the number of state is b, so the time complexity is .
Table 1.
Maximum number of functions per .
3.2. Analysis on the Effectiveness and Rationality of 01CQP Algorithm
In this section, we analyze the properties of the polynomial time algorithm for 01CQP. To analyze the algorithm, we need to demonstrate the rationality of Algorithms 2 and 3. Suppose has the form:
Step 1: Set
(1)
(2)
Clearly, when , each state has only one function . The coefficient of and the constants are the only different terms in the function.
Step 2: Set
(1) If , execute .
If , has the same form as function (3):
( represents the constant term of the .)
If , has the same form as function (4):
Then, can be shown as:
At this point, the maximum number of corresponding to each is .
(2) If , execute and .
Here, the is the same as the one in Case 1, so we do not need to repeat it.
Consider , , .
All are only different in the constant terms and the coefficient of .
Step 3:
Consider the most complex case, and the state variable corresponds to and respectively ( is the number of both). Therefore, we need to execute first, and then execute .
(1) :
Since has the form as function (8), the is executed for the respectively, and the following expression is obtained:
Clearly, these are only different in the constants and the coefficients of .
(2) :
It is possible to obtain , which has the following form:
For both case (1) and (2), they are only different in the constants and the coefficients of .
Step 4:
Based on Algorithm 2 Case 2, we calculate the function , and the core is the implementation of and . When executing and , the difference between the two is the constant and the coefficients of . Therefore, when executing , we only need to compare the constant terms. When executing , we only need to compare the sum of the constants and the coefficients of . In this way, we can avoid solving the excess .
The form of the function and the maximum number of in each stage k are similar to the one in stage , which also ensures the repeatability of the algorithm. The algorithm is supplemented by concrete examples and numerical simulations.
3.3. Calculation Example of 01CQP
For example, the parameters Q, c, a, and b are:
In this example, we will omit some of the states.
(1) Set , ,
We can set . According to Algorithm 2 Case 1, we can obtain Table 2.
Table 2.
Functions .
When , we can calculate and through Algorithm 2 Case (1a) for .
When , we can calculate and through Algorithm 2 Case (1b) for .
We omit , which is the same as .
(2) Set , ,
We can set . According to Algorithm 2 Case 2, we obtain the Table 3. The case of is omitted.
Table 3.
Functions .
(3) Set
According to Algorithm 2 Case 2 and Algorithm 3, we can gain with . Table 4 and Table 5 show part of the calculation process. From the table, we can see that only the coefficient of and constant terms are different in the adjacent items.
Table 4.
Functions .
Table 5.
Functions .
(4) Set
Finally, we have Table 6, which only has the constant terms. Through it, we can see that , , and by the backtracking method, we find the optimum solution .
Table 6.
Functions .
4. Application of Zero-One Quadratic Programming in Phasor Measurement Units Placement
How to find the installation location and the number of installations is the focus of the phasor measurement units placement problem. The matrix in the PMU placement problem differs from the previous k-diagonal matrix in the elements of the main diagonal. However, since x is either 0 or 1, we can convert it into a k-diagonal matrix. Then, we can take advantage of the algorithms designed above to work out PMU placement without considering too many constraints and realistic requirements.
4.1. Modelling
For the power system composed of n nodes, the placement of PMU is represented by n-dimensional vector . Here, ,
The matrix H represents the network graph structure,
and the objective function is
where is the weight. represents the upper bound of the maximum redundancy of each bus. and are diagonal arrays, representing the importance of each bus and the cost of placing the PMU on the bus respectively.
We expand Equation (11),
Then, Equation (12) can be expressed as integer quadratic programming as,
where , . is the column vector consisting of . and represent a set of nodes adjacent to the bus i and the bus set respectively. The above constraints require at least one PMU unit to be placed between the bus and its adjacent nodes to ensure that each adjacent node of the bus can be observed. The above problem can be expressed as unconstrained problems by the weighted least square method:
where .
4.2. Example and Experimental Result
Suppose the coefficient matrix H of a power system is
Set Q as the unit matrix, ,
Then, we can have
The main diagonal of the matrix for this problem is 1, while the definition of k-diagonal matrix Q requires the main diagonal elements to be zero. Since , the diagonal of G can be converted into a linear term and can be considered as a seven-diagonal matrix. This indicates that the diagonal of G becomes zero and f is updated as seen in Equation (15). Using the algorithm in Section 2, we can find the optimal solution without considering the constraints. This is to install four PMUs in bus 2, 3, 4, and 6. Through observation, it can be seen that the configuration results meet the system observability and the constraint is reached.
The above problem considers the placement of PMU under the condition that the system is completely observable. When considering the PMU placement problem with the principle, constraint conditions are added based on the definition of a single node observable. N is a set that includes the nodes required to have objectivity when a fault occurs in the system. and represents a node set connected to node i with two and one line respectively.
If the bus between nodes 5 and 6 breaks down, we set and as zero. Then, the constraint is added.
We can get the optimal solution is the same as that in the former example. As the connection between nodes 5 and 6 fails, the system after placing PMU will not lose its observability. We only consider the algorithm to solve the constrained k-diagonal zero-one matrix quadratic programming and consider that it can be applied to some form of PMU placement problems. Some of the conditions to the placement of PMU have not been taken into account here, which has yet to be studied by specialized engineers.
5. 01CQP Algorithm Simulation and Discussion
5.1. Algorithm Experimental Simulation
Now, the experimental results are provided for this algorithm to illustrate its performance. We implement the algorithm with C++ and run it on an Intel(R) Core(TM) i7-8550U CPU. For the problems we tested, the dimension of matrix Q ranges from 10 to 100 and k takes . All simulation data are generated randomly. is set up as in Section 2 with numbers ranging from to 100, and range between 0 and 20. Then, we obtain Table 7, which shows the detailed computation time for different dimensional problems with different diagonal numbers.
Table 7.
Corresponding computation time in different diagonal numbers with dimension n = 10 to 100 of 01CQP.
5.2. Experimental Results Discussion
Here, based on the experimental results, we investigate the influence of n and k on the algorithm and discuss the importance and implications of our study results. Firstly, we fix the values of k but increase n. Figure 2 shows the experimental situations when the matrix dimension n changes from 10 to 100 with k is fixed at 9, 13, 19 and 23 respectively. As can be seen, the calculation time increases slightly with the increase of dimension. Secondly, we fix the values of n but increase k. Figure 3 shows the experimental situations when k changes from 5 to 25 with n is fixed at 20, 40, 60 and 80 respectively. It can be observed clearly that time changes significantly with the increase of diagonal number. Finally, we increase n and k simultaneously. Figure 4 illustrates this situation. It is obvious that k has an obvious influence on the calculation speed. All these observations coincide with the time complexity we derived in Section 3. It means that if the diagonal number is within an appropriate range, our algorithm can perform effectively and efficiently even for very large scale problems. And these kind of problems cover a large portion of the whole problem set. Therefore, the algorithm we proposed will have great potential in many real-world applications.
Figure 2.
Calculation time with different dimensions when the diagonal number .
Figure 3.
Calculation time with different diagonal numbers when the dimension .
Figure 4.
The variation of calculation time with different dimensions n and diagonal number k.
6. Conclusions
In this paper, a novel exact algorithm to the general linearly constrained zero-one quadratic programming problem with k-diagonal matrix is proposed. The algorithm is designed by analyzing the property of matrix Q and then combining the famous basic algorithm and dynamic programming method. The complexity of the algorithm is analyzed and shows that it is polynomially solvable when m is fixed. The experimental results also illustrate the feasibility and efficiency of the algorithm. Designing efficient algorithm to this special class of problem not only provides useful information for designing efficient algorithms for other special classes but also can provide hints and facilitate the derivation of efficient relaxations for the general problems. And finally, the phasor measurement units placement problem is used to demonstrate that the algorithm has wide potential applications in decision-making real-life problems.
Author Contributions
S.G. put forward ideas and algorithms. S.G. and X.C simulated the results and wrote important parts of the article. X.C. formatted the whole paper, and summarized the results in tables. All authors have read and agreed to the published version of the manuscript.
Funding
The work described in the paper was supported by the National Science Foundation of China under Grants 61876105 and 61503233.
Conflicts of Interest
The authors declare no conflict of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| 01QP | Zero-One Quadratic Programming |
| 01UQP | Unconstrained Zero-One Quadratic Programming |
| 01CQP | Constrained Zero-One Quadratic Programming |
| PMU | Phasor Measurement Units |
| NP-hard | Non-deterministic polynomial-hard |
Variables
The following variables are used in this manuscript:
| Q | and only = are not zero |
| c | |
| a | |
| b | |
| n | Dimensions of matrix Q |
| m | and |
| k | |
| State variable , stage variable | |
| H | is a network graph structure |
| N | represents the upper bound of the maximum redundancy of each bus |
| R | is the importance of each bus |
| Q | in the application is the cost of placing the PMU on the bus |
| Column vector consisted of | |
| Bus set | |
| Weight | |
| Nodes adjacent to the bus i |
References
- Cook, W.J.; Cunningham, W.H.; Pulleyblank, W.R.; Schrijver, A. Combinatorial Optimization; Wiley-Interscience: Hoboken, NJ, USA, 1997. [Google Scholar]
- Hammer, P.L.; Rudeanu, S. Boolean Methods in Operations Research and Related Areas; Spring: Berlin/Heidelberg, Germany; New York, NY, USA, 1968. [Google Scholar]
- Chang, K.C.; Du, H.C. Efficient algorithms for layer assignment problem. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 1987, 6, 67–78. [Google Scholar] [CrossRef]
- Dehghan, A.; Mubarak, S. Binary quadratic programing for online tracking of hundreds of people in extremely crowded scenes. IEEE Trans. Pattern Anal. Mach. Intell. 2016, 40, 568–581. [Google Scholar] [CrossRef] [PubMed]
- Laughhunn, D.J. Quadratic binary programming with application to capital-budgeting problems. Oper. Res. 1970, 18, 454–461. [Google Scholar] [CrossRef]
- Kizys, R.; Juan, A.; Sawik, B.; Calvet, L. A biased-randomized iterated local search algorithm for rich portfolio optimization. Appl. Sci. 2019, 9, 3509. [Google Scholar] [CrossRef]
- Huang, L.; Zhang, Q.; Sun, L.; Sheng, Z. Robustness analysis of iterative learning control for a class of mobile robot systems with channel noise. IEEE Access 2019, 7, 34711–34718. [Google Scholar] [CrossRef]
- Manoli, G.; Rossi, M.; Pasetto, D.; Deiana, R.; Ferraris, S.; Cassiani, G.; Putti, M. An iterative particle filter approach for coupled hydro-geophysical inversion of a controlled infiltration experiment. J. Comput. Phys. 2015, 283, 37–51. [Google Scholar] [CrossRef]
- Mesbah, A. Stochastic model predictive control with active uncertainty learning: A Survey on dual control. Ann. Rev. Control 2018, 45, 107–117. [Google Scholar] [CrossRef]
- Imani, M.; Braga-Neto, U. Maximum-Likelihood adaptive filter for partially-observed boolean dynamical systems. IEEE Trans. Signal Process. 2017, 65, 359–371. [Google Scholar] [CrossRef]
- Imani, M.R.; Dougherty, E.; Braga-Neto, U. Boolean Kalman filter and smoother under model uncertainty. Automatica 2020, 111, 108609. [Google Scholar] [CrossRef]
- Baldwin, T.L.; Mili, L.; Boisen, M.B. Power system observability with minimal phasor measurement placement. IEEE Trans. Power Syst. 1993, 8, 707–715. [Google Scholar] [CrossRef]
- Nuqui, R.F.; Phadke, A.G. Phasor measurement unit placement techniques for complete and incomplete observability. IEEE Trans. Power Deliv. 2005, 20, 2381–2388. [Google Scholar] [CrossRef]
- Xu, B.; Abur, A. Observability analysis and measurement placement for system with PMUs. IEEE PES Power Syst. Conf. Expos. 2004, 2, 943–946. [Google Scholar]
- Gou, B. Generalized integer linear programming formulation for optimal PMU placement. IEEE Trans. Power Syst. 2008, 23, 1099–1104. [Google Scholar] [CrossRef]
- Kavasseri, R.; Srinivasan, S.K. Joint placement of phasor and power flow measurements for observability of power systems. IEEE Trans. Power Syst. 2011, 26, 1929–1936. [Google Scholar] [CrossRef]
- Poljak, S.; Rendl, F. Solving the max-cut problem using eigenvalues. Discret. Appl. Math. 1995, 62, 249–278. [Google Scholar] [CrossRef]
- Rendl, F.; Rinaldi, G.; Wiegele, A. Solving Max-Cut to optimality by intersecting semidefinite and polyhedral relaxations. Lect. Notes Comput. 2007, 4513, 295–309. [Google Scholar] [CrossRef]
- Ye, Y.A. 699-approximation algorithm for Max-Bisection. Math. Program. 2001, 90, 101–111. [Google Scholar] [CrossRef]
- Pardalos, P.M.; Rodgers, G.P. Computational aspects of a branch and bound algorithm for quadratic zero-one programming. Computing 1990, 45, 131–144. [Google Scholar] [CrossRef]
- Li, D.; Sun, X.L.; Liu, C.L. An exact solution method for unconstrained quadratic 0-1 programming: A geometric approach. J. Glob. Optim. 2012, 52, 797–829. [Google Scholar] [CrossRef]
- Gu, S.; Chen, X.Y.; Wang, L. Global optimization of binary quadratic programming: A neural network based algorithm and its FPGA Implementation. Neural Process. Lett. 2019, 1–20. [Google Scholar] [CrossRef]
- Zhu, W.X. Penalty parameter for linearly constrained 0-1 quadratic programming. J. Optim. Theory Appl. 2003, 116, 229–239. [Google Scholar] [CrossRef]
- Katayama, K.; Narihisa, H. Performance of simulated annealing-based heuristic for the unconstrained binary quadratic programming problem. Eur. J. Oper. Res. 2001, 134, 103–119. [Google Scholar] [CrossRef]
- Jiang, D.; Zhu, S. A method to solve nonintersection constraint 0-1 quadratic programming model. J. Southwest Jiaotong Univ. 1997, 32, 667–671. [Google Scholar]
- Ranjbar, M.; Effati, S.; Miri, S.M. An artificial neural network for solving quadratic zero-one programming problems. Neurocomputing 2017, 235, 192–198. [Google Scholar] [CrossRef]
- Ping, W.; Weiqing, X. Binary ant colony algorithm with controllable search bias for unconstrained binary quadratic problem. In Proceedings of the 2012 International Conference on Electronics, Communications and Control, Zhoushan, China, 16–18 October 2012. [Google Scholar]
- Gu, S.; Cui, R. Polynomial time solvable algorithm to linearly constrained binary quadratic programming problems with Q being a five-diagonal matrix. In Proceedings of the Fiveth International Conference on Intelligent Control and Information Processing, Dalian, China, 18–20 August 2014; pp. 366–372. [Google Scholar]
- Gu, S.; Cui, R.; Peng, J. Polynomial time solvable algorithms to a class of unconstrained and linearly constrained binary quadratic programming problems. Neurocomputing 2016, 198, 171–179. [Google Scholar] [CrossRef]
- Gu, S.; Peng, J.; Cui, R. A polynomial time solvable algorithm to binary quadratic programming problems with Q being a seven-diagonal matrix and its neural network implementation. In Proceedings of the ISNN 2014—Advances in Neural Networks, Macao, China, 28 November–1 December 2014; pp. 338–346. [Google Scholar]
- Gu, S.; Chen, X.Y. The basic algorithm for zero-one unconstrained quadratic programming problem with k-diagonal matrix. In Proceedings of the Twelfth International Conference on Advanced Computational Intelligence International, Dali, China, 14–16 March 2020. [Google Scholar]
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).