# Quantum Game Application to Recovery Problem in Mobile Database
## 3 Quantum Game-Based Recovery Model
### Recovery Modeling Using Quantum Game
#### 3.2.3 Build Payoff Matrix
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Player**} & \multicolumn{4}{c}{**Player 3 Hybrid Method (Strategy \(k\))**} \\ \cline{2-6}  & \multicolumn{4}{c}{**Player 2 Mobile Agent Method**} \\ \hline \multirow{4}{*}{
\begin{tabular}{c} Player 1 \\ Log Management Method \\ \end{tabular} } & Strategy & \(t_{1}\) & \(t_{2}\) & \(\ldots\) & \(t_{h}\) \\ \cline{2-6}  & \(s_{1}\) & \((a_{111},\,\,b_{111},c_{11k})\) & \((a_{121},\,\,b_{121},c_{12k})\) & \(\ldots\) & \((a_{11k1},\,\,b_{11k},c_{11k})\) \\ \cline{2-6}  & \(s_{2}\) & \((a_{211},\,\,b_{211},c_{21k})\) & \((a_{221},\,\,b_{221},c_{22k})\) & \(\ldots\) & \((a_{221},\,\,b_{221},c_{2 nk})\) \\ \multicolumn{2-6}{c}{\(\ldots\)} & \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\ldots\) \\ \multicolumn{2-6}{c}{\(s_{m}\)} & \((a_{m11},\,\,b_{m11},c_{m1k})\) & \((a_{m21},\,\,b_{m21},c_{m2k})\) & \(\ldots\) & \((a_{m1k},\,\,b_{m1k},c_{mik})\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The bi-matrix for three players’ game. expressing the percentage of recovery work completed (\"recovery completion\") for each strategy (\(DONE\_PROB_{i}\)). 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:  
\[if\left\{ \begin{array}{rcl}\text{C}_{1,i}\in\left]0.1,0\right]&u_{i}=6\\ C_{1,i}\in\left]0.5,0.1\right]&u_{i}=4\\ C_{1,i}\in\left]0.9,0.5\right]&u_{i}=2\\ C_{1,i}\in\left]1,0.9\right]&u_{i}=0\\ C_{1,i}\in\left]2,1\right]&u_{i}=-2\\ C_{1,i}\in\left]5,2\right]&u_{i}=-4\end{array} \right., \tag{3}\]  
where \(C_{1,i}=TIME_{i}\) is the time required to execute a strategy. \(C_{2,i}=MEMO_{i}\), 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:  
\[if\left\{ \begin{array}{rcl}\text{C}_{2,i}\in\left]500,0\right]&u_{i}=6\\ C_{2,i}\in\left]1000,500\right]&u_{i}=4\\ C_{2,i}\in\left]1500,1000\right]&u_{i}=2\\ C_{2,i}\in\left]2000,1500\right]&u_{i}=0\\ C_{2,i}\in\left]2500,2000\right]&u_{i}=-2\\ C_{2,i}\in\left]4000,2500\right]&u_{i}=-4\end{array} ,\right. \tag{4}\]  
Finally, when calculating the completion level of the recovery process, \(C_{3,i}=DONE\_PROB_{i}\), where \(DONE\_PROB_{i}\) 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:  
\[if\left\{ \begin{array}{rcl}\text{C}_{3,i}\in\left]20\%,0\right]&u_{i}=1\\ C_{3,i}\in\left]40\%,20\%\right]&u_{i}=2\\ C_{3,i}\in\left]60\%,40\%\right]&u_{i}=3\\ C_{3,i}\in\left]80\%,60\%\right]&u_{i}=4\\ C_{3,i}\in\left]100\%,80\%\right]&u_{i}=5\end{array} \right. \tag{5}\]