with $Q_{L+1}^m=0$, we can apply (\[eq:QmlEqu\]) iteratively to find the $Q_l^m$’s. Finally, the transmit powers $P_l^m$ can be computed using (\[eq:QrepP\]).

With this approach, among the users requesting the level $l$ packet, it is more likely that some of them connect to the MBS and the rest connect to some FBS’s, due to the random channel gains in each time slot. In this situation, both MBS and FBS will have to transmit all the requested data packets. Such situation is not optimal for minimizing the total power, as will be discussed in Section \[subsubsec:caseII\].

### Power Allocation Algorithms \[subsec:proposed\]

In the following, we develop three power allocation algorithms for three different connection scenarios with a more structured approach.

#### Case I–One Base Station

We first consider the simplest connection scenario where all the $K$ users connect to the same BS (i.e., either the MBS or an FBS). Assume all the users connect to BS $m$. Then we have $I_m^k=1$ for all $k$, and all the subsets $\mathcal{U}_l^m$ are non-empty; $I_{m'}^k=0$ for all $k$ and all $m' \neq m$, and all the subsets $\mathcal{U}_l^{m'}$ are empty for $m' \neq m$.

From (\[eq:FmDef\]), we can derive the optimal solution as: $$\begin{aligned}
\label{eq:OptCase1}
