# Joint Content Recommendation and Delivery in Mobile Wireless Networks with Outage Management
## 3 Optimal Algorithm for Joint Content Recommendation and Delivery  
The problem of joint content recommendation and delivery formulated in (11) is a nonlinear mixed integer programming problem, which is NP-hard. The optimal solution to this problem can be found by using the branch and bound algorithm [32; 33; 34], which is a general method for global optimization in nonconvex problems. If the feasible space is continuous, this algorithm can give a provable upper and lower bound on the (globally) optimal objective value and terminate with a certificate proving that the suboptimal point found is \(\epsilon\)-suboptimal. For integer programming problems, the branch and bound algorithm can essentially search the entire feasible space to obtain the optimal solution. However, the complexity (or convergent rate) of the algorithm depends on the problem structure. In the worst case, the branch and bound method has an exponential complexity [35; 36].  
To improve the convergent rate of the branch and bound algorithm, a useful method is to linearize the problem and constraints. To this end, a linearization process is proposed as follows. First, let us define \(C\) as the maximum number of bits that can be transmitted in a QAM symbol. It follows that the feasible space of bit allocation is integer, i.e., \(c_{uk}\in\{0,1,2,\ldots,C\}\). Given \(c_{uk}\), the required received power \(f_{u}(c_{uk})\) can be calculated as constants according to (3), i.e.,  
\[f_{u}(c_{uk})\in\{0,f_{u}(1),f_{u}(2),\ldots,f_{u}(C)\}. \tag{13}\]  
Now, define a new variable [37]:  
\[\gamma_{ukc}=\left\{\begin{array}{ll}1&\text{if }\rho_{uk}=1\text{ and }c_{uk}=c\\ 0&\text{otherwise}\end{array}\right. \tag{14}\]  
It follows that we can rewrite \(f_{u}(c_{uk})\) and \(\rho_{uk}\) as [37]:  
\[f_{u}(c_{uk})=\sum_{c=0}^{C}\gamma_{ukc}f_{u}(c) \tag{15}\]  
and:  
\[\rho_{uk}=\sum_{c=0}^{C}\gamma_{ukc}. \tag{16}\]  
Substituting (15) and (16) into (9) and (10), we get:  
\[\max_{f=1\cdots F}\{x_{uf}|f_{f}\}\leq\delta*B*\sum_{k=1}^{K}\sum_{c=0}^{C}c \gamma_{ukc}*T_{s}\qquad\forall u \tag{17}\]and:  
\[\frac{1}{N}\sum_{f=1}^{F}x_{uf}|_{f}\leq\delta*B*\sum_{k=1}^{K}\sum_{c=0}^{C}c \gamma_{ukc}*T_{s}\qquad\forall u \tag{18}\]  
for the maximum file size constraint and average file size constraint, respectively. Substituting Equations (15)-(18) into (11), we can transform the original optimization problem into:  
maximize \[\sum_{u=1}^{U}\sum_{f=1}^{F}r_{uf}x_{uf}\] (19) subject to Equation (17) or (18) \[B*\sum_{u=1}^{U}\sum_{k=1}^{K}\sum_{c=0}^{C}\frac{f(c)}{\alpha_{uk }^{2}}*\gamma_{ukc}\leq P_{T}\] \[\sum_{f=1}^{F}x_{uf}=N\] \[\sum_{u=1}^{U}\sum_{c=0}^{C}\gamma_{ukc}\leq 1\] \[x_{uf}\in\{0,1\},\gamma_{ukc}\in\{0,1\}.\]  
In this new problem, the decision variables are \(x_{uf}\) and \(\gamma_{ukc}\). Simulations show that the linearization can significantly improve the convergence rate of the branch and bound algorithm. However, in the worst case, the algorithm complexity is still exponential (i.e., \(O(2U^{2}FKC)\)). Therefore, we will subsequently propose several heuristic algorithms to reduce the algorithm complexity.