## 5 Game-Theoretical Routing Scheme for Video-Streaming in MANETs
### Paths' Benefits Computation  
We have designed the value of the benefit of a path to be proportional to the subjective video quality perceived by the user regarding the video frames received from that path. In this work, we use the MOS (Mean Opinion Score) as a measure of the subjective QoS.  
Accordingly, we define the following equations to compute the benefits of the best and medium-quality paths, \(\phi_{b}\) and \(\phi_{m}\), respectively:  
\[\phi_{b}=k_{b}\cdot MOS_{b}\;\;and\;\;\phi_{m}=k_{m}\cdot MOS_{m} \tag{23}\]  
where \(k_{b}\) and \(k_{m}\) are constants, \([k_{b}\;,\;k_{m}]\in\mathbb{R}^{*}\).  
Notice that \(k_{b}\) and \(k_{m}\) cannot equal zero because in this case, \(\phi_{b}\) and \(\phi_{m}\) would be zero too, which means that both paths would not satisfy the QoS parameters (see Equation (12)). The first condition for a path to be used by the sources is Equation (12); otherwise that path would not be taken into consideration.  
Substituting Equation (23) in Equation (20), we get  
\[\hat{\phi}_{b}=\frac{\phi_{b}}{J_{b}}=\frac{k_{b}\cdot MOS_{b}}{J_{b}}\;\;and \;\;\;\hat{\phi}_{m}=\frac{\phi_{m}}{J_{m}}=\frac{k_{m}\cdot MOS_{m}}{J_{m}} \tag{24}\]  
Next, using Equation (24) in Equation (22) we have this expression for the best response probability, \(p_{i}^{*}\):  
\[p_{i}^{*}=\frac{\left(\frac{k_{b}\cdot MOS_{b}}{J_{b}}\right)\cdot\hat{n}_{b} +\left(\frac{k_{m}\cdot MOS_{m}}{J_{m}}\right)\cdot(2-\hat{n}_{m})}{2\cdot \left(\frac{k_{b}\cdot MOS_{b}}{J_{b}}+\frac{k_{m}\cdot MOS_{m}}{J_{m}}\right)} \tag{25}\]  
Let \(\frac{k_{b}}{k_{m}}=k_{b/m}\). As \(k_{m}\) is different from zero, we can divide the whole equation Equation (25) by \(k_{m}\). After substituting, we obtain the Nash Equilibrium strategy for player \(i\):  
\[p_{i}^{*}(k_{b/m})=\frac{\left(\frac{k_{b/m}\cdot MOS_{b}}{J_{b}}\right)\cdot \hat{n}_{b}+\left(\frac{MOS_{m}}{J_{m}}\right)\cdot(2-\hat{n}_{m})}{2\cdot \left(\frac{k_{b/m}\cdot MOS_{b}}{J_{b}}+\frac{MOS_{m}}{J_{m}}\right)} \tag{26}\]We designed \(U_{i}\) to be a concave function, so that there is one \(p^{*}\) value where \(U_{i}\) is on its maximum value. Due to that, \(\frac{\partial^{2}U_{i}}{\partial^{2}p_{i}}\) must be less than zero. This way, deriving Equation (21) we obtain:  
\[\frac{\partial^{2}U_{i}}{\partial^{2}p_{i}}=-2\cdot\left(\hat{\phi}_{b}+\hat{ \phi}_{m}\right) \tag{27}\]  
As we need that \(\frac{\partial^{2}U_{i}}{\partial^{2}p_{i}}<0\),  
\[\hat{\phi}_{b}+\hat{\phi}_{m}>0\ \ ;\ \ \forall\ \ [\phi_{b},\ \phi_{m}]\in\ \ \mathbb{R}^{*},\ \ \ [J_{b},\ J_{m}]\in\ \ \mathbb{R}^{*}_{+} \tag{28}\]  
Concluding, if player \(i\) adopts the strategy to send his/her (I+P) frames through the best path with a certain probability that equals \(p^{*}_{i}\) (see Equation (26)), his/her own benefit and the whole benefit of the network will be the highest.  
All values needed to compute \(p^{*}_{i}\), except \(k_{b/m}\), can be obtained during normal network operation from the feedback information given by the RTCP packets. This way, users will update the probability \(p^{*}_{i}\) with the current QoS parameters carried in the last received RTCP packet. Thus, \(k_{b/m}\) is the single pending parameter to be obtained in Equation (26). In the next section, we will give a method to calculate analytically this parameter.