Finding the Largest Empty Rectangle on a Grated Surface

Suppose we are given a two-dimensional rectangular surface upon which is placed a grating of size n by m square elements. The (n+1) × (m+1) intersection points of this grid are either empty or occupied. We describe an O(n × m) algorithm for finding the largest, in area, empty subrectangle of the original rectangle. The algorithm was inspired by the dynamic programming [1] and plane-sweep [5] paradigms.