Computer Science > Data Structures and Algorithms
[Submitted on 22 Mar 2025 (this version), latest version 29 Mar 2025 (v2)]
Title:An Efficient Frequency-Based Approach for Maximal Square Detection in Binary Matrices
View PDF HTML (experimental)Abstract:This paper presents a novel frequency-based algorithm that solves the maximal square problem with improved practical speed performance, while maintaining optimal asymptotic complexity. The proposed approach tracks the columnar continuity of the ones through an adaptive frequency vector and dynamic thresholding mechanism, which eliminates the need for nested minimum operations commonly found in standard dynamic programming solutions. Theoretical analysis confirms the time complexity of O(mn) and the space complexity of O(n), with formal loop-invariant proofs ensuring correctness. Comprehensive benchmarking demonstrates speed improvements of 1.3-5x over standard methods for various matrix densities and sizes. Applications in urban planning, environmental modeling, and medical image analysis are discussed.
Submission history
From: Swastik Bhandari [view email][v1] Sat, 22 Mar 2025 06:14:33 UTC (922 KB)
[v2] Sat, 29 Mar 2025 05:33:14 UTC (925 KB)
Current browse context:
cs.DS
References & Citations
Bibliographic and Citation Tools
Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)
Code, Data and Media Associated with this Article
alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.