Matching rectangles in d-dimensions: Algorithms and laws of large numbers

Abstract For each point of the integer lattice Zd, let X and Y be independent identically distributed random variables with P(X = Y) = p ∈ (0, 1). Let S(n) be the volume of the largest d-dimensional cube in {1,…, n}d with the property that X = Y at every point of the cube; R(n) is similarly defined to be the maximum volume of perfectly matching rectangles. It is proved that, if all possible shifts of the X lattice relative to the Y lattice are allowed, P( lim n → ∞ S(n) log n = lim n → ∞ R(n) log n = 2d) = 1 , where log is to base ( 1 p ). The corresponding limit without shifts is d. Algorithms to find largest squares and rectangles, with and without shifts, are also given.