## 4 The Proposed Framework
### Merging and Splitting of Groups  
Next, we discuss how a group can merge with another group and be split into two different groups. As shown in Figure 2b, if the group cyclists of a group \(L_{1}\) of size \(n_{1}\) that is ahead reduce their speeds or the group cyclists of a group \(L_{2}\) of size \(n_{2}\) that is behind increase their speeds, the last group cyclist of \(L_{1}\) and the first group cyclist (i.e., \(\mathrm{GH}_{2}\)) of \(L_{2}\) may become neighboring cyclists that can communicate with each other. If the \(\mathrm{GH}_{2}\) of \(L_{2}\) receives the \(\mathrm{IAB}_{1}\) of \(L_{1}\), \(\mathrm{GH}_{2}\) will broadcast a \(M_{notify}\) message to all group cyclists in \(L_{1}\) to update the current group size to \(n_{1}+n_{2}\). In addition, \(\mathrm{GH}_{2}\) will broadcast a \(M_{update}\) message to all group cyclists \(i\) in \(L_{2}\) to update the group ID to the ID of \(\mathrm{GH}_{1}\), the current group size to \(n_{1}+n_{2}\), and \(\mathrm{SN}_{i}\) to \(\mathrm{SN}_{i}+n_{1}\). Thus, all group cyclists of \(L_{2}\) join \(L_{1}\) (i.e., \(L_{2}\) is merged into \(L_{1}\)). Note that if the total number of group cyclists in \(L_{1}\) and \(L_{2}\) are larger than the maximum group size, the group cyclist with the SN equal to the maximum group size plus one will form a new group to meet the requirement for the allowed round-trip delay of cooperative sensing data collection and distribution. On the other hand, when one or more group cyclists leave from a group, this group may be split into two smaller groups. If the group does not split after the group cyclists have left, the serial numbers of the remaining group cyclists can be corrected by the reordering process described in Section 4.3. Otherwise, a group \(L\) of size \(n\) can split in the following ways, as shown in Figure 2c,d. 1. As shown in Figure 2c, when group cyclist \(j\) changes its direction, group cyclists \(j-1\) and \(j+1\) cannot communicate with each other and thus \(L\) is split. At this time, if group cyclist \(j-1\) cannot receive the rebroadcasted IAB from the back after relaying an IAB, it becomes the last group cyclist in \(L\) and broadcast a \(M_{notify}\) message to all group cyclists ahead to update the current group size to \(\mathrm{SN}_{j-1}\). On the other hand, if group cyclist \(j+1\) cannot receive any IAB from \(L\) within \(\theta\) seconds, it will form a new group and act as its GH. Then, group cyclist \(j+1\) will broadcast a \(M_{update}\) message to all behind group cyclists \(i\) to update the group ID to its ID, the current group size to \(n-\mathrm{SN}_{j}\), and \(\mathrm{SN}_{i}\) to \(\mathrm{SN}_{i}-\mathrm{SN}_{j}\). 2. As shown in Figure 2d, after either group cyclist \(j\) speeds up or group cyclist \(j+1\) slows down, group cyclists \(j\) and \(j+1\) cannot communicate with each other, thus \(L\) is split. Similarly, if group cyclist \(j\) cannot receive the rebroadcasted IAB from the back after relaying an IAB, it will broadcast a \(M_{notify}\) message to all group cyclists ahead to update the current group size to \(\mathrm{SN}_{j}\). On the other hand, if group cyclist \(j+1\) does not receive any IAB from \(L\) within \(\theta\) seconds, it will form a new group and act as its GH. Then, group cyclist \(j+1\) will broadcast a \(M_{update}\) message to all behind group cyclists \(i\) to update the group ID to its ID, the current group size to \(n-\mathrm{SN}_{j}\), and \(\mathrm{SN}_{i}\) to \(\mathrm{SN}_{i}-\mathrm{SN}_{j}\). In particular, if \(L\) splits into three or more groups when multiple group cyclists leave simultaneously, the group sizes and serial numbers of group cyclists in these splitting groups can be updated by the reordering process proposed in Section 4.3.