## 4 Design of SocialCode
### SocialCode Content Bitmaps among Destination Nodes  
At every service time slot, each RSU repeatedly generates and broadcasts SLNC-coded content pieces to all nodes that can receive its wireless signals. SocialCode proposes to adopt one bit in the content bitmap to indicate whether a node has received a specific SLNC-coded piece broadcast by the RSU at a service time slot. In Figure 3, if nodes \(v\) and \(j\) have received SLNC-coded content pieces from time slot 142 to 146 and 144 to 149, respectively, the content bitmap, that is, \(BT^{v}\), of node \(v\) from timeslot 142 to 149 is specified as [1 1 1 1 1 0 0 0] and that, that is, \(BT^{j}\), of node \(j\) as [0 0 1 0 1 1 1 1]. Here a bit 1 indicates that node \(v\) or \(j\) has received the content piece issued at the corresponding time slot. For calculating the utility value of node \(v\) over node \(j\), SocialCode invokes the proposed _CallUtility_(\(v,j\)) function in Figure 4, where \(BT^{v}_{i}\) denotes the associated bit value of time slot \(i\) in the content bitmap of node \(v\). Moreover, \(t^{v}_{max}\) and \(t^{v}_{min}\) indicate the starting and ending time slots in node \(v\)'s content bitmap, respectively. Hence, \(CallUtility(v,j)\) calculates the number of bits with value 1 in the difference bitmap, that is, [1 1 0 1 0 \(-\)1 \(-\)1 \(-\)1] as shown in Figure 3, of node \(v\) over \(j\). It finally returns 3 as the utility value of node \(v\) over \(j\) to express the number of innovative content pieces that node \(v\) could forward to \(j\) in the CCD process. Figure 3: The difference bitmap between content bitmaps of node \(v\) and \(j\). \(int\)_CallUtility(v,j)_  
\(l\)  
_Utility=0;_  
\(t_{min}\)_=min(\(t_{min}^{v}\), \(t_{min}^{j}\));_  
\(t_{max}\)_=max(\(t_{max}^{v}\), \(t_{max}^{j}\));_  
_for ( \(i\)=\(t_{min}\); \(i\) \(\leq\)\(t_{max}\); \(i\)++) {_  
_if (( BT\({}_{i}^{v}\) - BT\({}_{i}^{j}\)) ==\(l\))_  
_Utility++;_  
_return Utility;_  
_}_  
Besides calculating the utility value over each nearby destination node using _CallUtility()_, destination node \(v\) further computes the aggregate utility, that is, _util(v)_, by summing all utility values of its nearby destination nodes by Equation (1), where \(N(v)\) contains every nearby destination node of \(v\). After that, destination node \(v\) sorts aggregate utility values of all nearby destination nodes to arrange sequences for broadcasting their SLNC-coded content pieces. To allow the destination node with the highest aggregate utility value first accessing the wireless service channel, we propose Equation (2), which is modified from CodeOn [18], to let the backoff time, that is, \(\Delta t_{des}()\), given at the start of every service time slot and the aggregate utility in inverse proportion. Here we define \(N(v)\) as the set of all nearby destination nodes of \(v\). In Equation (2), three parameters, that is, \(|N(v)|\), K and \(\Delta t_{max}\), indicate the total number of nearby destination nodes of \(v\), the total number of SLNC-coded pieces in a generation and the highest acceptable backoff time, respectively. At last, a random jitter generated by the function \(Rand\left(0,T_{j}\right)\) is summed up to Equation (2) to break the tie due to the same parameters. As soon as the backoff time of a destination node has expired, it broadcasts its re-encoded content pieces in a batch to all nearby nodes. Equation (3) computes the total number of re-encoded content pieces, that is, \(C(v)\), by applying the ceiling function after dividing the aggregate utility, that is, \(util(v)\), by the total number of nearby destination nodes, that is, \(|N(v)|\). According to guidelines above, the destination or intermediate node must check whether its credit value is not less than \(\left(|N(v)|\times\beta\right)\) before it re-broadcasts a SLNC-coded content piece, because it has to decrease its credit value by \(\left(|N(v)|\times\beta\right)\) if this content piece is non-innovative to all \(|N(v)|\) nearby nodes at the worst case.