Testing Connectedness of Images
Piotr Berman, Meiram Murzabulatov, Sofya Raskhodnikova, Dragos-Florian Ristache
TL;DR
This paper tackles the problem of testing connectedness for $n\times n$ binary images in the property-testing model by introducing border-connectedness as a key intermediate property and leveraging a multi-level grid partition. It presents two testers: an adaptive one with query complexity $O(\frac{1}{ε^{3/2}}\sqrt{\log\frac{1}{ε}})$ and a nonadaptive one with $O(\frac{1}{ε^{2}})$, both achieving 1-sided error and improving over prior work; it also proves a nonadaptive 1-sided lower bound of $Ω(\frac{1}{ε}\log\frac{1}{ε})$. The core approach combines partitions of the image into squares, border-connectedness testing within squares (via Exhaustive-Square-Tester nonadaptively and Diagonal-Square-Tester adaptively), and a structural lemma linking global distance to border-connectedness with local costs across levels. The results tighten the understanding of sublinear image property testing, providing both tighter upper bounds and the first nonadaptive lower bound for connectedness, with implications for efficient image analysis in noisy or large-scale settings. The techniques—grid-based partitioning, diagonal lattice testing, BFS-limited witnesses, and a careful accounting of local versus global costs—offer a framework potentially extendable to other image properties in the pixel model.
Abstract
We investigate algorithms for testing whether an image is connected. Given a proximity parameter $ε\in(0,1)$ and query access to a black-and-white image represented by an $n\times n$ matrix of Boolean pixel values, a (1-sided error) connectedness tester accepts if the image is connected and rejects with probability at least 2/3 if the image is $ε$-far from connected. We show that connectedness can be tested nonadaptively with $O(\frac 1{ε^2})$ queries and adaptively with $O(\frac{1}{ε^{3/2}} \sqrt{\log\frac{1}ε})$ queries. The best connectedness tester to date, by Berman, Raskhodnikova, and Yaroslavtsev (STOC 2014) had query complexity $O(\frac 1{ε^2}\log \frac 1ε)$ and was adaptive. We also prove that every nonadaptive, 1-sided error tester for connectedness must make $Ω(\frac 1ε\log \frac 1ε)$ queries.
