## 3 Proposed Optimization Algorithm
### BS Transmit Power Allocation
#### 3.1.2 Two-Layer Approach for Solving Problem (P1)
Our main objective was to maximize the weighted sum-SINR by optimizing both the BS transmit power and BS selections. This problem posed a non-convex sum-of-ratios challenge, which we addressed by decomposing it into two subproblems to solve separately and then optimizing the two variables alternately. In the process of solving this problem, a two-layer iterative algorithm is proposed to transform the non-convex problem into an MILP problem. The numerical results clearly demonstrate the benefits of BS power allocation for both the proposed scheme and the benchmark schemes compared. Furthermore, when the total transmit power of BSs remains unchanged, the RIS-CF system outperforms traditional benchmarking schemes. It is also revealed that a user's SINR is significantly affected by BS selections, especially in the absence of BS power allocation. This finding highlights the importance of carefully managing BS selections in RIS-CF systems to achieve a better performance. Furthermore, the work of this paper can also be extended to other possible directions in the future. For example, more general network settings could be considered, such as multi-antenna BSs and users, where the optimization problem becomes more complex and challenging. Additionally, there are many other approaches to selecting BSs in a CF network, which is also worth investigating for comparative study. In addition, this paper considered weighted sum-SINR maximization, while other performance metrics, such as energy efficiency, can also be explored as optimization objectives. Conceptualization, Q.B. ; methodology, Q.B. ; validation, Q.B., Y.Z. ; investigation, Q.B. ; writing--original draft preparation, Q.B. ; writing--review and editing, Q.B., Y.Z. ; supervision, Y.L. ; project administration, Y.H. ; funding acquisition, Y.H. All authors have read and agreed to the published version of the manuscript. Figure 5: Weighted sum-SINR versus RIS-reflecting elements number. **Funding:** This work was supported by the National Key R&D Program of China (Project Number: 2022 YFB2902100). **Data Availability Statement:** Data supporting this study are included within the article. **Conflicts of Interest:** All authors were employed by the company China Telecom Research Institute. They declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest. ## References

* [PERSON] and [PERSON] (2018) [PERSON]; [PERSON] All Technologies Work together for Good: A Glance at Future Mobile Networks. _IEEE Wirel. Commun._**2018**, 25, 10-16. [CrossRef]
* [PERSON] et al. (2019) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Resource Allocation for Ultra-Dense Networks: A Survey, Some Research Issues and Challenges. _IEEE Commun. Surv. Tutor._**2019**, 21, 2134-2168. [CrossRef]
* [PERSON] et al. (2020) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] On the Spectral and Energy Efficiencies of Full-Duplex Cell-Free Massive MIMO. _IEEE J. Sel. Areas Commun._**2020**, 38, 1698-1718. [CrossRef]
* [PERSON] et al. (2017) [PERSON]; [PERSON]; [PERSON]; [PERSON] [PERSON]; [PERSON] Cell-Free Massive MIMO Versus Small Cells. _IEEE Trans. Wirel. Commun._**2017**, 16, 1834-1850. [CrossRef]
* [PERSON] et al. (2018) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] On the Total Energy Efficiency of Cell-Free Massive MIMO. _IEEE Trans. Green Commun. Netw._**2018**, 2, 25-39. [CrossRef]
* [PERSON] and [PERSON] (2019) [PERSON]; [PERSON] Intelligent Reflecting Surface Enhanced Wireless Network via Joint Active and Passive Beamforming. _IEEE Trans. Wirel. Commun._**2019**, 18, 5394-5409. [CrossRef]
* [PERSON] et al. (2019) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] [PERSON]; et al. Smart radio environments empowered by reconfigurable AI meta-surfaces: An idea whose time has come. _EURASIP J. Wirel. Commun. Netw._**2019**, 2019, 129.