A Tight Lower Bound for Cycle Detection in Grid Graphs
Data Structures and Algorithms
2026-04-28 v1
Abstract
We prove that any algorithm for detecting cycles in an grid graph, where cells are colored and adjacency is defined by matching colors, must read all cells in the worst case for all grids with and . The proof is by adversary argument: we construct an adaptive adversary that maintains ambiguity -- one completion containing a cycle and one without -- until the final cell is read. The construction proceeds by tiling the grid with , , , and blocks, each equipped with an independent block adversary, composed via a checkerboard isolation scheme.
Cite
@article{arxiv.2604.23894,
title = {A Tight Lower Bound for Cycle Detection in Grid Graphs},
author = {Andrew Au},
journal= {arXiv preprint arXiv:2604.23894},
year = {2026}
}