跳到正文
研踪PaperTrail
← 研踪 PaperTrail

arXiv:2503.18974 · v4

An Efficient Frequency-Based Approach for Maximal Square Detection in Binary Matrices

首次提交 2025-03-22 14:14
版本更新 2026-11-02 13:55
雷达观测 2026-11-04 23:42
arXiv ↗PDF ↗

摘要

We present FreqBased, a frequency-based algorithm for the maximal square problem in binary matrices. The algorithm maintains a vertical run-length array and a horizontal counter to validate candidate squares, matching the standard single-array dynamic programming algorithm in O(mn) time and O(n) space while reducing the amount of work performed during execution. Experiments on synthetic random binary matrices reveal a clear density-dependent performance transition: FreqBased consistently outperforms the dynamic programming baseline on moderate- and high-density inputs across Intel and AMD processors, achieving peak speedups of 1.175x and 1.277x, respectively, while executing up to 2.08x fewer instructions. On 180 real aerial image masks from the INRIA dataset, FreqBased outperforms the baseline on every instance with speedups of up to 4.63x, confirming that the instruction-count advantage observed on synthetic inputs extends to real binary matrices with spatial structure. Hardware performance counter analysis shows that the performance advantage arises primarily from reduced instruction count despite lower execution efficiency, demonstrating that algorithms with identical asymptotic complexity can exhibit substantially different practical performance depending on input characteristics.

AI 论文解读

基于摘要 · 非全文审阅

此版本尚未生成 AI 解读。解读由后台任务生成并按论文版本保存,登录后共享已有结果。

版本差异

目前只观测到一个版本,无法比较变化。之后收录新版本时,会在这里对照标题、作者、分类和摘要。

观测到的版本

相邻记录可能跳过中间版本;首次发现 v2 及以上也会标为版本更新。

v4 · 2026-11-02 13:55 · 最新观测版本

An Efficient Frequency-Based Approach for Maximal Square Detection in Binary Matrices

We present FreqBased, a frequency-based algorithm for the maximal square problem in binary matrices. The algorithm maintains a vertical run-length array and a horizontal counter to validate candidate squares, matching the standard single-array dynamic programming algorithm in O(mn) time and O(n) space while reducing the amount of work performed during execution. Experiments on synthetic random binary matrices reveal a clear density-dependent performance transition: FreqBased consistently outperforms the dynamic programming baseline on moderate- and high-density inputs across Intel and AMD processors, achieving peak speedups of 1.175x and 1.277x, respectively, while executing up to 2.08x fewer instructions. On 180 real aerial image masks from the INRIA dataset, FreqBased outperforms the baseline on every instance with speedups of up to 4.63x, confirming that the instruction-count advantage observed on synthetic inputs extends to real binary matrices with spatial structure. Hardware performance counter analysis shows that the performance advantage arises primarily from reduced instruction count despite lower execution efficiency, demonstrating that algorithms with identical asymptotic complexity can exhibit substantially different practical performance depending on input characteristics.

查看此版本解读 →查看此版本原文 ↗