## 4 A Hybrid Algorithm for Power Allocation in Macrocell/Femtocell Architecture
\begin{cases}1,&\text{if $PT_{F_{l}}$ has equal positions to $F_{l}$},\\ 0,&\text{otherwise}.\end{cases} \]  
**Step 2: Dividing clusters into sub clusters of Master-Slaves Fs. ** Once the \(AVG_{(RP_{PT_{F_{l}}},T_{MUE})}\) is found for each F in the main \(CLS_{y}\) clusters, [PERSON] will sort all the elements of a cluster according to the value of the \(AVG_{(RP_{PT_{F_{l}}},T_{MUE})}\) in a descending order. Afterwards, [PERSON] will divide the main cluster into sub-clusters within a Master and Slave Fs. [PERSON] removes all the MUEs in the sorted list that belong to the first calculated \(AVG_{(RP_{PT_{F_{l}}},T_{MUE})}\), and group them in a sub-cluster called master-cluster. Then, M will remove all the MUEs from the list according to the \(PT_{F_{l}}\), which is/are located in the neighborhood of the Master-cluster, and gather them in a subcluster called Slave-clusters. Note that the list of the interfering femtocells will change dynamically when the average \(AVG_{(RP_{PT_{F_{l}}},T_{MUE})}\) for each femtocell's position \(PT_{F_{l}}\) is changed depending on the mobility of the MUEs. The main objective of this step is to find and choose the interfering femtocells that have the minimum and/or the maximum number of victims within each sub-cluster. **Step 3: Centralized power allocation in Master-Fs. ** In this step, M proceeds in the power allocation by dealing first with the MUEs that are impacted by the \(Master-F_{l}\) by first computing the maximum interference \(M^{k}_{MUE_{i}}\) that can be allowed by the victim's \(MUE_{i}\) as follows:  
\[M^{k}_{MUE_{i}}=\frac{RSS^{k}_{M,MUE_{i}}}{SINR^{Threshold}}-N_{0}. \tag{6}\]  
Then, the macrocell M asks an \(F_{l}\) that belongs to \(PT_{F_{l}}\)_Master \(-F_{l}\)_ to decrease their transmitting power from \(P_{F_{l}}\) to \(P^{\prime}_{F_{l}}\) according to \[P_{F_{l}}^{Ik}=\underbrace{MI_{MUE_{i}}^{k}.\frac{RSS_{F_{l},MUE_{i}}^{k}}{\sum_{l =1}^{L}RSS_{F_{l},MUE_{i}}^{k}}}_{I_{F_{l},MUE_{i}}^{k}}.\frac{P_{F_{l}}^{k}}{RSS_ {F_{l},MUE_{i}}^{k}}, \tag{7}\]  
where \(\sum_{l=1}^{L}RSS_{F_{l},MUE_{i}}^{k}\) represents all the Fs fulfilling Equation (5), \(I_{F_{l},MUE_{i}}^{k}\) is the maximum interference that \(F_{l}\) can cause to an \(MUE_{i}\) victim, and \(|G_{F_{l},MUE_{i}}^{k}|^{2}\) is the gain between them. **Step 4: Distributed power allocation in Slave-Fs. ** In this step, we define a distributed power allocation scheme for the \(F_{l}s\) that are selected as Slaves. Whenever an \(F_{l}\) has an \(AVG(RP_{T_{F_{l}}},T_{MUE})\) less than its neighbors, then M neglects calculating the \(P_{F_{l}}^{Ik}\) (step 3) and allows the \(F_{l}\) to calculate and allocate its transmitted power independently. The main motivation behind this step is to enhance the spectral efficiency of the \(MUE_{i}\) victims without any need for calculation and instruction report from M to the interfered \(F_{l}\), which was adopted in the counterpart \((Master-F_{l})\). The main issue here is that the \((Slave-F_{l})\) will still depend drastically on the RSS that is reported by the MUEs. Therefore, the pioneer difference of this method regarding the centralized power allocation is the migration of most of or a part of the power allocation calculation from M to \(F_{l}\). As a consequence, we reduce tremendously the signaling overheads exchanged among the elements \((M/Fs)\) because of the centralized method. This can be achieved through the following parts:  
* Consider the case when a \((Slave-F_{l})\) captures the \(RSS_{F_{l},MUE_{i}}^{k}\) report generated by a \(MUE_{i}\) where the \(SINR_{M,MUE_{i}}^{k}\) is fulfilling the Equations (4) and (5), respectively.