Decision Problem
Input: An $m$ by $n$ Boolean matrix $M$.
Decision Question: Does there exist a square block within $M$ such that upper-left corner entry == upper-right corner entry == lower-left corner entry == lower-right corner entry == 1? That is, all four corners of the square block are 1's.
Cubic Time Solution
We know that this problem can be solved in $O(m \cdot n \cdot min\{m,n\})$ time. The approach involves scanning through the matrix row by row. For each row, for each pair of 1's in that row, we check whether those 1's form an edge of a square block whose four corners are 1's.
Our Question
What is the time complexity of this problem? Is there a quadratic time solution? In particular, can we solve this decision problem in $O(m \cdot n)$ time?
Extra Background
If you're just looking for a rectangular block whose four corners are ones, this can be solved in $O(m \cdot n)$ time. Many variations to this problem can be solved in $O(m \cdot n)$ time as well. I co-authored a paper on this subject.
The paper "Finding squares and rectangles in sets of points" investigates a related problem from computational geometry where you're given a set of points in a 2D plane and you want to know if there are four points that form an axis-parallel square.
Written together with Eevvoor.