Gap theorems for distributed computing

Consider a ring of n anonymous processors, i.e. the processors have no id's. Each processor receives an input string and the ring is to compute a function of the circular input configuration in the asynchronous bidirectional model of computation. The complexity of an algorithm is the number of bits or the number of messages sent in the worst case. The complexity of a function is the lowest complexity of any algorithm that computes that function. If the function value is constant for all input configurations, the processors do not need to send any messages (complexity zero). On the other hand, we prove that any non-constant function has bit complexity f~(n logn ) for anonymous rings. There are non-constant functions that reach the upper end of the gap, i.e. we exhibit a non-constant function of bit complexity O (nlogn). The same gap for the bit complexity of non-constant functions remains even if the processors have distinct id's, provided that the id's are taken from a large enough domain. For the case of using the number of messages sent rather than the number of bits as the complexity measure, we present a nonconstant function that can be computed with O (n log* n ) messages on an anonymous ring. Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specfic permission. * Department of Computer Science, the Technion, Haifa 32000, Israel. This research was done while the S. Moran was on leave at IBM Thomas J. Watson Research Center, Yorktown Heights, NY 10598. ** Department of Computer and Information Sciences, University of California, Santa Cruz, CA 95064. The research of M. K. Warmuth was supported by Faculty Research funds granted by the University of California, Santa Cruz. 1. I N T R O D U C T I O N There has been an extensive amount of research on studying computation on a ring of n asynchronous processors. The ring topology is in a sense the simplest distributed network that produces many typical phenomena of distributed computation. In this model the processors may communicate by sending messages along the links of the ring, which are either unidirectional or bidirectional. All the messages sent reach their targets after a finite, but unpredictable and unbounded delay. Numerous algorithms [ASW85, DKR82, P82] have been found for the asynchronous ring. All these algorithms require the transmission of ~(n logn) bits. This is not surprising in view of the results of this paper. We establish a gap theorem for asynchronous distributed computation on the ring which says that either the function computed is constant and no messages need to be sent, or, in case of an arbitrary non-constant function, ~(nlgn ) bits are required. In the proof we cannot rely on the particular properties of a function such as extrema finding [B80, PKR84]. Rather than © 1986 ACM 0-89791-198-9/86/0800-0131 75¢ 131 that we prove a general lower bound of ~(nlgn ) for arbitrary non-constant functions. In our model there is no leader among the n processors. All processors run the same program which may depend on the ring size. We first treat the case where the ring is unidirectional and the processors have no id's (the anonymous model of [ASW85]). Then we show that the lower bound holds also for bidirectional rings, and for rings of processors with distinct id's, provided the set of possible id's is sufficiently large. Note that in the anonymous ring without a leader it is necessary that the processors "know" the ring size. Otherwise the processors cannot determine when to terminate [ASW85]. Let us contrast the anonymous ring with the model consisting of a chain of asynchronous processors where the head and tail processors of the chain are distinguished, or with a ring of asynchronous processors with a leader. If we assume unidirectional communication then any non-trivial function must require O (n) bits. But in the bidirectional case, there are simple non-constant functions for any bit complexity O (c (n)). For example assume that the inputs are bits and c (n)_<n 2. The input is denoted as an n -bit word co, the i -th bit COl of co being the input of the i -th processor. It is not hard to verify that the following function is a non-constant function of bit complexity O(c (n)): f (~)=1 iff co contains a palinI I ~rome of 2 I 1÷1 bits centered at the leader.