## 4 Proposed Scheduling Algorithm
### Applying Linear Structure to Get the Minimum Scheduling Time for Convergecast
\begin{tabular}{c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Time**} & \multicolumn{11}{c}{**Node**} \\ \cline{2-11}  & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \hline
1 & 0 & 4 & 0 & 0 & 0 & 0 & 0 & 0 & 11 & 0 & 0 \\
2 & 0 & 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 12 & 0 \\
3 & 0 & 0 & 0 & 6 & 0 & 0 & 0 & 0 & 0 & 0 & 13 \\
4 & 1 & 0 &In the sink node, we have messages, _i.e._, 1, 2, 3, 4, 5, 6, 8, 9, 11, 12, 15 and 18. That means we missed Messages 7 and 10. For 7, we find the smallest number, but greater than \(n\) (=10), among those received, which is 11. After searching 11 among Column 7, 6 and 5, we can find it at Table (7, 5) and replace the content with 7. The next 11 is located in column 2 (\(5-3=2\)) which is the Table (12, 2), and we replace the content with 7. The next, 11, is located in 0 (\(2-3=-1\), but the negative number is always 0 here), which is the Table (0, 16); replace Table (0, 16) with 7. We can execute the same algorithm for the content of 10. Then, we can get Table 5. \begin{table}
\begin{tabular}{c c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Time**} & \multicolumn{10}{c}{**Node**} \\ \cline{2-11}  & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \hline
14 & 8 & 0 & 0 & 0 & 0 & 0 & 15 & 0 & 0 & 0 & 0 \\
15 & 9 & 0 & 0 & 0 & 0 & 0 & 0 & 16 & 0 & 0 & 0 \\
16 & 11 & 0 & 0 & 0 & 0 & 0 & 18 & 0 & 0 & 0 & 0 \\
17 & 12 & 0 & 0 & 0 & 0 & 0 & 0 & 19 & 0 & 0 & 0 \\
18 & 0 & 0 & 0 & 15 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
19 & 0 & 0 & 0 & 18 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
20 & 15 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
21 & 18 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
22 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
23 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
24 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: _Cont._  
\begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Time**} & \multicolumn{10}{c}{**Node**} \\ \cline{2-11}  & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \hline
1 & 0 & 4 & 0 & 0 & 0 & 0 & 0 & 0 & 11 & 0 & 0 \\
2 & 0 & 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & **10** & 0  
The next step of the algorithm deletes all numbers greater than \(n\) and deletes all rows that do not contain any number from one to \(n\). Table 6 shows the minimum time schedule when the number of nodes \(n=10\) and the transmission range \(p=3\). The example we used is when the number of nodes is less than \(p\) (\(p+1\)), \(n<p(p+1)\). If the number of nodes is greater than \(p(p+1)\), \(n>p(p+1)\), the REDUCE algorithm is applied to make the condition, \(n<p(p+1)\); then, use the TABLE and ADJUST algorithm to get the minimum time schedule. For example, If \(n=14\) and \(p=3\), we have nodes, \(n=\{1\), 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14\(\}\); then, make it \(n=\{4\), 5, 6, 7, 8, 9, 10, 11, 12, 13, 14\(\}\) using Table 7, as follows. \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Time**} & \multicolumn{8}{c}{**Node**} \\ \cline{2-11}  & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \hline
1 & 0 & 4 & 0 & 0 & 0 & 0 & 0 & 0 & 11 & 0 & 0 \\
2 & 0 & 0 & 5 & 0 & 0 & 0 & 0 & 0 & 10 & 0 \\
3 & 0 & 0 & 0 & 6 & 0 & 0 & 0 & 0 & 0 & 0 \\
4 & 1 & 0 & 0 & 0 & 0 & 8 & 0 & 0 & 0 & 0 & 0 \\
5 & 2 & 0 & 0 & 0 & 0 & 0 & 9 & 0 & 0 & 0 & 0 \\
6 & 3 & 0 & 0 & 0 & 0 & 0 & 0 & 10 & 0 & 0 & 0 \\
7 & 4 & 0 & 0 & 0 & 0 & 7 & 0 & 0 & 0 & 0 & 0 \\
8 & 5 & 0 & 0 & 0 & 0 & 0 & 10 & 0 & 0 & 0 & 0 \\
9 & 6 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
10 & 0 & 0 & 8 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
11 & 0 & 0 & 0 & 9 & 0 & 0 & 0 & 0 & 0 & 0 \\
12 & 0 & 0 & 7 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
13 & 0 & 0 & 0 & 10 & 0 & 0 & 0 & 0 & 0 & 0 \\
14 & 8 & 0 & 0 & 0 After \(2p+1=7\) steps, we have \(n=\{4,\,5,\,6,\,7,\,8,\,9,\,10,\,11,\,12,\,13,\,14\}\). This is the same as the problem with \(n=10\) and \(p=3\) from this point. Then, we use the TABLE and ADJUST algorithms to get the minimum time schedule.