# 2 CA-R2: A Hybrid MAC Protocol for Machine-Type Communications
## 3 The 2C Algorithm and Its Adaptable Version
### The Adaptive-2C Algorithm  
In the original 2C algorithm, when the number of contending stations is large, the resulting CRI length may become relatively long, which can be considered an important drawback. This is due to the fact that the probability of remaining in the transmitting state after a collision is a fixed value (i.e., probability \(p=1/2\)) regardless of the number of contending stations. The Adaptive-2C algorithm that we introduced in [18] proposes that \(p\) should be a function of the number of contending stations \(N\) (i.e., \(p=p(N)\)). For instance, when \(N\) is large, \(p\) should be small so that most of these stations should switch to the waiting state in one step of the algorithm. However, it cannot be made too small or the system may transit to a state where none out of the \(N\) active stations remain in transmission, thus leading to empty slots and waste of resources. In the optimal case, after a collision of multiplicity \(N\), only one station should remain in transmission. To this end, in [18] we deduced some alternatives to achieve this goal and found that the following way of computing \(p(N)\) yields good results:  
\[p=p(N)= \begin{cases}\frac{1}{2},&\text{if }N=2,\\ \frac{\sqrt{2N(N-1)}-2}{(N-2)(N+1)},&\text{if }N>2.\end{cases}  \tag{1}\]  
In this way, Adaptive-2C achieves a faster collision resolution than the 2C algorithm. The interested reader is referred to the work reported in [18] where a thorough comparison between 2C and Adaptive-2C is reported. In order to make use of (1), the central station must estimate the collision multiplicity \(N\), and this value should be communicated to all stations in the network at appropriate points in time. Although the estimation of a collision multiplicity can be a difficult task to tackle, in [18] we proposed the following strategy to perform such estimation, which we termed the \"update-per-phase policy\". Note that even if it is not possible to know how many stations collided at the beginning of a CRI, this information can be known a posteriori, when such a CRI ends. This is due to the fact that the number of stations involved in the first collision of a CRI equals the total number of successful transmissions observed during the evolution of such a CRI. In this way, the central station can keep track of how many stations contended in the last few CRIs, and it can use this information  
Figure 2: Example of the operation of the 2C algorithm. to estimate the number of contending stations in the following CRI. To this end, several estimation methods can be applied, such as linear prediction. In the update-per-phase policy, when the first collision of a CRI happens, the central station applies a prediction method to estimate the multiplicity of such a collision (let us denote it by \(\hat{N}\)), and it provides this value as a feedback message to the network. This information is used by the network stations in order to compute the appropriate value of \(p\) (by using (1)), that is, \(p=p(\hat{N})\). If a second collision is observed, the stations will set the value of \(p\) to a fixed value of \(1/2\) and the system will evolve according to the rules of the 2C algorithm until a successful transmission is achieved. Recall that such success is communicated by the central station by broadcasting an NC feedback message, and this event signals the end of phase \(N\) and the beginning of phase \((N-1)\). This basic procedure is repeated in each one of the following phases. Note that the central station has to communicate an estimate for the collision multiplicity only once (i.e., at the beginning of a CRI) since every time there is a successful transmission, this estimate can be locally updated at the stations by subtracting \(1\) from its current value. The procedure described above constitutes the basis of the update-per-phase policy; however, a couple of comments are in order:  
* Let us assume there is a CRI in progress.