A team of mobile agents, starting from different nodes of an unknown network,
possibly at different times, have to meet at the same node and declare that
they have all met. Agents have different labels and move in synchronous rounds
along links of the network. The above task is known as gathering and was
traditionally considered under the assumption that when some agents are at the
same node then they can talk. In this paper we ask the question of whether this
ability of talking is needed for gathering. The answer turns out to be no.
Our main contribution are two deterministic algorithms that always accomplish
gathering in a much weaker model. We only assume that at any time an agent
knows how many agents are at the node that it currently occupies but agents do
not see the labels of other co-located agents and cannot exchange any
information with them. They also do not see other nodes than the current one.
Our first algorithm works under the assumption that agents know a priori some
upper bound N on the network size, and it works in time polynomial in N and in
the length l of the smallest label. Our second algorithm does not assume any a
priori knowledge about the network but its complexity is exponential in the
network size and in the labels of agents. Its purpose is to show feasibility of
gathering under this harsher scenario.
As a by-product of our techniques we obtain, in the same weak model, the
solution of the fundamental problem of leader election among agents. As an
application of our result we also solve, in the same model, the well-known
gossiping problem: if each agent has a message at the beginning, we show how to
make all messages known to all agents, even without any a priori knowledge
about the network. If agents know an upper bound N on the network size then our
gossiping algorithm works in time polynomial in N, in l and in the length of
the largest message