Constrained Quantum Optimization for Resource Distribution Management*

The cloud computing field suffers from the heavy processing caused by the exponentially increasing data traffic. Therefore, optimizing the network performance and achieving a better quality of service (QoS) became a central goal. In cloud computing, the problem of energy consumption of resource distribution management system (RDMS) is presented as an optimization problem. Most of the existing classical optimization approaches, such as heuristic and metaheuristic have high computational complexity. In this work, we proposed a quantum optimization strategy that executes the tasks exponentially faster and with high accuracy named constrained quantum optimization algorithm (CQOA). We exploit the CQOA in RDMS as a toy example for pointing out the efficiency of the proposed quantum strategy in reducing energy consumption and computational complexity. Following that, we investigate the CQOA's implementation, setup, and computational complexity. Finally, we create a simulation environment to evaluate the efficiency of the suggested implemented constrained quantum strategy. Keywords—Quantum computing; constrained quantum optimization algorithm; quantum extreme values searching algorithm; resource distribution management; cloud computing


I. INTRODUCTION
Parameter optimization and the choice of the best solution candidate play a crucial factor in gaining optimal performance in many application types in a wide range of disciplines. It is useful to mention that most of the computational problems arising from the practical optimization world are frequently mapped to searching the minimum or maximum of a goal function (or a constraint goal function).
The cloud computing industry is suffering from intensive processing due to rapidly rising data traffic. As a result, improving the network speed and attaining a higher quality of service (QoS) became a top priority. In the last decades, several well-known quantum strategies have been proposed in quantum computing [1,2] such as quantum phase estimation (QPE) which is exponentially faster than the classical ones, it computes the eigenvalue of a unitary operator, it has many useful applications, here we list some examples, such as, quantum counting algorithm for computing the number of occurrences of a query (searched item) in a certain database, Shor's algorithm for integer factorization [3], or the HHL algorithm [4] for solving a linear system of equations. Another interesting well-known searching algorithm, the so-called Grover's algorithm (quantum solution for searching an item in an unsorted database) which enables a dramatic reduction in computational complexity. The optimal classical solution takes O(N) iterations to carry out the search while Grover's strategy requires only O(√ ) step [5][6].
In this work, we exploited the constrained quantum optimization algorithm (CQOA) [17]- [20] for optimizing the energy consumption of a proposed resource distribution management system (RDMS). It is important to mention that one of the motivations behind exploiting the CQOA in RDMS is that most of the constrained classical searching strategies suffer from high computational complexity for one of the following reasons, • Most of the databases are Unsorted (unordered).
• The database may contain many local extremes (minimum or maximum) gratifying the constraint.
• The database structure is not always continuous.
The outline of this paper is as follows: Section II presents the literature review. Section III is devoted to introducing the CQOA and its computational complexity as well as showing a comparison between the CQOA and its original quantum algorithm version, the so-called quantum extreme value searching algorithm (QEVSA). Section IV deals with describing the resource distribution management model and the problem statement. Section V is concerned with implementing and configuring the proposed constrained quantum optimization approach in the desired resource distribution management. Section VI is devoted to discussing the computational complexity of the applied CQOA. Section VII presents the simulation results, and Section VIII concludes the paper.

II. RELATED WORK
It is not easy to build a new efficient quantum algorithm that outperforms a classical one. For this sake, there are few discovered quantum algorithms. Concerning the constrained extreme value searching, the most leading quantum heuristic candidate is introduced in [7], the so-called quantum approximate optimization algorithm (QAOA) which approximates hard optimization problems by converting the classical objective function into a Hamiltonian problem. Later, the QAOA was exploited for solving a constrained optimization problem, this alternative solution investigates the ground state of the Hamiltonian cost function instead of minimizing the original cost function [8]. Another extended version of the QAOA, the so-called quantum alternating operator ansatz is designed for finding the approximate solutions to optimization problems with hard constraints [9].
The only drawback is that the calculation of the derivatives of the goal function can be computationally expensive. On the other hand, several well-known classical approaches for handling the constrained optimization search have been proposed in the literature, the most applied ones namely deterministic optimization algorithms and metaheuristic ones, these strategies are often failing to find the global optimum result when the goal function is non-monotonic, noncontinuous, or the database is unsorted and very large [10]- [16].
It is worth showing the motivation behind applying the CQOA in RDMS. As it is known, new technologies continue to merge in cloud computing to meet the challenges imposed by the exponentially increasing data traffic [21]- [55]. Recent works [56][57][58], of the cloud radio access network, have shown significant performance gains by centralizing the management of radio and processing resources in the cost of computational complexity.
Due to the significance of the issues that the cloud environment addresses, many optimization methods have been proposed lately. The majority of them strive for a high quality of service.
The authors in [21] employed a hybrid prediction model that merges both statistical and machine learning approaches to generate higher-quality prediction outcomes for cloud computing. The proposed approach was able to predict with high accuracy the necessary workload. However, these techniques suffer from high computational complexity due to complex and highly nonlinear data. The model has been exploited to predict both seasonality and random workload patterns.
The authors in [22] proposed a hybrid technique with a shuffled leapfrog algorithm and ubiquitous binary search (SLFA-UBS) to resolve these issues with an optimal assignment and better resource distribution. The method performed better in terms of optimum dynamic resource provisioning with QoS and cheap cost.
Several metaheuristic approaches have been applied to improve the quality of service of cloud computing. For example, the authors in [26] suggested a multi-objective hybrid Ant Colony Optimization (ACO) with Bacterial Foraging (ACOBF) behavior to maximize resource utilization and also minimize the Makespan. While, the authors in [36] proposed another multi-objective hybrid method that combines the two well-known strategies, particle swarm optimization (PSO), and grey wolf optimization (GWO). The experimental outcomes proved that the newly developed method reduces the total execution time and cost compared to PSO, heterogeneous earliest time first (HEFT), ant colony optimization (ACO), and round-robin (RR) algorithms.
The author in [59] considered a cloud radio access network and aimed to minimize the energy consumption of the overall system while satisfying constraint demands. Moreover, the work in [60] executed sequentially two heuristic approaches for minimizing the power consumption of task processing. In addition, the author in [61] used the Matroid algorithm to optimally solve the constrained resource allocation problem.
Another classical technique that is often used is the so-called knapsack optimization strategy which is widely investigated in the processing resource assignment in a cloud radio access network system [62][63][64]. However, the proposed optimization algorithms for task allocation require high computational complexity.

III. CONSTRAINED QUANTUM OPTIMIZATION ALGORITHM
Before introducing the CQOA, let's present first the QEVSA. In [65]- [66] the author built a new quantum algorithm named quantum existence testing (QET) which is a special case of quantum counting algorithm that determines the number of occurrences M of a certain item in a database consisting of N entries [67]. While the QET tests whether a given entry exists or not in a certain database, in other words, it checks the value of M, if it equals zero or not. Next, the author developed a new quantum method called the quantum extreme value searching algorithm (QEVSA) by combining the well-known classical binary searching algorithm [68] and the QET. More details are presented in [65]- [66]. The QEVSA finds the extreme (minimum or maximum) of an unconstrained goal function or unsorted database.
The computational complexity (CC) of the QEVSA depends on, • The CC of the binary searching algorithm embedded in the QEVSA which equals ( 2 ( )), where T is the maximum number of steps needed to run the logarithmic search.
• And, the CC of the QET which equals � 2 3 �√ ��, where = 2 is the entry size of the database, where is the total number of the required qubits with respect to the size of the database.
The overall number of bits used in the physical implementation of the QET is strongly influenced by the quantum uncertainty and the classical accuracy of the application. In case the quantum uncertainty demand is neglected i.e. it corresponds to the idealistic phase estimation with no error, this implies that the value of can be written as.
where is the optimum number of qubits required for classical accuracy in order to represent the phase, in this case, the CC of the QET is � 2 3 �√ ��. On the other hand, if the upper bound of the error probability is denoted by � of the quantum uncertainty _originated from the QPE_ is taken into consideration by the application, then the value of is expressed as.
where is the optimum number of qubits needed to handle the quantum uncertainty problem originating from the error probability of converting the phase to a probability 43 | P a g e www.ijacsa.thesai.org In compliance with what has been discussed, we see that the QET plays a fundamental role in the search efficiency of the QEVSA.
In [17]- [18], we developed a new extended version of the QEVSA, the so called CQOA, where we extended the functionalities of the QET(ref) to a new quantum function that answers whether there exists an item in a certain region of the database at all, and satisfies the engineering constraint C and index relation R (The value of R may refer to minimization or maximization of the constraint goal function) is needed. This new extended version is named the constrained quantum relation testing ( , , ) where the parameter ref refers to the updated value which divides the database into two vertical parts, the index R refers to the used relation, and the constraint C can be equality or inequality constraint.
Also, we proved that implementing the constraint C and the relation R in the QET does not change the evaluation of QPE. For this sake, the estimated optimum number of qubits required for the classical accuracy denoted by which corresponds to the CQRT function equals the belonging to QET function, one obtains = .
To this end, the computational complexity of the QEVSA equals the computational complexity of CQOA which equals � 2 ( ) 2 3 �√ ��.
Note that the notation of ref value in the algorithm has been changed to . The CQOA is expressed as follows,

then go to 2, else stop and =
It is important to mention that the QEVSA performs only the search in the continuous database structure because the QET cannot adjust the classical logarithmic search algorithm (binary searching algorithm) so that it is suitable for noncontinuous databases.
The CQRT allows adapting the binary searching algorithm so that it is suitable for continuous database structures to noncontinuous ones. To this end, the CQOA handles the search in a continuous or non-continuous database structure. The main similarities and differences between the QEVSA and CQOA are summarized in Table I.

IV. MODEL
This paper is an extension of the previous work published in [69][70][71][72][73], the of the current paper is reducing the energy consumption of processing resources by taking into consideration the delay constraint of the tasks. To model the general RDMS, we divided its functionalities into three main blocks. Fig. 1 represents the architecture of the proposed RDMS.

A. Multiple Task Generators
We consider multiple task generators, where each generator releases a task type to be served by computing units. We assume that the number of generators/task-types is denoted by G. Each generated task is composed of several subtasks selected from a set of subtask types, where the total number of different subtask types is .
Each generator always produces identical tasks i.e. the same number of the total subtasks and the same number of subtask types. Moreover, each generator releases tasks according to an arrival time distribution (exponential intensity distribution, uniform intensity distribution, etc.). Note that, the memory needed to allocate the subtask type is denoted by ∆ . Furthermore, each task type has to be served within a specific delay constraint denoted by i.e. the subtasks belonging to task type have the same time constraint i.e. all the subtasks of the task type have to be served within this time constraint .

1) Computing units:
The incoming tasks are served by computing units. The total number of computing units is denoted by K. Each computing unit has a maximum capacity . Assuming that refers to the number of subtask type under process on the ℎ computing unit.
2) Decision maker: It controls the deployment of the incoming subtasks among computing units. The CQOA introduced in Section II will be implemented as a computational infrastructure core of the decision-maker.

B. Problem Statement
The decision-maker deploys the subtasks of the incoming task to different computing units. Assuming that the subtasks of the incoming tasks are processed sequentially. Fig. 2 44 | P a g e www.ijacsa.thesai.org illustrates the processing mechanism of subtasks in the ℎ computing unit, where subtasks arrive in a FIFO manner, i.e. when a task arrives in the decision-maker, it decides instantly whether the task (consisting of subtasks) can be accepted and deployed to any of the computing units or not (rejected). The delay needed to process the actual load in the ℎ computing unit (considering the task under the decision, too) denoted by , it has to be always less or equal than the delay constraint of the incoming task type i.e. ≤ . The green hatched subtask is the subtask belonging to the new incoming task deployed into the ℎ computing unit (see Fig. 2). This decision method guarantees that the delay constraint of tasks that are running on the ℎ computing unit does not influence the fulfillment of delay constraint of the new incoming task and vice versa.  45 | P a g e www.ijacsa.thesai.org Now, let's investigate the calculation of the total energy consumed by the RDMS. We consider that the initial power needed to turn on the computing unit k is denoted by .
A subtask is composed of a specified number of identical memory pieces called memory units. The processing rate of the ℎ computing unit is denoted by and computed as follows, = On the other hand, the time needed to process a subtask type on the computing unit k is ∆ / . Furthermore, the processing delay of the actual load on the ℎ computing unit can be calculated as, Assuming that ≤ and the processing of the subtasks is performed sequentially as illustrated in Fig. 2, the energy required to process the subtasks on computing unit k is given by formula (5), where is the energy consumption of one memory unit on computing unit k.
• ∑ ∆ =1 : The energy needed to serve the subtasks under process on the computing unit k without considering the energy required to turn on the computing unit k.

•
: The energy needed to turn on the computing unit k in a period that is equal to (the energy of tasks is not considered).
It is straightforward to verify that the overall energy consumption of the system can be written as, where the term is considered if and only if the ℎ computing unit is switched on (The set of the switched-ON computing units). Our goal is to minimize the overall energy consumption , one obtains.
with S denotes the sets of different possible distributions of the subtasks of the incoming task among all computing units and refers to the ℎ distribution/deployment scenario of S, i.e. the ℎ specific set of computing units = { }.

V. IMPLEMENTATION AND CONFIGURATION OF THE CQOA
To select the best and the optimum deployment scenario, we apply the CQOA as a minimum constrained searching algorithm (MCSA). To this end, the function is substituted by , while the constraint C corresponds to the delay constraint of the incoming task type i.e.
, and the implemented relation is a "minimization".
The maximum number of steps needed to run the logarithm search T in (8) depends on two parameters: the variation of the energy consumption of the system denoted by ∆ = − and the step size which is the smallest distance between the energies of two different scenarios among all the possible scenarios in the database. Fig. 3 shows these parameters.  12, No. 8, 2021 Since the searching region is obviously ∆ = − , the stochastic parameter T can be expressed as follows.
can be replaced by the energy consumption of the system without the new incoming task. We denote this energy value by � and one can observe that it does not depend on the deployment of the incoming task, this implies that.
An appropriate worst-case estimation for can be considered as. where, • denotes the energy consumption if the subtasks of the incoming task are deployed onto that computing units having the largest , i.e., the least energyefficient unit.
∑ ∈ is the total energy consumed by the set OFF of the switched-OFF computing units because the switched-ON computing units are already considered in � .
On the other hand, the value of can be written as, where ( ) is the sum of the energy consumption of the system without the new task � and the energy consumption of the incoming task with assuming that it was distributed according to , where refers to the ℎ set of those computing units which receive one or more subtasks of the new incoming task. It is straightforward to verify if one substitute (12) into (11), one obtains: Let be the number of subtasks of the incoming task from subtask type v deployed onto computing unit k in case of the ℎ deployment scenario. The formula of ( ) can be expressed now by means of (14) as: where this term is considered if and only if the ℎ computing unit is switched-ON. To set up properly the stochastic parameter , it is enough to investigate the non-zero solutions of � ( ) − � � � 2 = 0 , the solutions are located on a hyper-plane, this result is already discussed in [73].

VI. COMPUTATIONAL COMPLEXITY ANALYSIS
As previously presented, in order to minimize the constrained overall energy consumption, we have exploited the CMSA as a computational infrastructure for the RDMS. Furthermore, we have proven that the computational complexity of the implemented CQOA is � 2 ( ) 2 3 �√ �� , it depends on the computational complexity of the CQRT function 2 3 �√ � and the logarithmic search of the quantum algorithm 2 ( ), where N refers to the total number of possible deployment scenarios.
The computational complexity analysis is divided into two main parts, • The value of T roughly depends on the value of the stochastic parameter . As already investigated in [73], computing repeatedly the value of poses a real challenge. To this end, we proposed an alternative solution that consists of setting up the T value in advance before starting the assignment operation, in this case, the computational complexity of determining the parameter of the logarithm search will be O(1). More details on the computational complexity of T are presented in [73].
• The size of the search space N. This section will be devoted to estimating the value of N which refers to the set of all possible assignment scenarios for each incoming task.
Let us assume that the new task under decision has arrived from generator . This task contains identical subtasks from type v and we need to select pieces of computing units from the overall K where repetition is allowed, i.e. a certain computing unit can be chosen more than once. One can verify that the number of such possible different sets can be written as: Considering all the subtask types, one gets.
Now, we are ready to investigate the computational complexity of the lower and upper bounds of the size of search space N. It is easy to show that Assuming that ≫ , it is interesting to note that by using formula (17), one can verify that it can be expressed in the following manner: 47 | P a g e www.ijacsa.thesai.org Now we are in a position to give the upper bound for (16). Using (18), one can confirm that Using (19) and (16), the upper bound of the size of the search space N can be expressed as: Next, we are interested in a close lower bound for (16). It is easy to verify that where, = ∑ =1 .
The lower bound expressed in (21) shows that the computational complexity of finding the optimal solution within the database is polynomial in terms of the numbers of computing unit K but exponential in terms of , i.e. if the number of subtask type V becomes large, the computational complexity rises dramatically. For this sake, performing a constrained classical computation method to find the optimum result will be time-consuming and hard to solve. So, our proposed quantum strategy is the best candidate to handle such a task assignment optimization problem.

VII. SIMULATION
To demonstrate the efficiency of the proposed CQOA, a simulation environment has been constructed, in which a constrained randomized method was considered as a reference for comparison with the proposed constrained optimization method. In the best case, the computational complexity of the constrained randomized method is O(const), and in the worst case, it is O(N).
This simulation aims to compare the performance of both methods in terms of computational complexity and the overall energy consumption with respect to the delay constraint.
The simulation of the RDMS hosts three computing units, the characteristics of computing units are presented in Table. II, we considered three computing units where they have an identical processing rate of 40. From a practical point of view, the RDMS contains significantly more computing units, however, to observe the trends and effects it is worthwhile investigating a small-scale model. Also, we considered two task type generators such that tasks are generated exponentially, where one of the task types has a high-intensity distribution (the mean value of intensity distribution is smaller) compared to the other one. Furthermore, we considered two subtask type, their memory requirements are respectively ∆ 1 = 2 and ∆ 2 = 4 . Table III presents the number of subtask types, total memory required, and the delay constraint of each task type. While Table IV shows the total number of tasks released for each intensity distribution. It is important to mention that the timeslot of task generation is 20 seconds. It is interesting to note that the decision-maker checks first the capacity constraint i.e. if there is free space in the system for allocating the new task. Then, it checks the delay constraint. Also, it is very important to mention that we did not deal with the case where the system is overloaded, i.e. we did not investigate the queueing behavior of the system.
For each two task types that have different intensity distributions, we repeat the simulation 10 times, then we calculate the average overall energy consumed for each algorithm. Fig. 4 compares the total energy consumed by the randomized and optimized methods for different exponential intensity distributions. It can be seen that for every experiment, the constrained optimized strategy consumes less energy than the constrained randomized one. Additionally, one can notice that when the intensity distribution of arrival tasks increases i.e. when the mean value of exponential distribution becomes smaller, the optimized strategy keeps consuming lower than the randomized one. Fig. 5 shows the percentages of the overall energy consumption reduction of the three aforementioned experiments. For example, in the first experiment where the two task type generators have respectively 0.4 and 0.3 as means (the mean value of exponential distribution), the energy consumption of the optimized method is less than the randomized one by approximately 43.85 %.
As it is shown, in the worst case the constrained randomized algorithm uses N steps, but it cannot find the optimum deployment scenarios which correspond to the minimum total energy consumption of the RDMS. While the computational complexity of the constrained optimized strategy is � 2 ( ) 2 3 �√ ��.
48 | P a g e www.ijacsa.thesai.org  To sum up, we see that whatever the distribution intensity is, the constrained optimized approach offers a significant reduction in terms of energy consumption and computational complexity.

VIII. CONCLUSION
The CQOA finds the extreme optimum value for a constraint goal function or unsorted database with respect to certain constraints. It reduces significantly the costs connected to the application such as computational complexity and time, as well as, provides high accuracy and speed. We exploited the CQOA to minimize the constraint goal function (The total energy consumption) of the RDMS. We derived a simplified form of the constraint goal function, and we investigated the implementation and the configuration of the proposed constrained quantum strategy. Next, we proved that the computational complexity of finding the optimal solution within the database is polynomial in terms of the numbers of the computing units but exponential in terms of the number of subtasks. Fortunately, the proposed CQOA can handle such kind of optimization problem exponentially faster. In the end, we demonstrated by a simulation environment the effectiveness of the CQOA in terms of energy consumption and computational complexity by making a comparison between the constrained randomized strategy and the constrained quantum one. In future work, we will exploit the CQOA in resource distribution management by considering queueing aspect.