Efficient Streaming Algorithms for Two-Dimensional Congruence Testing and Congruence Hashing

Read full text
Authors: Yen‐Cheng Chang, Tsun Ming Cheung, Meng-Tsung Tsai, Ting-An Wu
Cited by: 0

Abstract

Geometric congruence asks whether two point multisets are identical up to translation and rotation, while congruence hashing seeks compact encodings that support efficient congruence queries. We study these problems in the streaming model under finite-precision rational inputs, where each coordinate is $p/q$ with $|p|,|q|\le U$. Our main results are two randomized polylogarithmic-space algorithms for 2D congruence identification (CI), which additionally requires outputting a valid transformation when congruent. With probability at least $1-δ$, our 3-pass product-anchor algorithm uses $O((\log n+\log U+\log \frac{1}δ)\log\log n\log \frac{1}δ)$ space in the turnstile model, while our 3-pass complex-moment algorithm uses $O(\log n(\log n+\log U+\log \frac{1}δ))$ space in the insertion-only model. Using CI as a building block, we obtain a 4-pass insertion-only congruence hashing algorithm over $m$ query sets using $O(m(\log n+\log U+\log m+\log \frac{1}δ))$ space and producing signatures of length $O(\log \frac{1}δ+\log U+\log m)$. Both algorithms presample primes for modular hashing to handle precision. The former algorithm uses finite-field embeddings and number-theoretic guarantees to recover rotations, and the latter hinges on a new non-vanishing complex moment criterion, thus avoiding additional number-theoretic conditions and the classical vanishing-moment obstacle. For the hardness results, we prove that any $p$-pass randomized streaming algorithm for 2D CI with error at most $δ$ requires $Ω(\frac{1}{p}(\log n+\log U+\log \frac{1}δ))$ space, matching the turnstile upper bound up to a $\log\log n$ factor. Moreover, approximate CI requires $\text{poly}(n)$ space even with $\text{poly}(n)$ passes. This sharply contrasts with the RAM model, where both exact and approximate versions are solvable in polynomial time.

Fields of Study & Subjects

Complexity and Algorithms in Graphs Advanced Database Systems and Queries Algorithms and Data Compression

Publication details

Journal / source
arXiv (Cornell University)
Publication date
13 February 2026
Language
EN
Document type
Preprint