Quantum load balancing in ad hoc networks

This paper presents a novel approach in targeting load balancing in ad hoc networks utilizing the properties of quantum game theory. This approach benefits from the instantaneous and information-less capability of entangled particles to synchronize the load balancing strategies in ad hoc networks. The quantum load balancing (QLB) algorithm proposed by this work is implemented on top of OLSR as the baseline routing protocol; its performance is analyzed against the baseline OLSR, and considerable gain is reported regarding some of the main QoS metrics such as delay and jitter. Furthermore, it is shown that QLB algorithm supports a solid stability gain in terms of throughput which stands a proof of concept for the load balancing properties of the proposed theory.


Introduction
Game theory is the theory of strategies. With the aid of this method, players of the game are suggested a strategy that maximizes their total payoff. Quantum game theory provides a framework to utilize entangled particles with the aim of affecting decision-making process of distant players without transmission of any information. In a quantum game, players can use properties of entangled particles to have an instantaneous influence on the strategies of other players to increase their pre-defined utility function [2][3][4].
In a quantum game, players can use properties of entangled particles to have an instantaneous influence on the strategies of other players to increase their pre-defined utility function. This is enabled by the properties of entangled particles which creates a communication-less instantaneous channel which can be used to influence the strategies made by the players in a quantum game. A system is known to be quantum when the physical states of that system are in violation of the Bell inequalities [5]. One of the properties of a quantum system is the larger accessible space of states which can be utilized to maximize a pre-defined classic utility function.
Load balancing has been the focus of many types of research involving ad hoc networks. As load balancing is a network-wide optimization and improvement mechanism, the solutions involving this area has mainly been implemented in the network layer of the OSI (Open Systems Interconnection) model. Routing protocols, as network layer agents, are responsible for computation of the network connectivity graph (taking into account the cost/benefit metrics) which would make them the most suitable candidates to accommodate load balancing strategies. By taking load balancing strategies in the routes requested by the nodes in the network, a minimum acceptable QoS can be guaranteed in the entire network. In ad hoc networks, routing protocols operate in a distributed manner within each node without any direct interactions among them. Given that design of routing protocols is based on a distributed paradigm, load balancing algorithms have to operate under the same network assumptions. As a result of this, achievement of an overall network gain would be extremely challenging.
The focus of this paper is to target load balancing in ad hoc networks by utilization of entangled particles in a quantum game setup. By formulation of the problem of load balancing in ad hoc networks under the umbrella of quantum game theory, it is shown that considerable gain can be achieved in traffic management and load balancing. We have proven that the quantum game strategies can be designed to maximize fair distribution of network load, and the sender nodes can utilize the full potential of these strategies to perform fair load distribution. Quantum strategies and entangled particles are also in the core of quantum networks and communication [6][7][8]. Quantum networks introduce more efficient and secure long-distance information transmission in comparison with their classical counterparts. Another very important area that quantum game theory can have a significant impact is cloud-based data encryption [1,[9][10][11]. Quantum game theory has the potential to create very robust and reliable encryption mechanisms.
The remainder of this paper is organized as follows. Section 2 discusses the challenges regarding load balancing in ad hoc networks. Next, Sect. 3 summarizes the existing load-balanced routing protocols in the literature. Section 4 focuses on a gen-eral discussion on quantum game theory and also formulates a quantum game to target load balancing in ad hoc networks. In Sect. 5, the problem of load balancing in ad hoc networks is defined from a networking point of view. In Sect. 6, the performance of the proposed QLB-OLSR algorithm is compared to the baseline, and the results are discussed in detail. Finally, Sect. 7 concludes the contribution of this paper and the future direction in the area of quantum load balancing.

Challenges involved in load balancing of ad hoc networks
Wireless ad hoc networks are a category of decentralized infrastructure-less networks that operate based on a self-organizing paradigm. When a group of nodes, equipped with wireless interfaces dynamically connect with one another in an infrastructure-less manner, an ad hoc network is formed. Ad hoc networks do not rely on a fixed infrastructure, which makes them ideal for many applications such as emergency services and tactical/military operations. In wireless ad hoc networks, nodes communicate using wireless interfaces via the communication medium (using spectrum/channels). One of the well-known communication standards that support infrastructure-less mode of operation is IEEE 802.11. Due to the nature of wireless communication and limitations of currently deployed MAC (medium access control) protocols [12,13], the challenges involved with ad hoc networks are significantly more than infrastructure-based wireless networks. Due to lack of infrastructure in ad hoc networks, nodes within the network are responsible for forwarding data packets from source to destinations via other ad hoc nodes. The process of delivering data packets from source to destination via other intermediate nodes is so-called routing. Routing is known to be one of the main challenges in ad hoc networks. The reason is while discovered routes in ad hoc networks need to maintain certain QoS (quality of service) criteria by efficient utilization of network resources, they are not allowed to exhaust network resources in this process. There are various limitations associated with ad hoc networks which due to their connection with the topic of this paper we have listed and analyzed them here.

Excessive noise and interference
Interference and noise are two main factors affecting the quality of routes created in ad hoc networks; this results in lower data rate mainly in the ad hoc networks that utilize IEEE 802.11 DCF (distributed coordination function) as the communication protocol for their wireless interface. IEEE 802.11 is one of the well-known protocols which has been studied extensively in various researches involving multi-hop ad hoc networks. IEEE 802.11 assumes that each channel can only be accessed by one node, and if two or more nodes try to access the channel at the same time, the collision takes place. The sensing mechanism designed in IEEE 802.11 to avoid collision is CSMA/CA (carrier sense multiple access with collision avoidance) [14]. In CSMA/CA when a collision takes place, the colliding nodes back-off from their transmission based on a random time and re-attempt their transmission after a specified time. The primary source of low data rate and capacity in ad hoc networks using IEEE 802.11 is this structure of CSMA/CA. Each collision results in a subsequent back-off delay resulting higher end-to-end delay and lower throughput in the network. The dynamic structure of ad hoc networks utilizing this technology leads excessive collision. We have used IEEE 802.11 for all the simulation studies and analysis in this research.

Dynamic topology
Another problem of ad hoc networks is their dynamic structure. MANETs (mobile ad hoc networks) are a type of ad hoc networks with support for mobility. Mobility results in excessive topology changes which cause an excessive unpredictable collision and is considered as another performance barrier. Since the focus of this work is to proof a fundamentally novel concept in networks, to reduce the problem complexity our assumption is that nodes are static.

Load balancing
Another factor that affects the performance of ad hoc networks is the lack of any load balancing mechanism. The decentralized structure of ad hoc networks makes load balancing a complicated problem. Most of the routing protocols designed for ad hoc networks do not take load balancing into account which results in uneven and unstable QoS performance across the network. Conventionally, routing protocols designed for ad hoc networks utilize a cost/quality metric to assess the performance of routes in the network. Most of the ad hoc routing protocols such as Ad hoc On-Demand Distance Vector (AODV), Optimized Link State Routing Protocol (OLSR), Destination-Sequenced Distance-Vector Routing (DSDV) and Dynamic Source Routing Protocol (DSR) use hop count as the quality metric [15]. Hop count has shown many shortcomings in the past studies which are the reason why shortest paths (resulted from the minimization of hop count) in ad hoc networks would not necessarily guarantee routes with the best quality (QoS) [16]. One of the major problems with hop count or many other metrics listed in [16] is that they encourage overutilization of a single route without considering congestion and buffer overflow problems; this results in some segments of the network being heavily loaded which creates bottlenecks, and as a result, the overall QoS performance of the network is affected. Unbalanced load distribution results in congestion of heavily loaded nodes, buffer overflow and finally increased end-to-end delay in the network [17]. Overly utilized paths cause exhaustion of network resources such as power, bandwidth and memory. Hence, load balancing is one of the major issues in ad hoc networks which is the focus of this paper. Load balancing is further expanded in the next section.

Background study, load balancing in ad hoc networks
Over the past, load balancing has been the focus of many researches involving ad hoc networks. As load balancing is a network-wide optimization and improvement mechanism, the solutions involving this area has mainly been implemented in the network layer of the OSI (Open Systems Interconnection) model. Given that network layer is responsible for managing the network-wide connectivity information, it is ideal for implementation of any load balancing algorithm. Routing protocols, as network layer agents, are responsible for computation of the network connectivity graph (taking into account the cost/benefit metrics) which would make them the most suitable candidates to hold the load balancing strategies. By taking load balancing strategies in the routes requested by the nodes in the network, a minimum acceptable QoS can be guaranteed in the entire network. In ad hoc networks, routing protocols operate in a distributed manner within each node without any direct interactions among them. Given that design of routing protocols are based on a distributed paradigm, load balancing algorithms have to operate under the same network assumptions. As a result, achievement of an overall network gain would be extremely challenging. The work of [17] has categorized routing protocols into the three categories of delay based, traffic based and hybrid based regarding their load balancing approaches. In the delay-based protocols, minimization of link delay has been identified to have a direct impact on the network-wide load balancing. The work of [18] proposes a new routing algorithm based on AODV (Ad hoc On-demand Distant Vector) so-called Load-Aware On-Demand Routing (LAOR); this work claims that by identifying small delay routes we can achieve balanced load conditions in the network; however, this work has not provided any results supporting the argument that the realized gains in end-to-end delay and packet delivery ratio are the result of this balanced load condition or vice versa. The works proposed in [19][20][21] use the traffic-based load balancing to achieve even load distribution in the network. As load is mainly generated by the application layer traffic, load balancing can be well achieved by distribution of traffic in the network. The work of [19] highlights that other traffic-aware load balancing algorithms use buffer size at each node to estimate the traffic load passing through that node. However, because packets buffered at each node can have different sizes, the buffer size alone cannot be used as a good estimator of load. On the other hand, as packets buffered at each node would possibly have different destinations, by analyzing the buffer as a whole a conclusive evaluation on the level of load cannot be achieved on that particular node. Hence, the author argues that it is more efficient to use the actual packet sizes in the queue and their generation rates to estimate the imposed load in the network. The work presented in [21], proposes a new on-demand routing algorithm so-called Load-Balanced Ad hoc Routing (LBAR) which attempts to achieve load balancing by circumventing congested segments of the network. It is shown that the proposed algorithm achieves higher packet delivery ratio (PDR) when compared to AODV and DSR. According to the study performed by [17], hybrid-based routing protocols perform load balancing by a combination of delay-based and traffic-based techniques. Content Sensitive Load-Aware Routing (CSLAR) [22] is one example of hybrid-based routing protocols. The work presented in [23] introduces a new routing protocol so-called Dynamic Load-Aware Routing (DLAR). DLAR is a reactive routing protocol that uses the buffer size of intermediate nodes as a performance metric for route discovery and computation phase. The main aim of DLAR is to choose routes with minimum cumulative buffer size. It is shown that DLAR achieves better PDR and end-to-end delay compared to the baseline protocol DSR. Another work in this area is Load-Aware Routing (LWR) [24] in which the author makes the argument that sometimes a detour of routes over the idle nodes can have significant positive impact on the performance of routing in ad hoc networks. The main idea behind LWR is that the heavily loaded nodes should opt-out of taking part in routing of data in the network by dropping route requests. In this way, the heavily loaded segments of the network go through a relaxation process which should gradually balance the load distribution in the network.
Stability routing is a category used in wireless sensor networks which has received interest in the past few years. The work of [25] proposes a reliability-based routing targeting underwater sensor networks; in this work, delay is considered to be of less importance than reliability of information delivery in the aforementioned networks. Location-Aware Routing Protocol (LARP) outperforms the existing routing protocols in terms of packet delivery ratio normalized routing overhead. This is achieved by utilizing the location information of nodes and a range finding technique. Another stability-based routing protocol is proposed in the work of [26] to target wireless sensor networks so-called ADCMCST. In this work, an approximation algorithm is used to minimize the child nodes in the discovered topology tree. It is shown that ADCMCST results reduced topology formation time, promising approximated results and an overall stable wireless sensor network.
One of the approaches to achieve load balancing in ad hoc networks is by multipath routing protocols. Multi-path routing protocols store multiple alternative paths for every source-destination pairs. The main idea is that utilization of the alternative routes can result distribution of network load. While the creation of multiple routing paths between any source-destination pair in the network has been proven to be beneficial in the context of wired networks, this scheme has been under debate for wireless networks. The analytical model presented in the work of [27] argues that, unless the alternative paths provided by multipath routing consists of a very large set, the gain achieved by load distribution is almost the same as single path shortest hop routing. As ad hoc networks are not particularly designed for large dense networks, having a large set of alternative paths is an infeasible assumption, and the conclusion is that multipath routing in a realistic ad hoc scenario would not result in effective load distribution.
LB-AODV implements a load-balanced version of AODV routing protocol [28]. Load balancing is performed by a distributed grouping mechanism which performs a logical division of mobile nodes into distinct groups. It is claimed that the grouping mechanism reduces the number of unnecessary retransmissions of routing messages, and by the distribution of source nodes among the groups, the relaying of packets is limited to each source node within its group. The grouping idea used in LB-AODV is based on the Zone Routing Protocol (ZRP) presented in [29].
Another approach in load balancing is to target the problem geometrically. The work presented in [30] uses a geometrical model to perform load balancing in the network. More specifically, it considers a particular case where nodes are located in a narrow strip with the width of at most 86% of communication range.
Another location-based load-balanced routing protocol is presented in [31], which is so-called LB 2 R. It uses a dual GH (grid header) routing scheme which balances the routing load among two GHs. It is claimed that this method improves queueing delay and congestion on heavily loaded nodes. However, the results do not show an improvement regarding load balancing.

Quantum game theory
Quantum game theory focuses on the design of games that maximizes players' utility enabled by the properties of entangled particles. This section concentrates on the entanglement of particles and the two scenarios where nodes in ad hoc networks can benefit from the properties of such quantum games. We explain quantum game theory, and after that, we discuss a quantum game that can be used for load balancing in ad hoc networks.

Rotation and quantum strategies
The focus of this section is to clarify the method by which quantum game theory benefits from quantum operators to suggest best strategies to players. It is worth noting that the main difference between classical game theory and quantum is that in quantum game theory, players can use entangled particles. Due to this unique difference, an explanation about entangled states and quantum operators is necessary to understand this section.
In general, entangled states are created when an additive physical property of two particles, e.g., their spin, is measured. The main characteristic of entangled particles is that measuring the physical property of one of the particles results in the other one to be reduced to a certain state. For instance, consider an entangled state comprised of two 1 2 -spin particles. Having knowledge about the spin of one particle is equivalent to knowledge of the other. This reduction to a certain state happens instantaneously regardless of the spatial distance between the two particles. It is worth noting that this process is not considered as a signaling mechanism. In other words, no information is transmitted between the two particles. This is addressed in quantum mechanics as non-locality whose existence was proven by Bell in 1964 [32].
To illustrate different parts of our theory, we limit ourselves to particles with spin of 1 2 . Our formulation can be easily generalized to the higher spin particles. This generalization is discussed in Sect. 4.3.2 for particles with spin 1. So, we consider specific entangled state of |↑↑ +|↓↓ √ 2 , which represents two entangled electrons with spins 1 2 . This particular case is the subject of interest for all of this section. Our game is comprised of two players. Suppose that one of these particles is available to player 1 and the other one is available to the other player. Each player can rotate their electron (as their particle) individually and independently.
Rotation operators in three dimensions can be parameterized by three angles denoted by θ, ϕ and α. For 1 2 -spin particles, the rotation operators have a 2 × 2 matrix representation. So, we may represent a rotation operator by U (θ, ϕ, α) with specific matrix shown in (1) to perform this rotation.
where in this matrix n i are the components of unit vectorn with polar coordinates of θ and ϕ. In fact, this is a rotation characterized by α aroundn vector, which has components shown in Spinor |↑ (|↓ ) has a matrix representation as 1 0 0 1 and rotating it by an operator can be calculated according to (3).
The result is: The same process can similarly be applied to |↓ . The absolute value of the coefficients powered by 2 determines the probability of obtaining each state after measuring the spin. Without loss of generality, the rotations around y-axis can be considered with utilizing, θ = π 2 and ϕ = π 2 . Suppose that U 1 π 2 , π 2 , α 1 and U 2 π 2 , π 2 , α 2 are the rotation operators used by players 1 and 2, respectively. The result of this rotation is shown in (5).
So it can be concluded that (6) represents the probability of obtaining |↑↑ , after measuring the spin of both particles.
The formulation developed above can be generalized for higher spin particles. Higher spins can be used for games with more available strategies. The formulation above is used in Sects. 4.3.1 and 4.3.2, for two fundamental network topologies to model the best quantum advices for players of the game.

Quantum advice and entangled opinions
In this section, we explain how quantum mechanics can be utilized to obtain advices which leads to improvement in network flow management. To do this, we define a game whose players are sender nodes in the network. If the sender nodes in the network choose a strategy that optimizes load balancing via the intermediate nodes either by providing more opportunistic intermediate nodes for other nodes in low traffic situation or balancing high traffic load on intermediate nodes, they win the game. As it was demonstrated in the previous section, quantum entanglement provides a tool which increases the win probability of players in comparison with classic scenarios.
It must be noted that the calculations involving quantum games depend on the network topology. However, there are techniques which can expand this idea to larger network topologies, but the concentration of this chapter is to proof the fundamental concept behind this novel idea. Hence, two simplified topologies of doublet and triplet are investigated. The reason for choosing such topologies is to firstly proof the concept of load balancing using quantum game theory and secondly the potential of these topologies to be generalized to more complex cases. The basic idea behind our theory is that entangled particles can be used for entangling opinions of two distant players (aka sender nodes). Hence, utilize this correlation to impact the decision of one player which leads to a reduced number of allowed choices in the other player of the game. With a lower number of available options, the other player will be forced to play toward satisfying the utility function represented in this work and achieve load balancing.
The formulation presented in the previous section can be used in a realistic network traffic management game to provide advice to the players to increase their win probability. In the Sects. 4.3.1 and 4.3.2, we will illustrate design of a traffic management game based on the proposed game theory and the calculations provided.

Doublet topology
Doublet topology is defined as a case where two relay nodes are shared among two distant senders to forward the data to two destination nodes. Since each sender node has two available next hop to route their data, we have utilized a 2-state particle entanglement scenario. Therefore, 1 2 -spin particles are used throughout this section. Initially, we need to develop our quantum game based on the doublet topology. At the starting point, let us consider two entangled particles with spin 1 2 have been produced. The state of the particles can be represented as |↑↑ +|↓↓ √ 2 . This state is known as one of the Bell's states (for a discussion on these states, see [33]) and considered as maximally entangled state [34]. In simple words, this means that highly entangled particles are considered, but this problem can only be solved by considering other entangled states. Let us assume that the first particle is given to player 1 and the second one to player 2. Now, we need to discuss how players could influence each other's decisions by using entangled particles and the rotational operators. Every player can independently Fig. 1 Doublet topology rotate its particle. Players 1 and 2 use the rotation operator U 1 (α 1 ) and U 2 (α 2 ) for rotating the particles allocated to them. Therefore, the expression for entangled state after players rotate their particles is based on (7).
The topology configuration of the doublet case is shown in Fig. 1. We will first go through the game aspect of this topology and then cover the quantum counterpart which is applicable to this network configuration. As shown in Fig. 1, let us consider node A and B as sender nodes and nodes G and H as a destination. This simple topology is setup so that nodes A and B have no direct access to the destination nodes G and H and any data transmission has to be relayed over the intermediate nodes C and D. In other words, A and B have two different routing paths to reach nodes G and H. We denote the links that connects any sender node to node C as +1 and the links that connects any of the sender nodes to node D as −1. Suppose that there are two categories of data transmissions, i.e., high bit rate (HBR) and low bit rate (LBR). We characterize the data emerging each node to have a probability of P; without loss of generality, one can suppose that P ≥ 0.5.
To complete the traffic game, we have to define a winning case for the players in the game. Toward this aim, a general network configuration should be taken into consideration. By taking actual concepts from traffic management in the topic of networks, we can come up with a winning scenario in our game. HBR data need considerably more channel capacity for a longer duration compared to LBR. As an LBR data transmission does not require high channel capacity, it can be considered as an opportunity to other HBR flows. On the other hand, from the energy consumption point of view, an LBR flow can be engineered to result in less relay node involvement to forward the data which leads to lower energy consumption. Every intermediate node consumes energy when forwarding data, and so to obtain more efficiency, we try to minimize their utilization under an LBR traffic. Additionally, an efficient use of intermediate nodes creates more transmission opportunities for the other nodes in the network.
Having the above factual information in mind, the rule of the game can be defined as follows. If at least one of sender nodes requires sending HBR data, it is more efficient to distribute the traffic evenly across the relay nodes to efficiently support the high demands of the HBR traffic. In contrast, to save energy and provide more relaying opportunities to other nodes in the network, it is best for the LBR traffic to be forwarded via the same relay nodes. Therefore, in the former case players win the game if they choose the opposite relays (which leads to different routing paths) and in the other case, they win by selecting the same relays to forward their data. To enable such game scenario, we will next explain how entanglement is capable of increasing the probability winning this game.
In the classical viewpoint, the best strategy, which maximizes win probability, is to choose different paths at all time (note that this is the result of supposing P ≥ 0.5). So, one of the players always uses the path +1 and the other one uses the path −1. This strategy has the win probability equals represented by (8).
The win probability is written by considering that the probability of HBR data-type emergence is equal to win probability (using different paths in the case of at least one sender node that is sending HBR data). In (8), P represents the emergence probability of HBR data in at least one of the sender nodes.
On the contrary to classical view, quantum entanglement is capable of increasing the win probability presented in (8). Under a quantum scenario, we consider the state function given by (7), which is obtained after operating rotations of U 1 and U 2 . Each player rotates its particle spin by θ H in the case of HBR traffic and by θ L otherwise. After rotation, each player selects its path based on the spin of its particle. A spin of + 1 2 results the path +1 to be taken, and a spin of − 1 2 leads to utilization of path −1.
Without loss of generality, we have assumed P = 1 2 for the rest of calculations provided in this section. So, the probability of emergence of HBR or LBR data equals 50%. This assumption is to be able to numerically calculate the value of the parameters in our model. However, any other values of P are also acceptable. Since each sender node may send two types of data (HBR and LBR), there are four different situations. Because we have assumed P = 1 2 , these situations happen with probability of 1 4 . When both sender nodes send HBR data, they both rotate the spin of their particles by α 1 = α 2 = θ H . In this situation, the nodes win if they chose opposite paths (different spins); so, the win probability in this situation equals the probability of observing either |↑↓ or |↓↑ . Considering (5), the win probability is sin 2 (θ H ). Similarly, when nodes A and B send LBR (HBR) and HBR (LBR) data, respectively, the win probability equals the probability of observing the same spins, i.e., sin 2 θ L +θ H 2 sin 2 θ H +θ L 2 .
In the situation where both nodes send LBR data, similar discussion and considering this point that the nodes win if they choose the same paths lead us to the win probability of cos 2 (θ L ). All of these situations happen with probability of 1 4 ; so, the win probability is the sum of all above-explained probability divided by 4. Finally, the expression given by (9) provides this probability.
The formula given by (9) represents the total probability for selection of opposite paths in case of at least one HBR data and the same paths otherwise. The main task here is to maximize (9) as a function of θ H and θ L to result the best values of them. Equation (9) results a maximum of 85% success that happens in the angles which are presented in (10).
Based on the above findings, we can design a routing protocol that incorporates the results of our game design. The main principles of this protocol are based on advices listed below which is given to each sender node in the network.
1. In the case of sending HBR data, rotate your particle spin by θ H , 2. In the case of sending LBR data, rotate your particle spin by θ L , 3. Measure the spin of your particle, 4. If you obtained + 1 2 (− 1 2 ), choose path +1 (−1). As it was mentioned before, the above routing protocol needs to be designed to maximize win probability. Route selection probabilities show very promising results for balancing the network load among the intermediate nodes. The probabilities for the situation where at least one of the nodes is sending HBR traffic are listed in (11).
Similarly, the probabilities for when both nodes send LBR traffic are listed in (12).
The probabilities resulted by the calculations above are symmetric which leads to a balanced distribution of load under an HDR traffic and opportunity creation (or lower power consumption) under an LDR scenario. The simulation study in Sect. 6 supports the gain achieved in the proposed theory under a doublet topology configuration.

Triplet topology
The same formulation that was developed for the scenario of doublet topology can be applied to the triplet topology. The main difference here is that the number of relay nodes to forward the traffic from source to destinations is three and based on that the formulation needs to be adapted to efficiently utilize the capability of the third relay node in the quantum game. The triplet topology is designed to illustrate further the mechanism by which the quantum game theory can be expanded to cover more complex topology cases. Toward this aim, the topology configuration of the triplet scenario is shown in Fig. 2.
As a result of addition of the third relay, source nodes A and B have three choices to relay their data to the destination nodes G and H. We have characterized the three routing paths to be +1, 0, −1. The same winning strategies that apply to the doublet topology is applied here as well. In the classical formulation, the maximum likelihood of winning for sender nodes (as quantum players) which results by a non-overlapping strategy is 75%.
To model this problem using the quantum game theory, we need to consider three accessible intermediate paths which require a 3-state spin (particles with spin of 1). For this case, rotation matrix can be formulated according to (13).
Similar to doublet case, a quantum entangled state comprised of two 1-spin particles needs to be considered. To violate the Bell inequalities and be able to benefit from the quantum states, we have focused on the state formulated by (14).
Similar to the previous doublet topology, suppose that two types of data (HBR and LBR) traffic can emerge at each sender node with probability of 1 2 . Using the state function in (14) and rotation operator presented in (13), the winning probabilities can be calculated. Similar to the previous case, the advisors need to tell their players to rotate their particles by θ H , α H , ϕ H (θ L , α L , ϕ L ) in the case of HBR (LBR) transmission. After formulation of the win probability and maximization of it as a function of θ H , α H , ϕ H , θ L , α L , ϕ L , the angles in the optimum point are obtained and listed in (15).
When sender nodes rotate the spin of their particles by above angles, the joint paths are chosen by following probabilities in different situations in which sender nodes send different traffic loads. In Table 1, HL means node A sends HBR and node B sends LBR data. For the angle values listed in (15), the P win is calculated to be 91%. Hence, utilization of entangled particles can increase the probability of winning by 16% compared to classical methods. Similar to the doublet topology, the probabilities of choosing opposite paths are symmetric in the triplet topology which can theoretically lead to load balancing at the intermediate relay nodes. This claim is supported by the simulation study of this theory provided in Sect. 6. In the case of triplet topology, the quantum advice is as stated below.
1. In the case of sending HBR data, rotate your particle spin by θ H , α H , ϕ H , 2. In the case of sending LBR data, rotate your particle spin by θ L , α L , ϕ H , 3. Measure the spin of your particle, 4. The result of your spin measurement decides which path to take.
Theoretically under the triplet topology, the probability of win is increased by 16% compared to the classical methods.

Ad hoc load balancing problem definition
As mentioned earlier, the problem targeted by this work is load balancing in ad hoc networks. As it was elaborated in Sect. 3, load balancing is one of the major challenges in ad hoc networks. The work presented in this paper and the simulation followed by it is to introduce an entirely novel load balancing technique using quantum game theory as explained in Sect. 4. Furthermore, incorporate this load balancing algorithm into a fully functional routing protocol. The focus of this section is to define the problem of load balancing from the authors' point of view.
One of the cases in ad hoc networks where load balancing is critical is when there exist some relay nodes among source/destination pairs and the relaying of traffic is shared among them. An example of such case which has been studied in this work is shown in Fig. 1, where source nodes A and B share relay nodes C and D to forward their traffic to destination nodes G and H.
Balance distribution of network load among relay nodes C and D has a direct impact on end-to-end delay, packet jitter, throughput, network stability and connectivity. Current conventional ad hoc routing protocols do not take load balancing into account which is the motivation of this paper in targeting this problem. Referring to Fig. 1, in the current ad hoc routing protocols source nodes A and B randomly choose relay nodes C and D as their next hop route without considering the level of traffic load that is being sent by them. Under high network load conditions, this would result in unbalance distribution of load among the relay nodes. The unbalanced relaying of data packets creates random queues at relay nodes which result relatively high end-to-end delays. On the other hand, under heavy network load conditions, packets perform random switching among free and busy relays which result unstable packet jitters. Additionally, depending on the network load, long queues at relay nodes can cause buffer overflows which affect packet delivery ratio (PDR) as well as throughput. Hence, we can conclude that balance distribution of network load among relay nodes can have a great impact on QoS related measures.

OLSR routing protocol as the baseline of implementation
The importance of balanced relaying of the network traffic forwarded by relay nodes is extensively studied in this work. Via simulation studies, we have shown that balance relaying of the network traffic among the relays can directly impact and improve QoS factors such as end-to-end delay and jitter in the network. As it was explained in Sect. 3, routing protocols are the most suitable agents to implement load balancing algorithms. Toward this aim, OLSR [35] is used as the base routing protocol to implement our load balancing algorithm. OLSR is a proactive routing protocol which proactively uses signaling mechanisms to create and update the network topology graph. The load-balanced routing protocol implemented by this work is so-called quantum load balanced-OLSR (QLB-OLSR). One of the reasons why OLSR was the choice of the routing protocol in this work is that the primary requirement of the load balancing mechanism presented in this paper is to have the full network topology graph. Having full network graph is necessary for identification of the segments of the network where quantum load balancing (QLB) can be applied. The identification process consists of evaluating whether a number of relay nodes are common among the source/destination pairs.

QLB-OLSR simulations and results
In this section, we used a simulation study to analyze the performance of the proposed joint load balancing and routing algorithm (QLB-OLSR). The simulations were implemented using OMNET++ Discrete Event Simulator.

Simulation setup and assumptions
We consider two cases of load balancing for the simulation study, one with 2 relay nodes and the other with 3 relays. The network topology under study by this work is shown in Fig. 3. The topology shown in this figure is the 3-relay topology setup, whereas in the case of 2-relay setup node E is eliminated. We have setup node A and node B as source nodes which have node G and node H as a destination. In the case of 2-relay study, node C and node D are the only relays to forward the traffic flow to the destination. However, node E is added to this setup as the third relay.
To be able to evaluate the performance of QLB-OLSR accurately, we have defined two traffic types of high and low. The low load traffic produces constant bitrate (CBR) at the rate of 10 Kbps, and the high load traffic is generated at the rate of 1 Mbps. Under a realistic network environment, source nodes may randomly change their traffic load. As the target of this work is to evaluate the performance of the protocol under the worst-case scenario, this behavior has been simulated using a random scheduling mechanism which randomly switches the traffic load between high and low at every t seconds. t is set to be 10s in this work. Hence, at every 10 s, the source node 5 and node 6 would randomly and independently switch their application layer traffic between 10kbps and 1Mbps. This helps us evaluate the convergence time of the QLB-OLSR to changes in the network traffic and mainly its effect on the QoS factors.
The simulation assumptions used in this work are listed below: (1) All nodes are equipped with IEEE 802.11 WLAN interfaces (2) Sender nodes have quantum entanglement capability (3) Sender nodes have spin rotation and measurement capability Points 2 and 3 of the simulation assumptions are necessitated by the quantum game theoretical approach used in this work.

Simulation parameters
OMNET++ was used as the simulation platform to implement and evaluate the performance of QLB-OLSR. The simulation was left to run for 9000 s. To improve confidence level in the results and reduce the error, the results are averaged over 50 simulation runs with different seed sets. CBR traffic was used as the application layer traffic in this work. Furthermore, User Datagram Protocol (UDP) was used as the transport layer protocol. The reason for this choice was that UDP does not have an automatic re-transmission mechanism (as opposed to TCP which does), and this would help us highlight the actual performance of our algorithm. Additionally, IPv4 was used as the network layer protocol. As it was mentioned before, IEEE 802.11g was the choice of MAC and PHY layer protocol due to popularity in the research community. All the simulation parameters are listed in Table 2.

Simulation results
In this section, we have summarized the simulations results and discussed the performance of QLB-OLSR based on them. The results are reported in two sections of 2-relay and 3-relay study to be able to focus separately on the performance of QLB-OLSR under these two scenarios. The focus of our simulation result analysis is based on, throughput balance, jitter and end-to-end delay which as it was elaborated in Sect. 5 are the most important QoS factors.

2-Relay simulation study
In this section, we have compared the performance of baseline OLSR routing algorithm with the QLB-OLSR, which implements the load balancing algorithm introduced Thermal noise −110 dBm by this work. The performance comparison is based on three metrics, throughput unbalanced factor, end-to-end delay and jitter.

Throughput unbalanced factor (TUF)
To be able to analyze the balance distribution of throughput better over the relay nodes, we have defined a metric called throughput unbalance factor (TUF). Throughput is measured at the relay nodes to represent the balance of load distribution among them.
The measured throughput is a function of time which then by division of that with the total throughput that is being relayed by all relays we can calculate normalized throughput parametrized as T h N (t) in (16). D is the distribution factor which, as shown in (17), has an inverse relationship with the number of relay nodes n in our  (18), by subtracting D from T h N (t) we can evaluate TUF (t). Hence, TUF is a measure of how unbalance the traffic load is distributed over the relays with taking the perfect load balancing D as reference measure. The lower the value of TUF represents better load balancing and better performance.
The box plot shown in Fig. 4 compares the TUF of the baseline OLSR routing protocol to the quantum case which simply is the QLB-OLSR. In the result section of this work, quantum is used to refer to the QLB-OLSR routing algorithm. As shown in Fig. 4, we have achieved 89% gain in the mean value of TUF in the quantum case when compared to baseline.
Furthermore, it was measured that 50% hinge spread of TUF samples in quantum case also had an 89% gain when compared to baseline OLSR. Figure 5 visualizes the same data as shown in Fig. 4, using a time plot. We can clearly conclude that in the 2-relay scenario, not only we have achieved significant gain in load balancing among the relay nodes but the statistical spread of TUF has improved considerably. It is important to note that the TUF reported here is averaged over the 2 relays.

End-to-end delay
End-to-end delay for both baseline and quantum cases are visualized using the box plot in Fig. 6. It can be observed that the end-to-end delay performance is nearly the same when comparing the case of quantum with baseline. Given that the number of hops between the source/destination pairs in the simulation study performed in this  End-to-end delay, 2-relay work is very limited, we do not expect to see any significant improvements in terms of end-to-end delay in the 2-relay scenario. It is only under a large network topology with multiple hops in the routing paths that QLB-OLSR could show performance improvement regarding end-to-end delay

Jitter
Jitter is considered as one of the most important QoS factors. The performance of the baseline protocol has been compared with the quantum case in Fig. 7 QLB-OLSR has achieved 13% gain compared to the baseline OLSR. Additionally, there is a 14% stability gain obtained when comparing the proposed quantum case with the baseline. It must be noted that a 14% jitter gain in the small topology simulated in this work indicates that the load balancing performed by the QLB-OLSR algorithm can result in a significant improvement in large network scenarios.

Throughput unbalanced factor
The box plot which is shown in Fig. 8 compares the performance of QLB-OLSR against the baseline OLSR routing protocol under a 3-relay scenario. Based on our measurement, there is a 50% mean gain when comparing the newly proposed algorithm against the baseline. The stability gain of the protocol is measured at 66% which shows stable load balancing consistency under a 3-relay scenario as well. Under this scenario, the theoretically calculated gain based on the quantum game strategies is lower than the 2-relay scenario. Hence, it can be concluded that the simulation results are in line with the theoretical analysis on the quantum load balancing performed in Sects. 4.3.1 and 4.3.2. The time graph shown in Fig. 9 visualizes the performance comparison of the QLB-OLSR algorithm against baseline. This graph also confirms the performance gains achieved by the proposed protocol.

End-to-end delay
When we look at the end-to-end delay performance of the QLB-OLSR compared to baseline in Fig. 10, we can see 21% improvement in the mean delay of the proposed algorithm compared to the baseline. We can also report a significant 29% stability gain in the proposed algorithm. As opposed to the 2-relay scenario where the performance of the proposed algorithm is similar to the baseline, in the case of the 3-relay, we can observe a significant gain. Due to the lack of any load balancing mechanism in the baseline OLSR, the performance drops significantly under a 3-relay scenario. However, the QLB-OLSR algorithm performs a fair load distribution across all relays and reduces the probability of unbalanced queues at relays which leads to lower endto-end delay as well as better stability in the measured performance. The stability of end-to-end delay has a direct impact on the QoS in the chosen paths; hence, it would directly affect the quality of routes computed in the network.

Jitter
The box plot which is shown in Fig. 11 compares the performance of the QLB-OLSR algorithm against the baseline OLSR based on jitter delay. As it was mentioned before, jitter is one of the most important QoS factors in any network which affects the quality of services provided in the application layer. The mean gain in the performance of the quantum algorithm was measured at 29% compared to the baseline OLSR. Furthermore, the stability gain is at 26% which proofs that the load balancing algorithm has a better jitter consistency compared to the baseline protocol.

Conclusion
In this paper, we have evaluated performance of quantum game-based approach to load balancing. First, we formulated the problem of load balancing in ad hoc networks under the umbrella of quantum game theory. We then showed that the synchronization of entangled particles can be used to affect the decision-making process of distant players without transmission of any information. This enabled us to formulate the problem of load balancing in ad hoc networks using the novel concept of quantum game theory. Hence, the weakness of backpressure algorithm in performing fair load distribution was targeted by the synchronization properties of entangled particles. We also discussed that the physical states of a system need to be in violation of the bell inequalities for it to be considered under a quantum paradigm. The larger accessible space of states in a quantum system can be used to maximize a pre-defined utility function. We formulated the utility function of the quantum games based on the problem of load balancing in ad hoc networks. In order to be able to implement and analyze our theory, we harmonized the problem of load balancing with the quantum strategies resulted by the theoretical analysis of this work. The proposed theory was implemented in the OLSR routing algorithm as the baseline of the implementation. The so-called QLB-OLSR routing protocol was thoroughly analyzed based on simulation studies, and a significant performance gain was reported. The simulation study in this chapter confirms the expected performance gain in the theoretical analysis of the quantum load balancing. The 2-relay and 3-relay scenarios presented in this work stand as proof of concepts for the proposed theory which shows promise as a solution to the problem of load balancing in ad hoc networks. In a CR-MANETs environment with multiple SOPs, the load balancing can result even more gain due to the added capacity. The work presented in this presents a novel new perspective to target load balancing and stands as a proof of concept to our proposed theory. To apply QLB algorithm to larger more complex networks, a generalized quantum game theoretical analysis regardless of the number of relay nodes is required, which involves extremely complex quantum state calculations. Expansion of the QLB algorithm to larger network scenarios is considered as the future work of this research. Furthermore by applying the QLB algorithm to MANETs which support mobility, it is expected to get more stable routes in such networks.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Traffic-based load balancing
Our quantum game for load balancing has been designed based on the level of application layer traffic. There are two types of traffic defined in this work, one representing a high network load and the other a low network load. Based on these two categories of traffic the quantum game defines two strategies, one being load balancing and the other resource conservation. The logic behind defining these two strategies is that under a low load condition the traffic can be relayed over one common relay node which results conservation of the other common relay nodes resources. On the other hand, under heavy load, its best to evenly distribute the traffic over the common relay nodes based on the reasons explained in Sect. 5. The probabilities listed in Sect. 4 are calculated based on the quantum game theory and entanglement to achieve success in the strategies defined in our quantum game.

Quantum load balancing reality versus simulation
One of the main assumptions in our proposed load balancing algorithm is that nodes have quantum entanglement and spin rotation and measurement capability. The load balancing strategies proposed based on game theory in this work, highly depends on the properties of quantum entanglement. It is only with the properties of entangled particles that distant nodes can affect the decision-making process of each other. However under the simulation environment, quantum entanglement is not available to sender nodes. To treat this in our simulation, we have used the final results for probabilities of selecting joint paths by both sender nodes. In fact, if sender nodes use the quantum advices mentioned in Sect. (4.3), the probability of selecting different paths is given by these probabilities. It must be noted that we use these probabilities that are the results of our theoretical analysis provided in this work to force sender nodes select paths like when they utilize the quantum advices presented in Sect. (4.3). In reality, there is not any capability for saying sender nodes to choose appropriate paths in different situations. In reality sender nodes use entangled particles to affect the other sender nod's strategy. Using entangled particles by sender nodes results they choose the appropriate paths by probabilities obtained in Sect. (4.3) without sending any information about what path they selected for sending data. Instantaneous Load Balancing One of the main challenges faced in the implementation of the quantum load balancing is the assumption that source nodes which share common relays, start their transmission instantaneously. Looking back at Fig. 3, quantum load balancing game is theoretically defined with the assumption that source nodes A and B would always have data packets to be sent and for every packet that is being sent by source node A there is another packet being sent at the exact same time by node B. With this assumption, the probability of choosing either relay node C or D as the next hop would depend on the values listed in Sect. 4. However this assumption is impractical under a realistic network environment where nodes can start and end their transmission at different times; this is resulted by the fact that packets may experience random delays which makes synchronization of their transmission time almost impossible and impractical.
To address this problem, we came up with the idea of periodic time scheduling in order to create and cache the probability distributions over a short time interval t. In a simulation environment, probabilities are managed by generation of random numbers and matching their outcome space to the value of the intended probability. The idea is that at every time interval t, a new random number is generated and cached to be used by source nodes 5 and 6 during the next time interval defined as t. During this time the source nodes use the cached value of the random number to implement the probabilities.

QLB algorithm under simulation environment
As it was explained before the simulation-based implementation of the QLB algorithm is slightly different to real functionality of our proposed algorithm. Under the simulation environment the probabilities which is the result of the theoretical analysis of quantum game theory are used to simulate our algorithm.
In Section VII.A, the topology identification process for a condition with the potential for quantum load balancing was elaborated. This mechanism enables our algorithm to identify the potential relays for applying the QLB algorithm. The QLB algorithm requires two inputs from the node to be able to perform load balancing. One of which is the destination node where the data packet is being sent to and the other is the current application layer transmission data rate. The application layer data rate and the destination nodes help the algorithm to find a match in quantum probabilities listed in Sect. 4. This step is just in simulation environment and does not happen in reality. Algorithm 1 is the pseudocode for the QLB algorithm that is implemented by this work. The algorithm starts at line 1 with an IF Statement checking listener call from application layer for data transmission, as soon as this listener gets activated the QLB procedure gets executed. The listener call carries the object appDataReq. At line 2, while there are data to be sent in the appDataReq object, the algorithm needs to evaluate whether load balancing can be performed, hence the while-loop iterates. Initially the destNode is extracted from the appDataReq object which as explained before, it is one of the inputs required to perform the QLB algorithm. As it was explained in the Section VII.A, QLB algorithm performs topology matching to identify the potential topologies where load balancing can be applied. The hasCommRelay method in line Algorithm 1. Quantum load balancing (QLB) algorithm 1: if (appDataReq.ListenerC all() == True) then 2: while (appDataReq.data() == True) do 3: destN ode ← appDataReq.dest() 4 nxtH opRely ← ... 14: ... 3RelayP robT able.probReq(destN ode, 15: appDataRate, chachRandN um) 16: end if 17: end if 18: routeAppData(appDataReq.data.getC urr(), 19: nxtH opRely) 20: else 21: routeAppData(appDataReq.data.getC urr(), 22: OLS RGetN xtH op(destN ode)) 23 At line 5, the data rate of the application layer traffic is extracted from the app-DataReq object, hence the application layer is required to attach the current traffic data rate with the traffic request objects. As it was elaborated in Section 0, a quantum cached probability scheduling mechanism is implemented by this work to virtually simulate the game defined by quantum load balancing. At line 6 the value of this cached probability is requested by reqCurrCachRandNum method and stored in chachRand-Num. At line 7 and 12 the two conditions of 2 and 3 common relay cases are checked. Based on the number of common relays (2 or 3) the appropriate QLB probability tables will be used to find the next hop relay for routing of the application data packet. At line 9 and 14, the probReq method is called on the appropriate data set utilizing the objects destNode, appDataRate and chachRandNum; these three are the inputs required to match a next hop relay in the appropriate QLB probability table. Finally, at line 18, using the routeAppData method the nxtHopRely is used to route the current data packet from the appDataReq object. Going back to line 4, if there is no common relay between the destination and the current node, at line 21, the data packet would be routed using the normal OLSR routing algorithm.
Based on QLB algorithm, when there are application layer data packets at source nodes, quantum entanglement and game theoretical strategies are used to manage the traffic relaying among the source/destination nodes which share 2 or 3 common relays. In case of high load traffic the algorithm tries to maximize even distribution of the traffic flow among relay nodes. On the other hand, under a low load traffic, by maximizing usage of only one of the relays the other node's resources are conserved. The logic behind QLB algorithm is that high load traffic flows can benefit more from traffic distribution compared to low load traffic flows.