**2. State-of-the-Art**

In recent years, mobile application failure recovery has grown in popularity. The suggested solutions use checkpointing, logging, or a combination of the two, while taking into account the inherent constraints of the mobile computing environment. Much research is based on a distributed uncoordinated checkpointing method, in which several MHs may achieve a globally consistent checkpoint without depending on coordination messages. Others presented a checkpointing-only method, which offers globally consistent checkpoints without requiring additional communications but is unique in that it uses time to synchronize checkpoint creation.

The authors of [22] described a technique for mobile database applications to recover from checkpointing and logging failures depending on mobility. Current methods use periodic checkpoints that are not dependent on user mobility. This system initiates checkpoints only after a certain number of mobility handoffs has occurred. The failure, log arrival, and mobility rates of the mobile host determine the optimum threshold. This enables modification of the checkpointing rate on a per-user basis. Additionally, depending on the checkpoint frequency, the last checkpoint may be situated a considerable distance from the mobile support station (MSS). Additionally, a significant number of logs across several MSSs may be scattered, resulting in a lengthy recovery time.

The authors of [23] suggested a technique for recovering applications in a mobile computing environment by combining movement-based checkpoints with message recording. A node's adaptability is used to decide if a checkpoint should be taken. This method was developed using a variety of factors, including the number of MH registrations in an area, the number of regions, and the number of handoffs. This approach is especially beneficial in large networks with many areas. In contrast, operating in restricted areas may result in extra expenses.

The authors of [24] developed a rollback recovery method that prioritized separate checkpoints and message recording. The algorithm is unique in that it manages message logs and checkpoints through mobile agents. Additionally, if a mobile node travels a grea<sup>t</sup> distance from its most recent checkpoint, the agents are able to move the checkpoint and message logs stored in distant mobile service stations. Thus, the time needed to retrieve a mobile node would never exceed a specified threshold. It is feasible to keep just one checkpoint in permanent storage by recording messages. The main advantage of this study is the modest size of the message log, which cannot be very large owing to the network's low message substitution rate. Additionally, if a process interacts often, it may decrease its checkpointing interval. Nonetheless, this method occurs in a small number of situations, resulting in increased network activity during recovery. Specifically, if the length of the mobility profile exceeds the number of different mobile service stations at any point, the logs must be consolidated into a single place.

The authors in [25] prepared a proposal for a contemporary checkpointing method that is suitable for mobile computing systems. This method is characterized by its dependability and efficiency in terms of time-space overhead associated with checkpointing and normal application execution. The work presented in [26] suggested a log managemen<sup>t</sup> and lowlatency no-blocking checkpointing system that utilizes a mobile-agent-based architecture

to reduce recovery time. By decreasing the amount of messages sent, this protocol reduced recovery time. On the contrary, particularly when many agents are needed, it may result in an increase in complexity, which may absorb some of the extra execution costs.

The authors of [27] developed a log managemen<sup>t</sup> strategy for mobile computing systems that substantially lowers the total cost of failure recovery when compared to existing lazy and pessimistic approaches. Additionally, their approach enables recovery from a base station different than the one where it failed, lowering handoff costs, log replication costs, and the time required to recover from failure. The main benefit of their log managemen<sup>t</sup> method is its ease of implementation, whereas the primary drawback is likely the recovery time if the home agen<sup>t</sup> is situated a grea<sup>t</sup> distance from the mobile unit [28,29]. The authors of [30] described a recovery technique that is database and mobile device synchronization-dependent. As a consequence, the replication process guarantees that all organizations have consistent data. One drawback of this method is that, although it utilizes hash functions, it does not guarantee data integrity during transmission to the server, since both ends store the hash values in a database table.

#### *The Need to Extend the Related Work*

According to the review, the following are the current areas of research: (1) The majority of recovery studies employed a variety of techniques, including log management, checkpointing, movement-based checkpointing, and an agent-based logging scheme; (2) Because these techniques are so dissimilar, one cannot be used in place of another; this means that each algorithm has a distinct parameter set and different assumptions; (3) Despite the fact that some plans tried to merge several methods into a single contribution (hybrid method), they were damaged by the difficulties of selecting the optimal fusion from this pool of options. As a consequence, recovery costs may be high and the recovery mechanism may be excessively complicated; (4) The majority of schemes did not include environmental variables as influencing elements in the recovery process; and (5) As the demand for network applications grows, researchers are continuously developing new ways to solve the issue of high mobility or network connection loss owing to a variety of new or changing conditions. Thus, more fault-tolerant methods are needed to guarantee the continued functioning of mobile devices. As a consequence of the above, the use of recovery algorithms is constrained in a realistic manner. It is essential to design a plan that maximizes success via the selection of the most suitable recovery methods for the present situation. We selected quantum game theory over conflict analysis or interactive decision theory, as it enables us to compare the recovery possibilities available.

#### **3. Quantum Game-Based Recovery Model**

#### *3.1. Mobile System Architecture*

In a typical MDS design, a small database fragment is created from the main database on the MH. This design is meant to handle the accessibility limitations alleviated by MHs and mobile satellite services (MSS). If the MH is present in the cell serviced by the MSS, it may interact directly with another MH in the vicinity. The MH may freely move between cells, which each include a base station (BS) and a large number of MHs. Additionally, the BSs configured the stations to act as a wireless gateway, allowing them to communicate with the MHs and send data via the wireless network. Wireless communication is possible between the MHs and the BS, but not directly with the database server [11,31]. Figure 2 depicts the mobile system's architecture.

#### *3.2. Recovery Modeling Using Quantum Game*

The suggested method differs from prior MDS recovery attempts in that it takes into account a variety of important variables in the mobile environment during handoffs or service failures, which change depending on the situation, while conventional recovery algorithms are predicated on specific assumptions about the environment and operate accordingly.

**Figure 2.** Mobile System Architecture.

The primary reasons for extending our prior work's two-player game to three players in this article are as follows: (1) reliance on a limited number of algorithms lowers the possibility of making good decisions, since it is possible for one of the algorithms to permanently dominate decision-making; (2) Allowing a greater number of algorithms to join the competition increases the efficacy of decision-making under a variety of environmental circumstances; (3) With a rise in the number of players, different degrees of complexity and mathematical calculations were used to address the recovery issue, resulting in enhanced capabilities for the proposed task; and (4) Several algorithms performed poorly in the present study, despite their success in earlier work. Thus, when the performance of certain algorithms deteriorated, they were eliminated from the competition; nevertheless, the entrance of others with superior results resulted in a substantial increase in performance, which is the purpose of presenting this study. The suggested model's architecture is shown in Figure 3. The following table (Table 1) summarizes the game assumptions utilized in the recovery modeling process.



Cooperative game theory (CGT) and non-cooperative game theory (NCGT) are two subfields of game theory. CGT elucidates how agents compete and cooperate to generate and capture value in unstructured interactions. NCGT simulates agents' activities, maximizing their usefulness based on a comprehensive description of each agent's motions and information. Cooperative games are ones in which players are convinced to follow a certain strategy via player dialogue and agreement. A strategy is a detailed plan of action that a player will follow in response to a variety of situations that may occur over the course of the game. On the other hand, non-cooperative games are ones in which participants select their own strategy of profit maximization. The main distinguishing feature is the absence of external authority to establish norms guaranteeing cooperative behavior. Without external authority (such as contract law), participants are unable to form coalitions and must compete alone [14,15].

**Figure 3.** The Proposed MDS Recovery Model.

Non-cooperative games are often studied by trying to predict players' tactics and payoffs, as well as by finding Nash equilibria. Each player in NE is assumed to be aware of the other players' equilibrium tactics, and no one benefits from merely changing their strategy. If each player has chosen a strategy–a collection of actions based on previous game events—and no person can increase their expected payoff by changing their strategy while the other players retain theirs, then the current set of strategy choices characterizes NE.

The suggested game is modeled by static games with complete information, in which players simultaneously choose strategies and ge<sup>t</sup> rewards depending on the combination of actions taken. These types of games may be formalized using a normal-form representation [14]. This is a simple decision issue in which both players choose their actions concurrently (static game) and are rewarded for their mutual choices. Additionally, each player is fully aware of the values associated with his adversary's reward functions (complete information). The interrelationships of game theory are shown in Figure 4; for more information, see [14,15].

**Figure 4.** Game Theory Interrelationship Diagram.

3.2.1. Recovery Algorithms and Its Parameters

To demonstrate the technical importance of the system recovery model in the MDS, we evaluated the most widely used MD recovery algorithms in order to decide which methods should be explored further. We classified the recoverable algorithms in this situation according to their operation or features. As stated in [9–13], various groups differ in their approach to recovery. For our proposal, we selected three recovery protocols: log monitoring (as player 1) [27], mobile agen<sup>t</sup> (as player 2) [24], and a hybrid method that combined movement-based check-pointing and message recording as a (as player 3) [22]. Because the real problem is not whether to adopt one of the well-known recovery techniques, but rather which strategy is most appropriate in light of the changes imposed by the operational environment, which is often unclear and changing. In this regard, the current research will ensure that the optimal recovery method is selected via the use of game theory and its essential variables.

To compete against other players, each player must create a set of strategies. To develop these methods, feature analysis and extraction are used for each chosen recovery procedure in order to determine the treatment's most strongest characteristics. Thus, in game theory, each selected protocol is defined by a player, and the way each protocol's variable is utilized determines the player's strategies. For instance, the first protocol (player 1) considered a variety of factors, including the log arrival rate, the handoff rate, the average log size, and the mobility rate. To summarize, the first player method involves retrieving the log file that was stored in the BS before to the failure, moving it to a new location linked to another BS, and updating the MH. The second protocol (player 2) makes extensive use of variables, including the number of processes in the checkpoint, a handoff threshold, and the length of the log. The second approach reduced recovery time by using a framework based on mobile agents. Here is a collection of processes in a list format. The home agent's list is included in the MH. The mobile agen<sup>t</sup> traveled beside the MH and relayed information. The third process takes into account a variety of factors, including the total number of registrations in the area, the total number of regions, and the overall number of hand-offs. The work environment is split into several zones, and the checkpoint is only used once when MH enters and exits the region. For further information on how these protocols work, see [13–27].

It should be emphasized that any number of strategies for each player (protocol) may be produced by conducting any number of trials with various parameter values, although this increases the model's complexity. As a result, we believe it is important to choose several methods that reflect varying degrees of performance that may be depended upon in decision-making. To create the parameters for the necessary recovery algorithms using game theory as a decision-making method, we first apply the chosen protocols to the chosen key variables on which each protocol is reliant. Each algorithm is used for real database transactions in order to assess each player's strategy. A package is assessed that has an objective function for the total cost of recovery, which is computed differently for each method. In game theory, we build the payoff matrix for each protocol output value based on the previous stages. These outcomes are referred to as the utility or reward of each player. These payoffs or benefits are used to evaluate a player's level of satisfaction in a conflicting scenario.

In general, game theory may be summarized as follows: (1) a set of players (the negotiation algorithms chosen); (2) a pool of strategies for each player (the strategies take into account the assumed values of significant coefficients in each protocol, as well as possible environmental changes); and (3) the benefits or payoffs (utility) to any player for any possible list of the players' chosen strategies. It should be noted here that any number of strategies can be generated for each player (protocol) by running any number of experiments using different parameter values, but this of course increases the model's complexity. Therefore, we consider it best to choose a number of strategies to express different degrees of performance levels that can be relied upon in decision-making. In the suggested game-based recovery model, the assumption is that each player utilizes pure strategy and not a mixed one, as each strategy handles specific protocol parameters, and these parameters differ from one protocol to another. There are no general parameters used for all protocols. For pure strategies, it is far easier to obtain multiple solutions (of course if they exist) for the NE, and then select the best fitting one.

#### 3.2.2. Build Knowledge Base

The suggested recovery model is predicated on the establishment of a knowledge base after the pre-implementation of each chosen recovery procedure in various simulated settings. The implementation knowledge base is created just once, and it is used to choose the optimal protocol based on the reward matrix and dominant equilibrium method. The decision is done here on the basis of the integration of three utility functions that serve as performance and evaluation benchmarks for the candidate protocols.

3.2.3. Build Payoff Matrix

In the proposed model's game, see Table 2, a finite collection of players *N* = 3 was used. Three players are allocated *P*1, *P*2, and *P*3 in the three-player game. *P*1 selects pure strategies from *S*1, *P*2 selects pure strategies from *S*2, and *P*3 selects pure strategies from *S*3. If *P*1 chooses the pure strategy *i*, *P*2 chooses *j*, and *P*3 chooses *k*, then the reward to *P*1 is *aijk*, *P*2 chooses *bijk*, and *P*3 chooses *cijk*. Define the *S*1 × *S*2 × *S*3 payoff "cubes" *A*, *B*, and *C* as [32,33]:

$$A = \begin{bmatrix} a\_{\bar{i}\bar{j}k} \end{bmatrix} \in R^{S1 \times S2 \times S3}, \mathcal{B} = \begin{bmatrix} b\_{\bar{i}\bar{j}k} \end{bmatrix} \in R^{S1 \times S2 \times S3}, \mathcal{C} = \begin{bmatrix} c\_{\bar{i}\bar{j}k} \end{bmatrix} \in R^{S1 \times S2 \times S3} \tag{1}$$

We create a matrix for each of player 3's actions (strategies); accordingly, player 1 selects a row, player 2 selects a column, and player 3 selects a table. Table 3 illustrates the bi-matrix for a three-player game with its payoff. As a result, each third player strategy *k* is represented separately in a matrix together with its associated reward in terms of player 1 and player 2's strategies. Here, *a*111 represents the payoff value for player 1's plan or strategy given the return function *<sup>u</sup>*1(*<sup>s</sup>*1, *t*1, *c*1) if (*<sup>s</sup>*1, *t*1, *c*1) is selected, *b*111 denotes the payoff value for player 2's strategy provided the reward function *<sup>u</sup>*2(*<sup>s</sup>*1, *t*1, *c*1) if (*<sup>s</sup>*1, *t*1, *c*1) is chosen, and *c*111 denotes the payoff value for player 3's strategy with payoff function *<sup>u</sup>*3(*<sup>s</sup>*1, *t*1, *c*1). The proposed recovery model's game is a non-cooperative game in which all participants choose their own tactics in order to maximize their profit [15, 32,33]. These kinds of games are amenable to formalization via the use of normal-form representations [34]. In a normal-form game, player *i*'s strategy *S i* strictly trumps player i's strategy *S i*if and only if:

$$\mathcal{U}\_{i}\left(\mathcal{S}\_{i}^{\prime\prime},\mathcal{S}\_{-i}\right)\geq\mathcal{U}\_{i}\left(\mathcal{S}\_{i\prime}^{\prime},\mathcal{S}\_{-i}\right)\tag{2}$$

for every list of *S*−*<sup>i</sup>* of the other players that represents all players' strategies except player *i*.

**Table 2.** The symbols used for description game theory model.




Calculating the payoff in a game is complicated since it is dependent on the actions of other players. As a result, the strategy chosen by one player has an effect on the gain value of the other player. Three utility functions are included in this proposal as performance and assessment benchmarks for the candidate protocols. The functions are as follows: the amount of time consumed by the protocol during operation (*TIMEi*) for each strategy, the amount of memory consumed during operation (*MEMOi*) for each strategy, and the rate expressing the percentage of recovery work completed ("recovery completion") for each strategy (*DONE*\_*PROBi*). The point of this step is to determine the reward that the player will gain if its strategy wins according to the mobile environmental conditions. Since all players are assumed to be rational, they make their preferred decisions that maximize their rewards (payoff). Consequently, one player's strategy dominants another player's strategy if it always provides a greater payoff to that player regardless of the strategy played by the opposing player. Therefore, it is very important to determine the method of calculating the return for each player's strategy. Therefore, the aim of these functions is to evaluate every strategy by calculating an index (score) that represents its performance. Every function contains degrees to distinguish the better performance of each strategy with high degrees against the lower performance of all the utility functions.

After analyzing and executing the protocols, it was determined that each algorithm operates within a time range of 0 to 5 s, implying that the value of the return function from the time measurement would be distributed as follows:

$$\begin{cases} \begin{array}{ll} \mathcal{C}\_{1,i} \in \left[0.1,0\right] & u\_i = 6\\ \mathcal{C}\_{1,i} \in \left[0.5,0.1\right] & u\_i = 4\\ \mathcal{C}\_{1,i} \in \left[0.9,0.5\right] & u\_i = 2\\ \mathcal{C}\_{1,i} \in \left[1,0.9\right] & u\_i = 0\\ \mathcal{C}\_{1,i} \in \left[2,1\right] & u\_i = -2\\ \mathcal{C}\_{1,i} \in \left[5,2\right] & u\_i = -4 \end{array} \end{cases} \tag{3}$$

where *C*1,*i* = *TIMEi* is the time required to execute a strategy. *C*2,*i* = *MEMOi*, in the same context, is the amount of memory used by each protocol for a given strategy. The memory used during execution is expected to be between 0 and 4000 KB; therefore, the payoff values for the memory consumed by any strategy will be as follows:

$$\begin{cases} \begin{array}{c} \text{C}\_{2,i} \in [1500, 0] \\ \text{C}\_{2,i} \in [1000, 500] \\ \text{C}\_{2,i} \in [1500, 1000] \\ \text{C}\_{2,i} \in [2000, 1500] \\ \text{C}\_{2,i} \in [2500, 2000] \\ \text{C}\_{2,i} \in [2500, 2000] \\ \text{C}\_{2,i} \in [4000, 2500] \end{array} \end{cases} \quad \begin{array}{c} \boldsymbol{u}\_{i} = \boldsymbol{6} \\ \boldsymbol{u}\_{i} = \boldsymbol{4} \\ \boldsymbol{u}\_{i} = \boldsymbol{2} \\ \text{O} \end{array} \tag{4}$$

Finally, when calculating the completion level of the recovery process, *C*3,*i* = *DONE*\_*PROBi*, where *DONE*\_*PROBi* is utilized to determine if recovery occurred in accordance with the handoff rates threshold. As a result, the value of the possible return measure for this work ranges from 0% to 100% and is distributed as follows:

$$\begin{cases} \begin{array}{c} \text{C}\_{3,i} \in \left[ \, 20\%, 0 \right] \\ \text{C}\_{3,i} \in \left[ \, 40\%, 20\% \right] \\ \text{C}\_{3,i} \in \left[ \, 60\%, 40\% \right] \\ \text{C}\_{3,i} \in \left[ \, 80\%, 60\% \right] \\ \text{C}\_{3,i} \in \left[ \, 100\%, 60\% \right] \end{array} \quad \begin{array}{c} \mu\_{i} = 1 \\ \mu\_{i} = 2 \\ \mu\_{i} = 3 \\ \mu\_{i} = 4 \\ \mu\_{i} = 5 \end{array} \end{array} \tag{5}$$

#### 3.2.4. Quantum Nash Equilibrium for Selection

Thus, the player's overall gain in this game is equal to the sum of the reward values associated with the variables ( *C*1,*i*, *C*2,*i*, *<sup>C</sup>*3,*i*). The ultimate solution may be obtained in one of two ways: (1) by achieving a single and exclusive dominant equilibrium method in the game, or (2) by using NE [15]. The strategies produced via the first method, dubbed iterated elimination of strictly dominated strategies, reflect the optimal actions that each player might rationally take, and therefore comprise the game's (rational) solution. Regrettably, this alluring approach yields no prediction at all for some kinds of situations in which no strategy survives the elimination phase. In this situation, it is unclear which course of

action would be deemed reasonable and best. This is a unique game in which there are no absolutely dominant strategies.

NE is a game theory concept that determines the optimal result in a non-cooperative game in which each player has little incentive to change his or her initial strategy. Under the NE, a player wins nothing by departing from their initial strategy, guaranteeing that the strategies of the other players stay constant as well. A game may include several NE states or none at all [35]. Unfortunately, the majority of games lack dominating strategies. Thus, if there are many solutions (more than one NE) to a given issue, the alternative is to find another handling mechanism. To address this issue, all values in the payoff matrix are subject to an addition or subtraction mechanism based on one of the critical factors, such as execution time, so that more points may be awarded to the quickest element and vice versa (normalization and reduction phase). Finally, the updated payoff matrix is utilized to identify a more optimal solution (Pure Nash) that matches the various environmental factors.

Since all players are assumed to be rational, they make their preferred decisions which maximize their rewards. Consequently, one strategy for a player is dominant over another strategy for another player if it always provides a greater payoff to that player regardless of the strategy played by the opposing player. Therefore, it is very important to determine the method of calculating the return for each strategy for each player. A particular algorithm is selected when its strategy achieves the highest NE in the reward matrix.

In contrast to the classical situation, where the theory is incapable of making any unique prediction, the application of quantum formalism will show a new property: the emergence in entangled strategies of a NE reflecting the unique solution to the game. In the quantum version of this three-player game, players execute their strategies by applying the identity operators they possess with probability *p*, *q*, and *r* to the starting quantum state, respectively. The three players apply the inversion operator *σ* with probability (1-*p*), (1-*q*), and (1-*r*). If *ρin* in is the density matrix corresponding to the initial quantum state, then the final state after players have implemented their strategies is [17,18].

$$\rho\_{fin} = \sum\_{\mathcal{U}=I,\mathcal{r}} P(H\_A)P(H\_B)P(H\_C)H\_A \otimes H\_B \otimes H\_C\\\rho\_{in}H\_A^\dagger \otimes H\_B^\dagger \otimes H\_B^\dagger \tag{6}$$

where either *I* or *σ* may be used as the unitary and Hermitian operator *H*. *<sup>P</sup>*(*HA*), *<sup>P</sup>*(*HB*), and *P*(*HC*) are the probability that players *A*, *B*, and *C*, respectively, will apply the operator *H* to the initial state. *ρin* is a convex combination of all quantum processes. Assume the arbitrator creates the following pure initial quantum state with three qubits (two strategies for each player for simplicity):

$$\begin{aligned} \left| \psi\_{in} \right\rangle &= \sum\_{i,j,k=1,2} \mathbb{C}\_{ijk} \left| ijk \right\rangle\\ \sum\_{i,j,k=1,2} \left| \mathbb{C}\_{ijk} \right| ijk \Big|^2 &= 1 \end{aligned} \tag{7}$$

where the quantum state's eight basis vectors are |*ijk* for *i*, *j*, and *k* equal to one and two. The starting state may be thought of as a global state (in a (2 ⊗ 2 ⊗ 2)-dimensional Hilbert space) of three quantum two-state systems or 'qubits'. The unitary operators *I* and *σ* are used by the player with conventional probability *ρin* included into its strategic.

As a consequence, rather of considering just a discrete and finite set of strategies, we will now consider their linear superposition by endowing the strategic space with the formal structure of a Hilbert space. As a result, pure quantum strategies may be constructed, which are characterized as linear combinations of pure classical strategies with complex coefficients. This must be interpreted as the probability of using a single pure classical method. It is worth noting that this interpretation of pure quantum strategies is identical to the classical concept of a mixed strategy introduced previously, because we are currently considering a restricted class of games (static games), which lacks typical quantum interference effects between amplitudes [36,37].
