1. Introduction
Multi-index axial assignment problems arise when it comes to solving a multitude of applied problems in the logistics and planning area [
1,
2,
3]. An overview of the results obtained through analysis of the subclasses of multi-index assignment problems is given in [
1]. The class of multi-index axial assignment problems is known to be NP-hard even in the three-index case [
4]. In [
5] it was proved that no polynomial
ε-approximate algorithms for solving a three-index axial assignment problem (here
ε is an arbitrary constant) exist, otherwise P = NP.
There are known approximate and heuristic algorithms for solving the NP-hard axial assignment problem [
2,
6,
7,
8,
9,
10,
11]. As a rule, such algorithms construct a series of feasible solutions to the problem. The general approach in the final step of the algorithms is choosing the best solution from the constructed feasible solutions. As an improvement of the final step of such algorithms we propose building an optimal combination of the found feasible solutions instead of commonly applied selection of the best solution. The optimal combination of feasible solutions is an optimization problem where the fragments of the found feasible solutions need to be optimally combined. Obviously, such an optimal combination is no worse than a standard selection of the best solution. But, as we will demonstrate later, solutions combination outperforms (based on computational experiments) selection of the best solution while having comparable computational complexity.
The solutions combination problem was first formulated in our earlier paper [
12]. In this work a linear complexity algorithm for optimal combining of a pair of feasible solutions was constructed. Heuristic algorithms for combining of three and a larger number of solutions were proposed in [
13]. These heuristics are based on successive combination of pairs of solutions. An efficient algorithm for optimal combining of three and larger number of solutions was an open problem.
In this work we have proved that the solution combination problem is already NP-hard in the case of combining four solutions. Which means that there is already no polynomial algorithm for optimal combination in the case of four solutions, otherwise An efficient algorithm for optimal combining in the case of three solutions remains an open problem.
Further the article is organized as follows. In
Section 2 we formulate the axial assignment problem and the corresponding solutions combination problem.
Section 3 deals with the results of designing the algorithms for combining feasible solutions. Finally, in
Section 4 the NP-hardness of combining four solutions is proved.
2. Solutions Combination Problem
Let
be the disjoint index sets,
;
is the three-index cost matrix; and
is the three-index matrix of the variables. Then the three-index axial assignment problem is formulated as the following integer linear programming problem:
Next, let a set
be given that defines a subset of the allowed assignments:
Then we consider an optimization problem with objective (5) subject to constraints (1)–(4) and denote it by for the given subset . It is obvious that problem (1)–(5) corresponds to the problem .
In the general case problem
is NP-hard [
1]. Moreover, the problem of feasibility check of system (1)–(4), (6) for an arbitrary set
is NP-complete [
1]. We will further consider subsets
such that correspond to the assignments set of some feasible solutions of the problem (1)–(5).
We introduce auxiliary notations. Let
be a feasible solution to the system of constraints (1)–(4). Then
will be used to denote the following set of allowed assignments:
Let , be some arbitrary feasible solutions of the system (1)–(4). Denote . Then the problem of optimal combining of feasible solutions , takes the form .
A large number of known heuristic and approximate algorithms for solving the axial assignment problem yield, in the course of their operation, a certain set of feasible solutions (for convenience denoted by ,). Denote The general approach in the final step of these algorithms is choosing the best solution from the constructed feasible solutions, i.e., . As an improvement on the final step of such algorithms, i.e., selection of the best solution, we propose building an optimal combination of the found feasible solutions through solving the problem . In other words, we propose building a solution by combining the components of the found feasible solutions rather than only choosing the best one.
3. Solution Combination Algorithms
Let us consider algorithms for solutions combination problem
. In our earlier paper [
12] we constructed a linear complexity algorithm for solutions combination problem for the case
m = 2.
It was proved in [
12] that Algorithm 1 finds solution of the problem
and requires
O(
n) computational operations. Thus, in accordance with step 5 of Algorithm 1, the optimal value of the criterion for problem
is defined as
.
Algorithm 1. Ref. [12]. Solution of problem |
Step 1. Construct graph , where .
Step 2. Find the connectivity components , of graph and build subgraphs , induced by the corresponding components of connectivity.
Step 3. Now, we build the following sets:
.
Step 4. The optimal value of criterion of the problem is defined as
.
Step 5. The optimal solution to the problem is constructed as follows. Initially let . Further, for each perform , where . |
We have demonstrated in [
13] that an algorithm based on successive optimal combination of feasible solutions pairs does not ensure an optimal solution for the problem
when
. However, such a successive combination technique can be used as a heuristic algorithm for the problem
when
. We provide the results of the computation experiments for a variety of successive combination strategies, which demonstrate the advantage of the proposed approach over the commonly used step of choosing the best feasible solution [
13].
In [
12,
13] we presented comprehensive computational experiments for solutions combination algorithm for
m = 2 and for solutions combination strategies for
3. Below we will giving a brief description of these computational results. In [
5] an approximate algorithm was constructed for the axial assignment problems satisfying triangle inequality. This approximate algorithm constructs three feasible solutions and chooses the best among them. A collection of test problems for
with the cost matrices satisfying triangle inequality was proposed in [
5]. For the collection of the problems presented in [
5] the solution combination algorithm gives 0.148% improvement compared to the original step of choosing the best solution by the approximate algorithm; for more details please see [
12]. For a set of cost matrices whose entries were generated with integer values uniformly distributed at the interval
and for
we randomly generated
feasible solutions and applied the local optimization algorithm proposed in [
6]. Based on computational results we demonstrated that applying of successive combination strategies to the locally optimized solution gives approximately 4–8% improvement compared to a standard approach of choosing the best solution; for more details please see [
13].
4. Solutions Combination NP-Hardness
We will now show that the class of problems of the optimal combination of
m feasible solutions is NP-hard even when
. The proof is based on polynomial reduction of the well-known NP-hard class of 3-CNF problems [
4]. Here 3-CNF is the problem of determining if a Boolean formula is satisfiable, where the Boolean formula is in conjunctive normal form with three variables per conjunct.
Theorem 1. The class of 3-CNF problems is polynomially reduced to the class of 3-CNF problems without repeating variables in each clause.
Proof of Theorem 1. Let us consider an arbitrary 3-CNF and apply the following algorithm to each clause of 3-CNF:
If a clause does not contain any repeating variables, it remains unchanged.
If a repeating variable is included into a clause only with or only without negation then a clause has the form or , where are the literals. A clause is replaced by , where is the new Boolean variable. It is obvious that , . A clause is replaced by where are the new Boolean variables. It is obvious that , .
If a repeating variable is included into a clause simultaneously with and without negation, this clause has the form , where is the Boolean variable, is the literal. Then , and the clause can be discarded from 3-CNF.
At this point we polynomially reduced the class of 3-CNF problems to the class of 3-CNF problems without repeating variables in each clause. The lemma is proved. □
Theorem 2. The class of optimal combination of four solutions problems is NP-hard.
Proof of Theorem 2. To prove the theorem, we will show that NP-hard class of 3-CNF problems [
4] can be polynomially reduced to a class of optimal combination of four feasible solutions problems. □
Consider an arbitrary 3-CNF problem with Boolean variables and clauses. Let = be the set of indices of Boolean variables of the 3-CNF. According to theorem 1, without loss of generality we assume that there are no repeating variables in each clause. For convenience, we introduce the following notations:
are the indices of Boolean variables in the -th clause;
is the set of indices of the Boolean variables included into the s-th clause;
is the set of indices of the Boolean variables included without negation into the s-th clause;
is the set of indices of the Boolean variables included with negation into the s-th clause;
is the set of indices for the Boolean variables that are not included into the -th clause,
Then we construct disjoint sets of indices
as follows; see
Figure 1 for visualization of these sets:
,
,
.
According to above construction, , . Hence, .
Next, build a set to be used for defining a multi-index cost matrix of the axial assignment problem in the following form:
;
;
;
;
;
.
Now we can define the three-index cost matrix as
The constructed sets and three-index cost matrix define the three-index axial assignment problem (1)–(5).
Further we build four subsets
, that will determine four feasible solutions to problem (1)–(5); see
Figure 2,
Figure 3,
Figure 4 and
Figure 5 for visualization of the sets
–
.:
;
;
;
.
The corresponding four feasible solutions
will be defined as follows:
where
.
It is obvious that the criterion of the constructed solutions combination problem is nonnegative. Now we show that the optimal criterion value of is 0 if and only if the corresponding 3-CNF is satisfiable.
1. Let be the optimal solution to problem and . We build a set Since satisfies the system of constraints (1)–(4), we get .
Now it is easily seen that for each
one of the following two conditions holds:
or
Indeed, let us assume that for some
the condition
holds, but
. By construction,
Since
and
satisfies the system of constraints (1)–(4), then
. Given
, we finally obtain
Then,
, which leads to contradiction and the above assumption is wrong. Hence, if
, we get
. From here we conclude that, if
for some
, then condition (7) holds for l. If
for some l, then
and, similarly, we can prove that condition (8) holds for l.
Now we define vector
X of the Boolean variables for the initial 3-CNF:
By construction, each
has a corresponding
or
Hence for each
there exists
or
From this it follows that each clause takes the true value on Boolean vector
X. Hence 3-CNF takes the true value on Boolean vector
and is satisfiable.
2. Let 3-CNF be satisfiable and
be the Boolean variables vector on which 3-CNF takes the true value. Then we build a set of allowed assignments,
, that is to define the optimal solution to the combination problem
. Set
will be constructed by the following Algorithm 2:
Algorithm 2. Constructing |
Step 1. Initialize .
Step 2. For each , then ; else
Step 3. For each :
If ;
else if ;
else if . |
Next, we define a multi-index matrix of variables
:
In step 2 there are
elements included into the set
. Since the 3-CNF takes true value on
X, in step 3 there are 3
K elements included into
. Hence,
. For any pair
, that
, the following condition holds
Therefore, satisfies the system of constraints (1)–(4).
By construction, , since in step 2 only elements from the sets may be included into , then in step 3 only elements from may be included into . is a feasible solution of the combination problem . Further, by construction, , since in step 2 only elements from may be included into set , then in step 3 only elements from may be included into . From this it follows that . And hence, is the optimal solution to problem and the optimal criterion value for this problem is 0.
Thus, the optimal criterion value of the constructed problem is equal to 0 if and only if the 3-CNF is satisfiable. The above procedure of constructing the problem requires a polynomial time in the size of the initial 3-CNF. Therefore, the class of problems of optimal combination of four feasible solutions is NP-hard. The theorem is proved.