## 6 Experiments and Discussion
### Experiments
Compared to Scenario 1, the algorithms require many more sent messages for consensus--in the case of \(RG\), the difference between Scenario 1 and Scenario 2 in the number of sent messages is around 750 messages, around 840 in the case of \(GG\), around 80 when \(BC\) is applied, around 540 if \(PS\) is used, and around 630 in the case of \(PP\). Moreover, it is observed that the value of \(P\) has only a marginal impact on the value of this difference. We next turn the readers' attention to the precision of the network size estimation (see Figure 11). As mentioned above, we quantify this parameter by applying the median deviation defined in (12). At first, we focus on Scenario 1 with the best-connected agent as the leader (grey bars)--from the results, we can see that a decrease in \(P\) ensures a lower deviation of each analyzed algorithm whereby a higher precision of the final estimates is achieved. In contrast to the previous analyses, the algorithm requiring the lowest number of sent messages for consensus achievement, \(BG\), is significantly outperformed by all the four other algorithms. Its deviation is from the range \([32.95,52.25]\) agents; therefore, its precision is so low that this algorithm is not applicable to estimating the network size for any \(P\) in Scenario 1. The four other algorithms do not significantly differ from each other in the estimation precision, but their precision is also very low (the median deviation is around 12 agents) for \(P\) = 0.1. In the case of \(P\) = 0.01, the median deviation is around one agent, which is a significantly more precise estimation compared to the previous case. Nevertheless, even this configuration is not appropriate for real-world applications requiring the exact value of the network size. Very high precision of the final estimates is achieved in the case of \(P\) = 0.001 (the median deviation is equal to around 0.1 agents) and \(P\) = 0.0001 (the median deviation is approximately 0.01 agents). Thus, only these two configurations of the stopping criterion can ensure estimation of the network size with high precision in Scenario 1. We next focus on the precision of the final estimates in Scenario 2 with the best-connected agent as the leader (see green bars in Figure 11). As seen from the results, a decrease in \(P\) ensures a higher precision of the final estimates as in Scenario 1. In this scenario, the precision of \(BG\) is higher (the deviation is from the interval \([32.52,37.66]\) agents) compared to Scenario 1, but it is still very low. Thus, \(BG\) is useless in both scenarios and is, therefore, not applicable to estimating the network size at all. Conversely, the precision of the four other algorithms is very high for each \(P\) in this scenario, and, again, there is no significant difference between these algorithms in terms of the estimation precision. Even for \(P\) = 0.1, the deviation is low--the median deviation is approximately 0.01 agents. The lowest deviation is achieved for \(P\) = 0.0001, taking the value around \(10^{-5}\) agent. Thus, the estimation precision is much greater in Scenario 2 than in Scenario 1--except for \(BG\), the deviation is about three orders of magnitude lower, and \(P\) has only a marginal impact on this difference. In Figures 12 and 13, the same experiments are repeated, but the worst-connected agent is selected as the leader instead of the best-connected one. As seen, the number of sent messages is slightly increased compared to scenarios with the best-connected agent chosen as the leader, while the deviation of the final estimates from the real network size is slightly decreased. However, there is no significant difference in the values of both applied metrics when the worst-connected agent is selected as the leader instead of the best-connected one. As further observed from the results, the most affected algorithms are \(RG\) and \(BG\).