# Distributed Pattern Formation in a Ring

**Authors:** Anne-Laure Ehresmann, Manuel Lafond, Lata Narayanan, Jaroslav Opatrny

arXiv: 1905.08856 · 2019-05-23

## TL;DR

This paper studies distributed algorithms for agents on a ring to rearrange themselves into diverse patterns satisfying specific color distributions within blocks, with optimal or near-optimal time complexity.

## Contribution

It introduces algorithms for pattern formation in rings with multiple colors, providing optimal solutions for two-color cases and general methods for multiple colors.

## Key findings

- Algorithm for two-color pattern formation with optimal time complexity
- Extension to multiple colors with $O(nk)$ steps
- Ability to achieve arbitrary final patterns with at least one agent of each color

## Abstract

Motivated by concerns about diversity in social networks, we consider the following pattern formation problems in rings. Assume $n$ mobile agents are located at the nodes of an $n$-node ring network. Each agent is assigned a colour from the set $\{c_1, c_2, \ldots, c_q \}$. The ring is divided into $k$ contiguous {\em blocks} or neighbourhoods of length $p$. The agents are required to rearrange themselves in a distributed manner to satisfy given diversity requirements: in each block $j$ and for each colour $c_i$, there must be exactly $n_i(j) >0$ agents of colour $c_i$ in block $j$. Agents are assumed to be able to see agents in adjacent blocks, and move to any position in adjacent blocks in one time step. When the number of colours $q=2$, we give an algorithm that terminates in time $N_1/n^*_1 + k + 4$ where $N_1$ is the total number of agents of colour $c_1$ and $n^*_1$ is the minimum number of agents of colour $c_1$ required in any block. When the diversity requirements are the same in every block, our algorithm requires $3k+4$ steps, and is asymptotically optimal. Our algorithm generalizes for an arbitrary number of colours, and terminates in $O(nk)$ steps. We also show how to extend it to achieve arbitrary specific final patterns, provided there is at least one agent of every colour in every pattern.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1905.08856/full.md

## Figures

6 figures with captions in the complete paper: https://tomesphere.com/paper/1905.08856/full.md

## References

31 references — full list in the complete paper: https://tomesphere.com/paper/1905.08856/full.md

---
Source: https://tomesphere.com/paper/1905.08856