We consider a RIS-aided 6G wireless network, as illustrated in Fig. REF , where a BS equipped with \(M\)  antennas serves massive single-antenna devices. Herein, the RIS consisting of \(N\)  passive reflecting elements is deployed to enhance the devices' communication performance. The passive reflecting elements of the RIS are arranged as
an \(N_1\times N_2\)  uniform rectangular array with \(N\triangleq N_1\times N_2\) . Although the number of potential devices \(\bar{K}\)  is numerous, only \(K_a \ll \bar{K}\)  devices are active concurrently at a given slot, due to the bursty nature of the envisioned 6G services [1]}. Note that the number of active devices, \(K_a\) , is random and unknown to the BS. It is assumed that the direct links between active devices and the BS are obstructed [2]}, and thus calls for a need to enhance the quality of communications via deploying RIS [3]}. The channels are assumed to be invariant in a given time slot, but might independently fade over time slots. In particular, \(\mathbf {h}_k\in \mathbb {C}^{N}\)  is used to denote the channel vector between the RIS and the \(k\) th device; \(\mathbf {U}\in \mathbb {C}^{M\times N}\)  is used to denote the channel matrix between the BS and the RIS.
<FIGURE>