1 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 general 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.

2 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.

2.1 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.

2.2 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.

2.3 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.

3 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 multi-path 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 \(\hbox {LB}^{2}\hbox {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.

4 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.

4.1 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 \(\frac{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 \(\frac{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 \(\frac{\left| {\uparrow \uparrow } {\rangle }\right. +\left| {\downarrow \downarrow } {\rangle }\right. }{\sqrt{2}}\), which represents two entangled electrons with spins \(\frac{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 \(\theta , \varphi \) and \(\alpha \). For \(\frac{1}{2}\)-spin particles, the rotation operators have a \(2\times 2\) matrix representation. So, we may represent a rotation operator by \(U\left( {\theta , \varphi , \alpha } \right) \) with specific matrix shown in (1) to perform this rotation.

$$\begin{aligned} U\equiv R_\alpha \left( {\hat{n}} \right) =\left( \begin{array}{ll} {\cos \left( {\frac{\alpha }{2}} \right) -i\, n_z \sin \left( {\frac{\alpha }{2}} \right) } &{} {\left( {-i\, n_x -n_y } \right) \sin \left( {\frac{\alpha }{2}} \right) } \\ {\left( {-i\, n_x +n_y } \right) \sin \left( {\frac{\alpha }{2}} \right) }&{} {\cos \left( {\frac{\alpha }{2}} \right) +i\, n_z \sin \left( {\frac{\alpha }{2}} \right) } \\ \end{array}\right) \end{aligned}$$

where in this matrix \(n_i\) are the components of unit vector \({\hat{n}}\) with polar coordinates of \(\theta \) and \(\varphi \). In fact, this is a rotation characterized by \(\alpha \) around \({\hat{n}}\) vector, which has components shown in

$$\begin{aligned} n_x= & {} \sin \left( \theta \right) \cos \left( \varphi \right) ,\nonumber \\ n_y= & {} \sin \left( \theta \right) \sin \left( \varphi \right) ,\nonumber \\ n_z= & {} \cos \left( \theta \right) \end{aligned}$$

Spinor \(\left| \uparrow {\rangle }\right. (\left| {\downarrow {\rangle })} \right. \) has a matrix representation as \(\left( {{\begin{array}{l} 1 \\ 0 \\ \end{array} }} \right) \quad \left( {\left( {{\begin{array}{l} 0 \\ 1 \\ \end{array} }} \right) } \right) \) and rotating it by an operator can be calculated according to (3).

$$\begin{aligned} U\left| \uparrow {\rangle }\right. =R_\alpha \left( {{\hat{n}}} \right) \left( {{\begin{array}{l} 1 \\ 0 \\ \end{array} }} \right) =\left( \begin{array}{ll} {\cos \left( {\frac{\alpha }{2}} \right) -i\, \cos \left( \theta \right) \sin \left( {\frac{\alpha }{2}} \right) } \\ {-i\sin \left( \theta \right) e^{i\varphi }\sin \left( {\frac{\alpha }{2}} \right) } \\ \end{array}\right) \end{aligned}$$

The result is:

$$\begin{aligned} U\left| \uparrow {\rangle }\right. =\left( {\cos \left( {\frac{\alpha }{2}} \right) -i\cos \left( \theta \right) \sin \left( {\frac{\alpha }{2}} \right) } \right) \left| \uparrow {\rangle }\right. +\left( {-i\sin \left( \theta \right) e^{i\varphi }\sin \left( {\frac{\alpha }{2}} \right) } \right) \left| \downarrow {\rangle }\right. \end{aligned}$$

The same process can similarly be applied to \(\left| \downarrow {\rangle }\right. \). 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, \(\theta =\frac{\pi }{2}\) and \(\varphi =\frac{\pi }{2}\).

Suppose that \(U_1 \left( {\frac{\pi }{2}, \frac{\pi }{2},\alpha _1 } \right) \) and \(U_2 \left( {\frac{\pi }{2}, \frac{\pi }{2},\alpha _2 } \right) \) are the rotation operators used by players 1 and 2, respectively. The result of this rotation is shown in (5).

$$\begin{aligned} U_1 U_2 \left( {\frac{\left| {\uparrow \uparrow } {\rangle }\right. +\left| {\downarrow \downarrow } {\rangle }\right. }{\sqrt{2}}} \right)= & {} \frac{1}{\sqrt{2}}\left( \cos \left( {\frac{\alpha _1 +\alpha _2 }{2}} \right) \left| {\uparrow \uparrow }{\rangle } \right. \right. \nonumber \\&\left. -i\sin \left( {\frac{\alpha _1 +\alpha _2 }{2}} \right) \left| {\uparrow \downarrow {\rangle } -i} \right. \sin \left( {\frac{\alpha _1 +\,\alpha _2 }{2}} \right) \left| \downarrow \uparrow {\rangle }\right. \right. \nonumber \\&\left. \left. +\cos \left( {\frac{\alpha _1 +\alpha _2 }{2}} \right) \left| {\downarrow \downarrow } {\rangle }\right. \right. \right) \end{aligned}$$

So it can be concluded that (6) represents the probability of obtaining \(\left| {\uparrow \uparrow } {\rangle }\right. \), after measuring the spin of both particles.

$$\begin{aligned} \frac{1}{2}\left| {\cos \left( {\frac{\alpha _1 +\alpha _2 }{2}} \right) } \right| ^{2} \end{aligned}$$

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.

4.2 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.

4.3 Quantum load balancing game design

4.3.1 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, \(\frac{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 \(\frac{1}{2}\) have been produced. The state of the particles can be represented as \(\left( {\frac{\left| {\uparrow \uparrow } {\rangle }\right. +\left| {\downarrow \downarrow } {\rangle }\right. }{\sqrt{2}}} \right) \). 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 rotate its particle. Players 1 and 2 use the rotation operator \(U_1 \left( {\alpha _1 } \right) \) and \(U_2 \left( {\alpha _2 } \right) \) for rotating the particles allocated to them. Therefore, the expression for entangled state after players rotate their particles is based on (7).

$$\begin{aligned} \left| \psi {\rangle }\right. =U_1 U_2 \left( {\frac{\left| {\uparrow \uparrow } {\rangle }\right. +\left| {\downarrow \downarrow }{\rangle } \right. }{\sqrt{2}}} \right) \end{aligned}$$

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\ge 0.5\).

Fig. 1
figure 1

Doublet topology

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\ge 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).

$$\begin{aligned} P_\mathrm{win}^\mathrm{Classic} =1-\left( {1-P^{2}} \right) \end{aligned}$$

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 \(\theta _H \) in the case of HBR traffic and by \(\theta _L \) otherwise. After rotation, each player selects its path based on the spin of its particle. A spin of \(+\frac{1}{2}\) results the path \(+1\) to be taken, and a spin of \(-\frac{1}{2}\) leads to utilization of path \(-1\).

Without loss of generality, we have assumed \(P=\frac{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=\frac{1}{2}\), these situations happen with probability of \(\frac{1}{4}\).

When both sender nodes send HBR data, they both rotate the spin of their particles by \(\alpha _1 =\alpha _2 =\theta _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 \(\left| {\uparrow \downarrow } {\rangle }\right. \) or \(\left| {\downarrow \uparrow } {\rangle }\right. \). Considering (5), the win probability is \(\sin ^{2}\left( {\theta _H } \right) \). 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}\left( {\frac{\theta _L +\theta _H }{2}} \right) \left( \sin ^{2}\left( {\frac{\theta _H +\theta _L }{2}} \right) \right) \). 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}\left( {\theta _L } \right) \). All of these situations happen with probability of \(\frac{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.

$$\begin{aligned} P_\mathrm{win}^\mathrm{Quantum} =\frac{1}{2}\left( {\sin ^{2}\left( {\frac{\theta _L +\theta _H }{2}} \right) +\frac{1}{2}\left( {\cos ^{2}\left( {\theta _L } \right) +\sin ^{2}\left( {\theta _H } \right) } \right) } \right) \end{aligned}$$

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 \(\theta _H \) and \(\theta _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).

$$\begin{aligned} \theta _H= & {} 292.5\nonumber \\ \theta _L= & {} 202.5. \end{aligned}$$

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. 1.

    In the case of sending HBR data, rotate your particle spin by \(\theta _H \),

  2. 2.

    In the case of sending LBR data, rotate your particle spin by \(\theta _L \),

  3. 3.

    Measure the spin of your particle,

  4. 4.

    If you obtained \(+\frac{1}{2}(-\frac{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).

$$\begin{aligned} P\left( {+1,-1} \right)= & {} \% 42.5\nonumber \\ P\left( {-1,+1} \right)= & {} \% 42.5,\nonumber \\ P\left( {+1,+1} \right)= & {} \% 7.5,\nonumber \\ P\left( {-1,-1} \right)= & {} \% 7.5 \end{aligned}$$

Similarly, the probabilities for when both nodes send LBR traffic are listed in (12).

$$\begin{aligned} P\left( {+1,-1} \right)= & {} \% 7.5\nonumber \\ P\left( {-1,+1} \right)= & {} \% 7.5,\nonumber \\ P\left( {+1,+1} \right)= & {} \% 42.5,\nonumber \\ P\left( {-1,-1} \right)= & {} \% 42.5 \end{aligned}$$

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.

4.3.2 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.

Fig. 2
figure 2

Triplet topology

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).

$$\begin{aligned}&U\left( {\theta , \varphi , \alpha } \right) \nonumber \\&\quad = \left( \begin{array}{ccc} {\frac{1}{2}e^{-i\left( {\alpha +\varphi } \right) }\left( {1+\cos \theta } \right) }&{} {-\frac{1}{\sqrt{2}}e^{-i\left( \alpha \right) }\left( {\sin \theta } \right) }&{} {\frac{1}{2}e^{-i\left( {\alpha -\varphi } \right) }\left( {1-\cos \theta } \right) } \\ {\frac{1}{\sqrt{2}}e^{-i\left( \varphi \right) }\left( {\sin \theta } \right) }&{} {\cos \theta }&{} {-\frac{1}{\sqrt{2}}e^{-i\left( {-\varphi } \right) }\left( {\sin \theta } \right) } \\ {-\frac{1}{2}e^{-i\left( {-\alpha +\varphi } \right) }\left( {1-\cos \theta } \right) }&{} {\frac{1}{\sqrt{2}}e^{-i\left( {-\alpha } \right) }\left( {\sin \theta } \right) }&{} {\frac{1}{2}e^{-i\left( {-\alpha -\varphi } \right) }\left( {1-\cos \theta } \right) } \\ \end{array} \right) \nonumber \\ \end{aligned}$$

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).

$$\begin{aligned} \left| {\psi {\rangle }_{in}}\right.= & {} 0.60\left( {{\begin{array}{l} 1 \\ 0 \\ 0 \\ \end{array} }} \right) \left( {{\begin{array}{l} 1 \\ 0 \\ 0 \\ \end{array} }} \right) +0.65\left( {{\begin{array}{l} 0 \\ 1 \\ 0 \\ \end{array} }} \right) \left( {{\begin{array}{l} 0 \\ 1 \\ 0 \\ \end{array} }} \right) +0.47\left( {{\begin{array}{l} 0 \\ 0 \\ 1 \\ \end{array} }} \right) \left( {{\begin{array}{l} 0 \\ 0 \\ 1 \\ \end{array} }} \right) \nonumber \\= & {} 0.60\left| {+1,+1{\rangle }+0.65\left| {0,0{\rangle } +0.47\left| {-1,-1}{\rangle } \right. } \right. } \right. \end{aligned}$$

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 \(\frac{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 \(\theta _H ,\alpha _H ,\varphi _H \) (\(\theta _L ,\alpha _L ,\varphi _L )\) in the case of HBR (LBR) transmission. After formulation of the win probability and maximization of it as a function of \(\theta _H ,\alpha _H ,\varphi _H ,\theta _L ,\alpha _L ,\varphi _L \), the angles in the optimum point are obtained and listed in (15).

$$\begin{aligned} \theta _H= & {} 142.6 \quad \theta _{L} =81.7\nonumber \\ \alpha _H= & {} 60.0 \quad \alpha _L =340.2\nonumber \\ \varphi _H= & {} 27.1 \quad \varphi _L =244.7 \end{aligned}$$

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_{\text {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.

Table 1 Joint probabilities for path selection by sender nodes in triplet topology

In the case of triplet topology, the quantum advice is as stated below.

  1. 1.

    In the case of sending HBR data, rotate your particle spin by \(\theta _H , \alpha _H , \varphi _H \),

  2. 2.

    In the case of sending LBR data, rotate your particle spin by \(\theta _L , \alpha _L , \varphi _H \),

  3. 3.

    Measure the spin of your particle,

  4. 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.

5 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.

5.1 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.

6 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.

6.1 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 \(\Delta t\) seconds. \(\Delta t\) is set to be 10s in this work.

Fig. 3
figure 3

3-Relay simulation setup

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. (1)

    All nodes are equipped with IEEE 802.11 WLAN interfaces

  2. (2)

    Sender nodes have quantum entanglement capability

  3. (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.

6.2 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.

6.3 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.

Table 2 Simulation parameters

6.4 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 by this work. The performance comparison is based on three metrics, throughput unbalanced factor, end-to-end delay and jitter.

6.4.1 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 \(Th_N \left( t \right) \) 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 simulation setup. As shown in (18), by subtracting D from \(Th_N \left( t \right) \) we can evaluate \(\mathrm{TUF} \left( t \right) \). 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.

$$\begin{aligned} Th_N \left( t \right)= & {} \frac{\text{ Throughput }\left( t \right) }{\text{ Total }\_ \text {Throughput}} \end{aligned}$$
$$\begin{aligned} D= & {} \frac{1}{n} \end{aligned}$$
$$\begin{aligned} \mathrm{TUF}\left( t \right)= & {} \left| {Th_N \left( t \right) -D} \right| \end{aligned}$$

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.

Fig. 4
figure 4

Throughput unbalanced factor, 2-relay (box plot)

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.

Fig. 5
figure 5

Throughput unbalanced factor, 2-relay (time plot)

6.4.2 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 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

Fig. 6
figure 6

End-to-end delay, 2-relay

6.4.3 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.

Fig. 7
figure 7

Jitter, 2-relay

6.5 3-Relay simulation study

6.5.1 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.

Fig. 8
figure 8

Throughput unbalanced factor, 3-relay (box plot)

Fig. 9
figure 9

Throughput unbalanced factor, 3-relay (time plot)

6.5.2 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 end-to-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.

Fig. 10
figure 10

End-to-end delay, 3-relay

6.5.3 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.

Fig. 11
figure 11

Jitter, 3-relay

7 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.