Language Complexity on the Synchronous Anonymous Ring

A set of n nondistinct processors, organized as a ring and operating synchronously, have to compute a function of their initial values. Every computable function can be computed with O(n log n) messages, while some functions can be computed with as few as O(n) messages. We prove a necessary and sufficient condition for a regular language to be recognized with O(n) messages. Languages that do not satisfy this condition are `hard? to compute, i.e., their recognition requires ?(n log n) message. The condition is an extension of the notion of counter-free regular languages. These results give a gap theorem for recognizing regular languages on the synchronous anonymous ring. In contrast, we show a family of nonregular languages, computing thresholds, that obtain any intermediate complexity in the range ?(n) to ?(n log n).