1. Introduction
This paper considers a linear optimal service-matching task assignment problem defined by
where
is the assignment matrix with
N rows and
M columns. We refer to
as
service agent set and its elements as
service agent, and to
as
task set and its elements as
task. Thus,
is the cost of the assignment of service agent
to task
, and
means that service agent
is assigned to task
. Without loss of generality, we assume that
, i.e., the task set, is larger than the service agent set. The imposed constraint (1c) ensures that each service agent gets only one task, while constrain (1d) limits the assignment of any task to, at most, one service agent.
is the adjacency matrix of the resultant matching graph after the assignment is peformed.
An example scenario inspired by the service-matching mobile-agent deployment for coverage over a dense set of targets studied in [
1] is shown in
Figure 1. In this service-matching problem, service UAVs A1, A2, A3 (flying at the same altitude), whose spatial service over the horizontal two-dimensional (2D) plane is described by a Gaussian distribution, should be deployed to provide coverage to a set of dense targets in a 2D flat plane. The targets are clustered into subgroups TC1, TC2, TC3, and TC4, each described by a Gaussian distribution of the targets. The assignment cost
is the measure of similarity between the service distribution of agent A
i and the distribution of targets in subgroup TC
j, measured in terms of the Kullback–Leibler divergence (KLD) ([
2], p. 34). More details are provided in
Section 4, where we conduct a numerical study of this service-matching task assignment.
There are many other service-matching applications which can be used with the optimal AP problem (
Section 1). For example, in manufacturing, in assembly lines, where there must be a planning between the operators and the tasks [
3,
4]. Other situations such as in delivery tasks or ridesharing [
5] can also be formulated in the same way. In addition, some social, economical or political situations are no more than an AP [
6].
As in other combinatorial optimisation problems, there is a lack of methods that can achieve a good approximation factor in polynomial time with good scalability. Currently, the main algorithms still used to solve service-matching problems (
Section 1) are classical methods such as the greedy algorithm, which, theoretically, ensures an approximation factor of 63% [
7] with a complexity of
[
8]. The Hungarian method, with an approximation factor of 1 and a complexity of
[
8], or the Simplex method with, also, an approximation factor of 1 and a complexity of
[
8]. The reader should note that the aforementioned complexity bounds for the Hungarian and Simplex algorithms are based on execution of these algorithms when
.
With the rise of machine learning, new techniques such as neural networks, reinforcement learning or evolutionary algorithms have been formulated to solve combinatorial optimisation problems. Related to all these techniques, the advances in quantum computation have originated a new field of study: quantum-inspired algorithms. Quantum-inspired algorithms try to formulate classical algorithms in a quantum way, using qbits and its properties, in order to increase the speed of these methods (Quantum-computing- related terminologies used here are defined in
Section 2. The interested reader can find more detailed information in [
9], Chapter 1.) For example, in [
10], they use the superposition property in order to accelerate distribution shaping in the travelling salesman problem, or in [
11], they use entanglement to prevent a two-agent autonomous system from cyber-physical attacks. In [
12] is seen how quantum formulation helps in clustering problems and in [
13,
14] is seen how quantum properties are interesting for obtaining a better balance between exploration and exploitation in reinforcement learning. The same idea of reducing model size and increasing robustness is seen in other deep-learning techniques in [
15]. One of the interesting applications of quantum-inspired algorithm development is explored in [
16], where a quantum-inspired version of an evolutionary algorithm (EA) is implemented to solve a knaspack problem with a proven improvement with respect to classical EA.
This paper focuses on developing a computationally efficient suboptimal solution for the service-matching assignment problem (
Section 1) using a quantum-inspired EA (QiEA) algorithm and demonstrates its application in solving a service-matching coverage problem illustrated in
Figure 1. Special attention is given to the design of the collapsing procedure to make it more coherent with the real collapsing process of qbits and to speed up the process. In
Section 2, preliminary notions about quantum theory are presented. The proposed method is presented in
Section 3. In
Section 4, a numerical study focused on a service-matching task assignment demonstrates the efficacy of our proposed algorithm. The conclusions and our plan for future work are explained in
Section 5.
2. Preliminaries
This section gives the definition of the quantum formulation notion and terminologies we use throughout the paper. For the convenience of the reader, we also provide the definition of the KLD measure.
First, following [
17], we introduce the notion and the definitions from the quantum formulation. In quantum computation, the basic unit of information is called a
Qbit and it is neither one nor zero, but the superposition of both states. That means that, in one timestamp, there is a certain probability that the qbit is in in state zero or in state one. This can be formulated using Dirac’s notation, also known as brakets, as,
where
is the qbit,
and
are the two possible states and
and
are the amplitudes of these states. The Born’s rule tells us that these amplitudes are directly related to the probability of being in state
or
as the probability of one state is the power of its amplitude,
One qbit remains in this superposition until it is measured or observed. When that happens, the qbit becomes fixed in one of the states in the function of the amplitudes, this process is called collapsing.
As explained in Equation (
2), in the superposition state, a qbit depends on two parameters,
and
, that are indeed complex numbers. Therefore, qbits can be represented with spherical coordinates,
applying the Born’s rule, Equation (
5),
were
and
. It can be demonstrated that
has no observable effects [
18]; therefore, effectively, we only have to consider the following equation,
From Equation (
8), it can be seen that a qbit belongs to a Hilbert space
and can be represented as a sphere. This representation is known as a Bloch Sphere,
Figure 2.
From the Bloch Sphere, it can be seen that the state of a qbit can be modified using rotations. Indeed, in quantum computation, the logic gates used to develop circuits are no more than rotation operations. In this work, the only important rotation is the
rotation, as it is the one that makes the superposition state closer or further to states
or
. Therefore, in this case, qbits can be represented as circles and, in order to modify them, a simple rotation matrix will be used.
KLD is a measure of similarity (dissimilarity) between two probability distributions
and
, where the smaller the value the more similar two distributions are. KLD is zero if and only if the two distribution are identical ([
2], p.34). For Gaussian distributions,
and
, the KLD has a closed form expression ([
19], Equation (
2))
where
n is the dimension of the distributions.
In what follows, we rely on a function best defined as
which, given any finite number of assignment matrices
, return the assignment matrix
that results in the smallest of cost
,
, computed according to the assignment cost (1a).
3. QiEA for Optimal Service Matching
Inspired by the concept of quantum computing of qbit representation, rotation, observation and qbit collapsing, we propose the QiEA Algorithm 1 as a suboptimal solution to the optimal service-matching problem (1). To design this algorithm, we proceeded as follows.
Consider the assignment matrix
. For any given service agent
, every feasible assignment consists of assigning 1 to one of the elements of
,
and zero to the rest, while respecting also (1d). Since we do not know which element should be 1, the idea is to start by a probabilistic approach and, for every service agent
, attach a notion of probability to every
, which indicates with what probability that element is 1. Then, at each iteration
t of the algorithm, this probability is adjusted as we describe below. The notion of probability for each element
can be realised using quantum qbits,
. Thus, at each step
t of the algorithm, for each individual
l in population set
, there is a qbit matrix
with size
where each element
is the mentioned probability
of the assignment between agent
and task
.
Algorithm 1 QiEA algorithm for service-matching assignment |
- 1:
procedureQiEA - 2:
Input size of population K, number of iteration MAX_GEN - 3:
- 4:
initialise - 5:
generate K individuals by collapsing - 6:
for do - 7:
evaluate - 8:
end for - 9:
- 10:
while MAX_GEN do - 11:
- 12:
for do - 13:
generate by collapsing - 14:
evaluate - 15:
update - 16:
Update if is better - 17:
if migration condition then - 18:
- 19:
end if - 20:
end for - 21:
end while - 22:
(MAX_GEN)(MAX_GEN)(MAX_GEN) - 23:
end procedure
|
Evolutionary algorithms are based on the Darwinian explanation of species evolution where, step by step, there are mutations in each individual of the species and, by the end, only the individuals with better adaptation to the new environment survive. The evolutionary algorithms follow a two-step procedure [
20]. First, we generate an initial population of individuals randomly. Next, we repeat the following re-generational steps until termination: (a) the fitness of each individual in the population is evaluated (lowest cost, feasibility), (b) the fittest individuals are selected as parents for reproduction, (c) new individuals are bred (from parents) through crossover and mutation operations to give birth to offspring, (d) the least-fit individuals of the population are replaced with new individuals.
QiEA is a probabilistic algorithm similar to other evolutionary algorithms. We use an evolutionary method to go from an initial state of uncertainty
to a final determined system
, which is a suboptimal solution to (
Section 1). The underlying concept in QiEA is that
informs us on how to select individual
at each step of the algorithm (an individual is selected by collapsing
).
, which determines the probability of each element of
being 0 or 1, is updated at each step based on the fitness of the generated individuals at step
using the rotation method, which will be described below. The advantage of QiEA is, indeed, in this step of updating the probabilities of selecting future individuals based on feedback from the fitness of the generated individuals. The schematic procedure of our QiEA algorithm is shown in
Figure 3. Our proposed QiEA is shown in
Figure 3: there is a
K parallel process to generate
K individuals that constitutes the population set of the algorithm. Each individual generation process
has its own
, initialised at
and updated at each iteration of the algorithm.
Our proposed QiEA algorithm consists of three main procedural steps, collapsing, evaluation and updating and migration.
Collapsing procedure: This process is a novel contribution of this work and it is a faithful representation of the quantum-like collapsing of the qbit systems. With this purpose, the collapsing is performed using the maximum randomness possible. At each step
t to generate individual
, first, one random service
i and one random target
j are selected to form the agent–task pair
. Then, with a uniform probability, we generate a random value
. Then,
is generated using the collapsing procedure below
After collapse, the agent–task pair
is removed from the random selection, and the process is repeated until there is no service agent left to be selected (recall our assumption that there is more service agents than the tasks). Our collapsing procedure is summarised in Algorithm 2. It is important to note that, if a service agent is assigned to one task (qbit
is collapsed to one), no other service agent can be assigned to that task and that service agent can not perform any other task. That is exactly what we formulated in constraints (1c) and (1d). That is, our individual generation procedure always generates feasible individuals
, and does not need the costly and often ad-hoc
repairing of the individuals that other quantum-inspired algorithms, e.g., [
10,
21,
22], need. The elimination of the repair step also results in faster convergence.
Algorithm 2 Collapsing |
- 1:
procedureCollapsing - 2:
Input Qbit system - 3:
- 4:
- 5:
while do - 6:
select random service - 7:
select random service - 8:
generate uniformly from - 9:
collapse: - 10:
if then - 11:
remove i from - 12:
remove j from - 13:
end if - 14:
end while - 15:
end procedure
|
Evaluation procedure: This procedure has two parts, the computation of the cost for fitness test, and the formulation/updating of the rotation matrix based on the feedback from the fitness analysis. Given the collapsed individuals
, at step
t, firstly, the cost of the assignment
is computed. The fitness evaluation not only depends on the cost at time
t due to
but also has temporal information about the evolution of the system by saving the best obtained solution until that iteration, which is stored as
. The variable
for each individual
is initialised by collapsing
, as described in step 5 of Algorithm 1. The fitness analysis relies on function (
11) and updates each local
according to
. Next, in the evaluation procedure, we update the qubit matrix
according to
where rotation angle
is determined from
Table 1. Here,
is a design parameter which normally is a very small angle. Recall that, according to the circular qbit representation (
8), which is visualised in
Figure 2, a positive rotation
results in increasing the probability of collapsing to 1 and a negative rotation
results in increasing the probability of collapsing to 0. We proposed
Table 1 based on the logic that if the value of
and
are the same, we make no changes to the qbit corresponding to the agent–task pair
, thus setting
(cases 1, 2, 7 and 8 in
Table 1). If changing from
to
results in decreasing the total cost, we want to encourage collapsing to
by increasing this probability by using a positive rotation
(case 3 in
Table 1). On the other hand, if changing from
to
results in decreasing the total cost, we want to encourage collapsing to
by increasing such probability by using a negative rotation
(case 5 in
Table 1). If the changes in the values result in increasing the total cost, we do not make any changes to
, i.e.,
(cases 4 and 6 in
Table 1). To summarise, we make an adjustment to
if
and the best value at step
t is set to
; thus, we can interpret the change in
value as a contributor to decreasing the cost. Algorithm 3 summarises our evaluation procedure.
Algorithm 3 Evaluation |
- 1:
procedure Evaluation - 2:
Input collapsed system , best saved solution - 3:
- 4:
for any and - 5:
if then - 6:
for do - 7:
for do - 8:
if then - 9:
- 10:
end if - 11:
if then - 12:
- 13:
end if - 14:
end for - 15:
end for - 16:
end if - 17:
for do - 18:
for do - 19:
update according to ( 14) - 20:
end for - 21:
end for - 22:
end procedure
|
Migration procedure: Like other evolutionary algorithms, to avoid getting stuck in local maxima or minima we perform a migration procedure when the migration condition MAX_GEN, where n is a percentage that defines when the process is completed. In the migration step, we simply replace the current best local value of all the individuals with , i.e., for all .