2. New Results on Closed-form Formulas
We first introduce some notations. For
m<n, define
(m, n) to be the number of combinations of
m elements out of
n, and let
, and
. Furthermore, Lemma 1 and Lemma 2, presented below, help to prove the results. Note that, Lemma 1 is direct deduction from previous results [
12].
Lemma 1. Given a locally optimal solution
with respect to a 1-flip search, we have:
Proof. Condition of local optimality in (5) indicates that:
Using this condition, we thus have:
Lemma 2. Let
be any solution of the problem; then, we have:
Proof. For each pair of elements, , the left-hand-side can be or. Since |S|=r, the summation on the left-hand-side is at most equal to M.
Theorem 1: Let
and M be as defined above and let
be a locally optimal solution of
with respect to a 1-flip search. A subset
, with |S|=r, is an improving r-flip move if and only if we have:
Proof: Using (7), a subset
of r elements is an improving r-flip move if and only if we have:
Since
x is a locally optimal solution with respect to a 1-flip search, it follows from Lemma 1 that inequality (14) is equivalent to (15); that completes the proof.
Proposition 1: Let and M be as defined above and let be any locally optimal solution of the problem with respect to a 1-flip search. If a subset , with |S|=r, is an improving r-flip move, then we must have: .
Proof: Since
x is a locally optimal solution with respect to a 1-flip search and
S is an improving
r-flip move, by Theorem 1, we have:
Using Lemma 2; we also have (16); which completes the proof.
The consequence of Theorem 1 is as follows. Given a locally optimal solution x with respect to a 1-flip search, if there is no subset of S with |S|=r that satisfies (13), then x is also locally optimal solution with respect to an r-flip search. Furthermore, if there is no subset S of any size that (13) is satisfied, then x is also locally optimal solution with respect to an r-flip search for all . Similar statements are also true regarding Proposition 1.
The result of Proposition1 is significant in the implementation of an r-flip search. It illustrates that, after having a 1-flip search implemented, if an r-flip search is next served as a locally optimal solution, only those elements with the sum of absolute value of derivatives less than M are eligible for consideration. Furthermore, when deciding about the elements of an r-flip search, we can easily check to see if any element by itself or with a combination of other elements is eligible to be a member of an improving r-flip move S. Example 1 below illustrates this situation.
Example 1. Consider an
problem with
n variables. Let
be a given locally optimal solution with respect to a 1-flip search. Consider
S={i,j,k,l} for a possible 4-flip move. In order to have
S for an improving move, all 15 inequalities, given below in (17), must be satisfied. Of course, if the last inequality in (17) is satisfied, all other inequalities are also satisfied. This means each subset of the
S is also an improving move. This is important in any dynamic neighborhood search strategies
k-flip moves for
in consideration.
Obviously, choosing the appropriate subset S to implement a move is critical. There are many ways to check for an improving subset S. Below, we explain two such strategies. In addition, a numerical example is given in the Appendix.
2.1. Strategy 1
We first define a set,
D(n), of candidate for improving moves. Given a locally optimal solution
x with respect to a 1-flip move, let the elements of
x be ordered in ascending absolute value of derivatives, as given in (18).
Here,
means the
i-th element of
x in the order
. Let
K be the largest value of
k=1,2,…,n where the inequality (19) is satisfied. The set
D(n) is now defined by (20).
Lemma 3. Any subset satisfies the necessary condition for an improving move.
Proof. It follows from Proposition 1.
There are some advantages to having elements of x in an ascending order, i.e., inequalities (18):
the smaller the value of is, the more likely that is involved in an improving k-flip move for k<=r (this might be due to the fact that, the right-hand-side value M in (19) for given r is constant. Thus, smaller values of on the left-hand-side might help to satisfy the inequality easier.)
because the elements of
D(n) are in an ascending order of absolute values of derivatives, a straightforward implementable series of alternatives to be considered for improving subsets,
S, may be the elements of the set given in (21). Note that there are a lot more subsets of
D(n) compared to the sets in (21) that are the candidates for consideration in possible
k-flip moves. Here we only gave one possible efficient implementable strategy.
It is important to note that, if Proposition 1 is used in the process of implementing an algorithm, given a locally optimal solution x with respect to a 1-flip search, after an r-flip implementation for a subset |S|=r with r>1, the locally optimal solution with respect to a 1-flip search for the new solution, x’, can be destroyed. Thus, if an r-flip search needed to be continued, a 1-flip search might be necessary on solution x’ before a new r-flip move can continue. However, there are many practical situations where this problem may be avoided for many subsets, especially when the problem is very-large-scale, i.e., the value of n is large, and/or Q is sparse. Proposition 2 is a weaker condition of Proposition 1 that can help to overcome up to some point in the aforementioned problem.
In the proof of Theorem 1 and Proposition 1, we only used a condition of optimality for a 1-flip search satisfied for the members of the subset S. We now define a condition as follows and call it ‘condition of optimality with respect to a 1-flip search for a set S’, or simply ‘condition of optimality for S’.
Given a solution
x, the
condition of optimality for any subset
is satisfied if and only if we have:
Of course, if we have N in (22) instead of S, x is a locally optimal solution as was defined in Fact 1.
For m<n, let (m, n) be the number of combinations of m elements out of n elements, and , and . With these definitions now we state Proposition 2.
Proposition 2 (weak necessary condition): Let , |S|=r, and , and as defined above. Given any solution of , and assume the condition of optimality is satisfied for a subset S. If S is an r-flip improving move, we must have .
Proof: Similar to proof of Proposition 1.
Notice that the values of and in Proposition 2 depend on S; however, these values can be updated efficiently as the search progresses. As explained above, in situations where the problem is very-large-scale and/or Q is sparce, for many variables, the values of derivatives are ‘unaffected’ by the change of values of elements in S. This means a large set of variables still satisfies the condition of optimality, and thus the search can continue without applying a 1-flip search each time before finding a new set S for r-flip implementation.
2.2. Strategy 2
Another efficient and easily implementable strategy is when instead of (19), we only use an individual element to create a set of candidates for applying an
r-flip search, set
D(1) as defined below. Corollary 1 is a special case of Proposition 1 that suffices such a strategy.
Corollary 1: Let and M be as defined before, given a solution of , if the 1-flip local search cannot further improve the value of f(x), and with where an r-flip move of elements of S improves f(x), then we must have .
To gain insight into the use of Corollary 1, we did some experimentation to find the size of the set
D(1) for different sizes of instances. The steps of the experiment to find the size of
D(1) are given below. Problems considered are taken from literature [
27], and used by many researchers. We only used the larger-scale problems with 2500 to 6000 variables, a total of 38 instances.
Find_D(): Procedure for finding the size of the set D(1):
Step 1. Randomly initialize a solution to the problem. For each value of r calculate M. Apply the algorithm in
Figure 1 and generate a locally optimal solution x with respect to a 1-flip search. However, in Step 5 of
Figure 1 only consider those derivatives with
Step 2. Find the number of elements in the set D(1) for x.
Step 3. Repeat Step 1 and 2, 200 times for each problem, and find the average number of elements in the set D(1) for the same size problem, density, and r value.
The results of the experiment are shown in
Table 1. From
Table 1, in general we can say that as the density of matrix
Q increases, the size of
D(1) decreases for all problem sizes and values of
r. This is, of course, due to the fact that the larger density of
Q makes the derivative of each element in an
x more related to other elements. As the size of a problem increases, the size of
D(1) also increases.
An interesting observation in our experiment was that, in most cases, the size of D(1) for better locally optimal solutions were smaller than those with the worse locally optimal solutions. This indicates that as the search reaches closer to the globally optimal solutions, the time for an r-flip search decreases when we take advantage of Corollary 1.
2.3. Implementation Details
We first implement two strategies in
Section 2.1 and
Section 2.2 via Algorithm 3 for Strategy 1 (see
Figure 3), and Algorithm 4 for Strategy 2 (see
Figure 4), then propose Algorithm 5 for Strategy 2 embedded with a simple tabu search algorithm for the improvement in
Figure 5.
In the Destruction() procedure, there are three steps:
step 3a. Find the variable that is not on the tabu list and lead to the small change to the solution when the variable is flipped.
step 3b. Change its value, place it on the tabu list to update the tabu list, update E(x).
step 3c. Test if there is any variable that is not on the tabu list and can improve the solution. If not, go to Step 3a.
In the Construction() procedure, there are four steps:
step 4a. Test all the variables that are not on the tabu list. If a solution better than the current best solution is found, change its value, place it on the tabu list, update E(x) , update the tabu list, and go to Step 1.
step 4b. Find the index i corresponding to the greatest value of E(xi), change its value of xi, place it on the tabu list to update the tabu list, update E(x).
step 4c. If this is the fifteenth iteration in the Construction() procedure, go to Step 1.
step 4d. Test if there is any variable that is not on the tabu list and can improve the solution. If not, go to Step 3a. If yes, go to Step 4a.
The randChange() procedure is invoked occasionally and randomly to select an x for the Destruction() using a random number generator. There is less than a 2% probability of invoking after the Construction() procedure. To get the 2% probability, a random number generator is used to create an integer between 1 to 1000. If the value of integer is smaller than 20, the randChange() is invoked. The variable chosen in the randChange() will lead to the change of E(x) for Destruction().
Any local search algorithm, e.g., Algorithm 3 or 4, can be used in Step 1 of this simple tabu search heuristic. However, a limited preliminary implementation of Algorithm 3 and 4 within the Algorithm 5 suggested that due to its simplicity of implementation and computational saving time, the Algorithm 4 with slight modification was quite effective, thus we used it in Step 1 of the Algorithm 5. The slight modification was as follows. If the solution found by a 1-flip is worse than the current best-found solution, quit the local search and go to Step 2.
In order to determine whether the hybrid r-flip/1-flip local search algorithms with two strategies (Algorithms 3 and 4) do better than the hybrid r-flip/1-flip local search embedded with a simple tabu search implementation, we compared Algorithms 3 and 4 to Algorithm 5.
The goal of the new strategies is to reach local optimality on large scale instances with less computing time. We report the comparison of three algorithms of a 2-flip on very-large-scale QUBO instances in the next section.