arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.12667cs.DS
收藏

高效的二维同余测试与几何哈希算法

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

National Tsing Hua University(国立清华大学);Academia Sinica(中央研究院)

Yen-Cheng Chang, Tsun Ming Cheung, Meng-Tsung Tsai, Ting-An Wu

AI总结:

本文提出了一种高效的二维同余测试与几何哈希算法,通过复矩方法在有限精度下实现空间高效的流处理。

摘要:

几何同余问题是在许多计算机视觉和图像识别任务中一个基本的构建模块。该问题考虑的是在平移和旋转下两个点集是否同余的决策任务。一个相关且更一般的问题,几何哈希,考虑了对多个点集进行紧凑编码以实现高效的同余查询任务。尽管应用广泛,但在空间感知设置中,这两个问题都很少受到关注。在本工作中,我们研究了在流模型中二维同余测试和几何哈希问题,其中数据以流的形式到达,主要目标是减少空间使用。为了有意义地分析空间复杂性,我们解决了尚未解决的输入精度问题,通过有限精度有理数设置进行分析:输入点的坐标是形式为p/q的有理数,其中|p|, |q| ≤ U。我们的结果考虑了一种更强的同余测试变体,称为同余识别,我们为此获得了一个使用O(log n(log U + log n))空间的3轮随机流算法。使用同余识别算法作为构建块,我们给出了一个6轮O(m log n (log n + log U + log m))-空间的随机流算法,该算法输出长度为O(log n + log U + log m)的哈希函数。我们实现空间效率的关键技术工具是复矩的使用。虽然复矩方法在物体识别中被广泛用作启发式方法,但其有效性常受到消失矩问题的限制(Flusser和Suk [IEEE Trans. Image Process 2006])。我们证明,在有理数设置中,只需跟踪O(log n)个复矩即可确保非消失矩,从而为正例中恢复有效的旋转提供理论保证。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑