## 7 Conclusions  
In this paper, we analyze five frequently cited distributed consensus gossip algorithms (_RG_, _GG_, _BG_ with \(\gamma\) = 0.9, _PS_, and _PP_), which are bounded by a stopping criterion determined by the parameter \(P\), for minor application--distributed network size estimation. We analyze their performance over RGGs in two scenarios--the consensus achievement is conditioned by either the inner states (Scenario 1) or the network size estimates (Scenario 2). Besides, in both scenarios, either the best-connected or the worst-connected agent is selected as the leader. From the results presented in Section 6.1, it can be seen that a decrease in \(P\) ensures higher estimation precision of every analyzed algorithm, however, at the cost of an increase in the number of sent messages for consensus in both scenarios. The lowest number of sent messages for consensus is required by \(BG\), but the precision of this algorithm is very low. Thus, this algorithm is not applicable to estimating the network size in any of the analyzed scenarios. All four other algorithms achieve high precision except for two configurations of the applied stopping criterion: \(P\) = 0.1 in Scenario 1 and \(P\) = 0.01 in Scenario 1. Overall, the best performance is achieved by _PS_, whose precision is the highest (a bit greater than the precision of _RG_, _GG_, and _PP_), and the number of sent messages is the second-lowest among the examined algorithms. In addition, we identify that the algorithms are more precise in Scenario 2 but require many more sent messages for consensus than in Scenario 1. Besides, it is shown that the selection of the leader has only a marginal impact on all the analyzed algorithms. Regarding the distribution of the sent messages, all the examined algorithms have a Gaussian distribution skewed to the right except for \(BG\) in Scenario 1, where the number of sent messages does not differ over runs. Moreover, it is identified that lower values of \(P\) cause a greater dispersion. According to the presented results and their analysis, we conclude that the best performance for all the four applicable algorithms is achieved for \(P\) = 0.001 in Scenario 1. Thus, this configuration is recommended by us for real-world systems.  
Conceptualization, M.K. and J.K.; methodology, M.K.; software, M.K.; validation, M.K., and J.K.; formal analysis, M.K. and J.K.; investigation, M.K.; resources, M.K.; data curation, M.K. and J.K.; writing--original draft preparation, M.K.; writing--review and editing, M.K. and J.K.; visualization, M.K.; supervision, J.K.; project administration, M.K.; and funding acquisition, M.K. All authors have read and agreed to the published version of the manuscript.  
This work was supported by the VEGA agency under the contract No. 2/0155/19 and by the project CHIST ERA III (SOON) \"Social Network of Machines\". Since 2019, [PERSON] has been a holder of the Stefan Schwarz Supporting Fund.  
The data presented in this study are available on request from the corresponding author.  
We would like to thank the anonymous reviewers of this paper for their supportive and insightful comments.  
The authors declare no conflict of interest.