Machine-to-Machine (M2M) communications play a significant role in the Internet of Things (IoT). Cooperation of machines in M2M communications can improve network performance when the quality of connections between sources and their destinations is poor. Careful selection of machines as relays can play an effective role in improving the quality of communication in dense networks. Furthermore, the possibility of simultaneous use of different Radio Frequency (RF) interfaces can increase the capacity of data transmission over the network. In this paper, two novel M2M relay selection algorithms are proposed namely Optimal Relay Selection Algorithm (ORSA) and Matching based Relay Selection Algorithm (MRSA). ORSA is a centralized algorithm that transforms the relay selection problem to a kcardinality assignment problem that can be solved using the Hungarian algorithm. MRSA is a decentralized algorithm that leverages concepts from matching theory to provide a stable relay assignment. In both proposed algorithms, static RF interfaces setting is applied to enable the simultaneous use of different interfaces. It is shown that ORSA results are optimal and MRSA results are stable. The simulations compare the capacity of data transmission of proposed and baseline algorithms. The results show that when the number of channels is not restricted, MRSA is only about 3% lower than ORSA and its results are higher than direct transmission and random relay selection, about 56% and 117%, respectively.