# 2 CA-R2: A Hybrid MAC Protocol for Machine-Type Communications
## 3 The 2C Algorithm and Its Adaptable Version
### The 2C Algorithm
One cell is assumed to contain the group of stations in the transmitting state (i.e., \(r_{t}=\mathrm{T}_{x}\)) and the second cell contains the ones that have deferred transmission (i.e., \(r_{t}=\mathrm{W}\)). In what follows, we illustrate the operation of the 2C algorithm. As an example, let us consider the wireless network shown in Figure 1, which consists of seven stations (i.e., A-G) and a central station. At a certain point in time, four of them (i.e., A, B, C, and D) have packets to transmit so that they wait for the next CRI to contend. A possible sequence of events is depicted in Figure 2 and is explained below:  
* First slot. At the beginning of the first slot all four stations set their state variables to \(\mathrm{T}_{x}\) (i.e., \(r_{1}=\mathrm{T}_{x}\)) and transmit. As a consequence, a collision occurs and the central station returns the message \(f_{1}=\mathrm{C}\). * Second slot. In response to the feedback message, the contending stations update their state variables by following the rules mentioned above. That is, they remain in transmission with probability \(p=1/2\) or join the waiting group (also with probability \(1/2\)). In the example, stations A and C choose the former (i.e., \(r_{2}=\mathrm{T}_{x}\)) and B and D the latter (i.e., \(r_{2}=\mathrm{W}\)). Since now two stations transmit, another collision occurs and the central station returns the message \(f_{2}=\mathrm{C}\). * Third slot. Stations A and C react to the feedback message and decide at random whether to continue transmitting or not (both possibilities occur with probability \(1/2\)). In the example, station A moves to the waiting cell (i.e., \(r_{3}=\mathrm{W}\)). In contrast, station C remains in the transmission cell; therefore, \(r_{3}=\mathrm{T}_{x}\). Since in this slot only station C transmits, a successful transmission occurs, and the central station returns the feedback \(f_{3}=\mathrm{NC}\). This event signals the end of a time interval that started with a collision of multiplicity 4 in the first slot and ended when a successful transmission was achieved. This is the concept of what is considered to be a phase in this work (note that the word \"phase\" has a particular meaning here and, most likely, it differs from other works). A phase begins with either the initial collision of a CRI or the collision that follows after a successful transmission. For identification purposes, let us consider that phase \(N\) starts with a collision of multiplicity \(N\). In all cases, a phase ends when there is a slot containing a successful transmission. In this example, phase 4 starts in slot 1 and ends in the third slot. * Remaining slots. When the stations in the waiting cell (i.e., A, B, and D) receive the feedback \(f_{3}=\mathrm{NC}\), they switch their state from waiting to transmission in the fourth slot. Therefore, when they transmit again, a new collision occurs. This event starts phase 3. The procedure described above is repeated in each one of the following phases until the last station involved in the initial collision of the CRI successfully transmits. Note that the last transmissions cause two consecutive NC feedback messages, which signals the end of the CRI. Figure 1: Example of a wireless network.