# Wireless Networks under a Backoff Attack: A Game Theoretical Perspective
## 5 Game Theory Analysis of the CSMA/CA Problem When \(N_{p}=2\)
### Correlated Equilibrium Solution to the CSMA/CA Game  
The CSMA/CA game can be solved using the CE concept. The equilibrium condition (20) becomes:  
\[\begin{split}\sum_{a_{2}=\{s,ns\}}\phi(a_{2}|d)u_{1}(d,a_{2})& \geq\sum_{a_{2}=\{s,ns\}}\phi(a_{2}|d)u_{1}(nd,a_{2})\\ \sum_{a_{2}=\{s,ns\}}\phi(a_{2}|nd)u_{1}(nd,a_{2})& \geq\sum_{a_{2}=\{s,ns\}}\phi(a_{2}|nd)u_{1}(d,a_{2})\\ \sum_{a_{1}=\{d,nd\}}\phi(a_{1}|s)u_{2}(s,a_{1})& \geq\sum_{a_{1}=\{d,nd\}}\phi(a_{1}|s)u_{2}(ns,a_{1})\\ \sum_{a_{1}=\{d,nd\}}\phi(a_{1}|ns)u_{2}(ns,a_{1})& \geq\sum_{a_{1}=\{d,nd\}}\phi(a_{1}|ns)u_{2}(s,a_{1})\end{split} \tag{21}\]  
Replacing the payoffs from (13), (21) becomes:  
\[\begin{split}\alpha_{c}\phi(s|d)-\alpha_{f}\phi(ns|d)& \geq-\alpha_{m}\phi(s|d)+0\phi(ns|d)\\ -\alpha_{m}\phi(s|nd)+0\phi(ns|nd)&\geq\alpha_{c} \phi(s|nd)-\alpha_{f}\phi(ns|nd)\\ -\beta_{c}\phi(d|s)+\beta_{s}\phi(nd|s)&\geq 0\phi(d|s)+0 \phi(nd|s)\\ 0\phi(d|ns)+0\phi(nd|ns)&\geq-\beta_{c}\phi(d|ns)+ \beta_{s}\phi(nd|ns)\end{split} \tag{22}\]  
We know that the following is satisfied:  
\[\phi(a|b)=\frac{\phi(a\cap b)}{\phi(b)}\qquad\phi(a\cap b)=\phi(b\cap a) \tag{23}\]  
We simplify (22) using (23). We use the following shorthand notation: \(\phi_{11}=\phi(nd\cap s)\), \(\phi_{12}=\phi(nd\cap ns)\), \(\phi_{21}=\phi(d\cap s)\) and \(\phi_{22}=\phi(d\cap ns)\). Observe that this is the joint distribution probability, considering that the first subscript refers to the pure action of the server, and the second, to the pure action of the client. We also consider that pure action \(1\) for the server is \(nd\), and pure action \(2\), \(d\); for the client, \(s\) will be its pure action \(1\) and \(ns\) its pure action \(2\). Using all this, (22) becomes:  
\[\begin{split}-\alpha_{m}\phi_{11}+0\phi_{12}&\geq \alpha_{c}\phi_{11}-\alpha_{f}\phi_{12}\\ \alpha_{c}\phi_{21}-\alpha_{f}\phi_{22}&\geq- \alpha_{m}\phi_{21}+0\phi_{22}\\ \beta_{s}\phi_{11}-\beta_{c}\phi_{21}&\geq 0\phi_{11}+0 \phi_{21}\\ 0\phi_{12}+0\phi_{22}&\geq\beta_{s}\phi_{12}-\beta_{c }\phi_{22}\end{split} \tag{24}\]  
where we assumed that \(\phi(nd)>0\), \(\phi(d)>0\), \(\phi(s)>0\) and \(\phi(ns)>0\). By taking into account that all \(\alpha\) and \(\beta\) parameters are greater than \(0\) (that is, \(\alpha\), \(\beta\in(0,+\infty)\)), and also restraining \(\phi\) to be a valid distribution, we obtain the following simplified equilibrium conditions from (24):  
\[\begin{split}\phi_{11}\phi_{22}&=\phi_{12}\phi_{21} \\ \frac{\beta_{s}}{\beta_{c}}&=\frac{\phi_{22}}{\phi_{1 2}}\\ \frac{\alpha_{c}+\alpha_{m}}{\alpha_{f}}&=\frac{ \phi_{22}}{\phi_{21}}\\ \phi_{11}+\phi_{12}+\phi_{21}+\phi_{22}&=1\\ \phi_{ij}&\geq 0,\quad i=\{1,2\},\quad j=\{1,2\}\\ \alpha,\beta\in(0,+\infty)\end{split} \tag{25}\]The system in (25) has only one solution:  
\[\begin{split}\phi_{11}&=\frac{\alpha_{f}}{\alpha_{c}+ \alpha_{m}+\alpha_{c}}\frac{\beta_{c}}{\beta_{c}+\beta_{s}}\qquad\phi_{12}= \frac{\alpha_{c}+\alpha_{m}}{\alpha_{c}+\alpha_{m}+\alpha_{c}}\frac{\beta_{c}} {\beta_{c}+\beta_{s}}\\ \phi_{21}&=\frac{\alpha_{f}}{\alpha_{c}+\alpha_{m}+ \alpha_{c}}\frac{\beta_{s}}{\beta_{c}+\beta_{s}}\qquad\phi_{22}=\frac{\alpha_{ c}+\alpha_{m}}{\alpha_{c}+\alpha_{m}+\alpha_{c}}\frac{\beta_{s}}{\beta_{c}+\beta_{s}} \end{split} \tag{26}\]  
Thus, there is only one CE which corresponds to the mixed NE we already found in (17): observe that \(\phi_{11}=y^{*}z^{*}\), \(\phi_{12}=y^{*}(1-z^{*})\), \(\phi_{21}=(1-y^{*})z^{*}\) and \(\phi_{22}=(1-y^{*})(1-z^{*})\). This happens with all games following the payoff matrices from (13). The payoff for each player if they follow the CE is:  
\[u_{1}=-\alpha_{m}\phi_{11}+\alpha_{c}\phi_{21}-\alpha_{f}\phi_{22}\qquad u_{2 }=\beta_{s}\phi_{11}-\beta_{c}\phi_{21} \tag{27}\]  
The payoffs obtained using CE (replacing (26) in (27)) are the same that were obtained using mixed NE, in (19). This is obvious: both are the same equilibrium.