## 3 Framework
### Comparison with Z-MAC Protocol  
We now compare the performances of Z-MAC and SERENA on a small example. The chosen configuration, depicted in Figure 5, is very close to the one used by the authors of Z-MAC in [7]. We first evaluate the number of colors needed to color the nine nodes using DRAND (see [8] for more details) and SERENA. DRAND is the probabilistic two-hop node coloring algorithm used by Z-MAC. For SERENA, we use different variants: two-hop coloring because it supports the same requirements as DRAND, tree-coloring for data gathering applications and three-hop coloring for general applications. With Z-MAC, the nodes with a small number of one-hop neighbors have a higher probability to color themselves before the others and to take the smallest colors. For the configuration considered, six colors are needed. Color 0 is used by three nodes whereas color 1 is used by two nodes. The Z-MAC superframe is illustrated in Table 3. Since the size of the superframe is equal to 1 + the maximum number of (one-hop nodes + two-hop nodes), the superframe contains 9 slots. A node \(N\) uses the slot corresponding to its color \(c\) as well as all slots corresponding to \(c+k\cdot 2^{a}\), with \(a\) and \(k\) positive integers such that \(2^{a-1}\leq maxdegree<2^{a}\), where \(maxdegree\) is the maximum number of one-hop neighbors of any node \(M\) up to two hops from node \(N\). In this configuration, we have \(maxdegree\)=4 for any network node. It follows that only color 0 can use several slots in the same cycle. Notice that color 0 is used by nodes \(A\), \(G\) and \(H\) having a low number of one-hop neighbors. If we assume that the amount of traffic forwarded by a node depends on its number of neighbors, offering these nodes a bandwidth amount twice the amount of other nodes has a limited interest. We can also observe that slots 6 and 7 are unused at each cycle, leading to about 22% of bandwidth waste at each cycle. Furthermore, two cycles of Z-MAC correspond to three cycles of SERENA with two-hop coloring, giving the opportunity to transmit more frames. Figure 5: Configuration used for comparing Z-MAC and SERENA. With SERENA two-hop coloring, we get 5 colors, one less than DRAND. With SERENA, the nodes with the highest number of neighbors up to two-hop color themselves first. Color 1 is used twice, as well as color 2, whereas color 3 is used three times. We obtain the cycle illustrated in Table 4.  
If the support of immediate acknowledgement is required for this tree whose root is node \(A\), SERENA tree-coloring is applied, leading to seven colors, one more than DRAND but with the support of immediate acknowledgement. Colors 4 and 5 are used twice. The MAC cycle comprising seven color slots, is depicted in Table 5. The main advantage of tree-coloring is that in a single cycle, the data sent by all nodes can reach the sink, assuming data aggregation. We will evaluate the end-to-end delays in more details in Section 4.4. This property is not ensured with Z-MAC, where in the worst case, the maximum end-to-end delay is equal to the superframe size times the hop number toward the sink. \begin{table}
\begin{tabular}{c c c c c c c} \hline Node & slot0 & slot1 & slot2 & slot3 & slot4 & slot5 \\ \hline A & 0 & 0 & 0 & 1 & 0 & 0 \\ B & 1 & 0 & 0 & 0 & 0 & 0 \\ C & 0 & 1 & 0 & 0 & 0 & 0 \\ D & 0 & 0 & 1 & 0 & 0 & 0 \\ E & 0 & 0 & 0 & 0 & 1 & 0 \\ F & 0 & 0 & 0 & 1 & 0 & 0 \\ G & 0 & 1 & 0 & 0 & 0 & 0 \\ H & 0 & 1 & 0 & 0 & 0 & 0 \\ I & 0 & 0 & 0 & 0 & 0 & 0 \\ \hline \end{tabular}
\end{table} 
Table 4: Slot schedule with SERENA two-hop coloring.