Abstract-We study a cloud network with M distributed receiving antennas and L users, which transmit their messages towards a centralized decoder (CD), where M ≥ L. We consider that the cloud network applies the Compute-and-Forward (C&F) protocol, where L antennas/relays are selected to decode integer equations of the transmitted messages. In this work, we focus on the best relay selection and the optimization of the Physical-Layer Network Coding (PNC) at the relays, aiming at the throughput maximization of the network. Existing literature optimizes PNC with respect to the maximization of the minimum rate among users. The proposed strategy maximizes the sum rate of the users allowing non-symmetric rates, while the optimal solution is explored with the aid of the Pareto frontier. The problem of relay selection is matched to a coalition formation game, where the relays and the CD cooperate to maximize their profit. Efficient coalition formation algorithms are proposed, which perform joint relay selection and PNC optimization. Simulation results show that a considerable improvement is achieved compared to existing results, both in terms of the network sum rate and the players' profits.Index Terms-Cloud radio access networks, cloud base stations, compute-and-forward, physical layer network coding, relay selection, cooperative game theory.