# Asynchronous Gathering in a Dangerous Ring +
## 5 Conclusions  
In this paper we studied the problem of gathering of mobile agents in a ring network in the presence of a black hole, and established a complete characterization of the conditions under which the problem can be solved. In particular, we determined the maximum number of agents that can be guaranteed to gather in the same location, depending on whether \(k\) or \(n\) is unknown. These results are tight: in each case, gathering with one more agent is deterministically unfeasible. All our possibility proofs are constructive: we provided mobile agent algorithms that allow the agents to gather within a predefined distance under the specified conditions. The analysis of the time costs of these algorithms showed that they are optimal. Among the interesting observations from our results, let us stress the facts that either \(k\) or \(n\) must be known, that not knowing \(k\) makes the problem much harder than not knowing \(n\), and that parity of \(n\) and \(k\) influences the number of agents that can gather.  
Our gathering algorithm for the case of unknown \(k\) is also a solution for the black hole location problem. Interestingly, its bounded time complexity is \(\Theta(n)\); this is a significant improvement over the \(O(n\log n)\) bounded time complexity of the existing algorithms for the same case.  
The results for the case \(k\) unknown assumed \(k\geq 4\). If the number of agents is 3 (but unknown), from Theorem 2 it follows that at most 1 agent can gather. In such a case, the algorithm of [13] can be modified to solve the problem; however, its time complexity is at least \(O(n\log n)\). Proving that it is impossible to perform gathering in \(O(n)\) time--if it is not known that there are at least 4 agents--is an interesting open problem.  
In this paper, we have assumed that, initially, all agents are at distinct nodes. If this is not the case, in each node where initially there is more than one agent, one of them can become \"leader\" (e.g., using the fair mutual exclusion of accessing the whiteboard), and the others will \"follow the leader\" (except on unsafe links). With careful attention to details, all the proposed algorithms can be modified to correctly handle this situation.  
These results open several research directions. In particular, it would be interesting to investigate the gathering problem in the presence of a black hole in networks whose topology is more complex (e.g., hypercubes) or unknown (e.g., arbitrary biconnected graphs). Moreover, an entire unexplored research area is the examination of problems other than gathering (e.g., scattering, pattern formation) in the presence of a black hole, both in synchronous and asynchronous networks.  
All authors have equally contributed to conceptualization, methodology, validation, formal analysis, investigation, resources, and writing; project administration, N.S.; funding acquisition, P.F., G.P. and N.S. All authors have read and agreed to the published version of the manuscript.  
This research was supported in part by the Natural Science and Engineering Research Council (Canada) under the Discovery Grant program, by the Italian National Group for Scientific Computation GNCS-INdAM, and by Progetto PRA_202_81 (Universita di Pisa, Italy).  
Not applicable.  
The authors declare no conflict of interest.