scenarios. Next, we simulate AUD using our metric-optimal algorithm. Finally, we discuss how to solve the AUD problem using an MMV setting.

[**CS based active user detection:**]{} One application of MMV is AUD in a massive random access (MRA) scenario for multi-user communication [@FletcherRanganGoyal2009; @Boljanovic2017]. In the MRA scenario, multiple end users (EUs) are requesting access to the network simultaneously by sending their unique identification codewords, $\a_n\in \{-1,+1\}^{M\times 1},\ n\in \{1,\ldots,N\}$, to the base station, where $n$ denotes the user id, and each user’s codeword is known by the base station. The base station needs to determine which EUs are requesting access to the network (active) and which are not (inactive), so that it can allocate resources to the active EUs. Fletcher et al. [@FletcherRanganGoyal2009] proposed a CS based AUD scheme for MRA, which was recently revisited by Boljanovi[ć]{} et al. [@Boljanovic2017]. In their setup [@FletcherRanganGoyal2009; @Boljanovic2017], all EUs are synchronized, i.e., all active EUs send each entry of their codewords to the base station simultaneously in one time slot. Denote the status of the $n$-th EU by $x_n\in \{0,1\}$, where $x_n=1$ means active and $x_n=0$ is inactive. Denote the received signal vector at the base station by $\y\in \mathbb{R}^{M\times 