# Building a Nest by an Automaton

**Authors:** Jurek Czyzowicz, Dariusz Dereniowski, Andrzej Pelc

arXiv: 1904.10850 · 2024-01-26

## TL;DR

This paper presents a finite automaton-based robot that efficiently reorganizes bricks on an infinite grid to form a compact nest, minimizing the overall span in optimal time for any initial connected configuration.

## Contribution

It introduces a deterministic finite automaton algorithm that constructs the most compact brick structure in optimal time, a novel approach for autonomous structure building.

## Key findings

- The automaton achieves optimal $O(sz)$ time complexity.
- It guarantees construction of the most compact structure from any connected initial field.
- The method is applicable to infinite grid environments with connectivity constraints.

## Abstract

A robot modeled as a deterministic finite automaton has to build a structure from material available to it. The robot navigates in the infinite oriented grid $\mathbb{Z} \times \mathbb{Z}$. Some cells of the grid are full (contain a brick) and others are empty. The subgraph of the grid induced by full cells, called the field, is initially connected. The (Manhattan) distance between the farthest cells of the field is called its span. The robot starts at a full cell. It can carry at most one brick at a time. At each step it can pick a brick from a full cell, move to an adjacent cell and drop a brick at an empty cell. The aim of the robot is to construct the most compact possible structure composed of all bricks, i.e., a nest. That is, the robot has to move all bricks in such a way that the span of the resulting field be the smallest. Our main result is the design of a deterministic finite automaton that accomplishes this task and subsequently stops, for every initially connected field, in time $O(sz)$, where $s$ is the span of the initial field and $z$ is the number of bricks. We show that this complexity is optimal.

## Full text

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

## Figures

10 figures with captions in the complete paper: https://tomesphere.com/paper/1904.10850/full.md

## References

29 references — full list in the complete paper: https://tomesphere.com/paper/1904.10850/full.md

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