Suppose I have $n$ rectangles in the 2D plane, as shown on the left. I am interested in partitioning the region inside these rectangles into disjoint sub-rectangles and counting the number of resulting subrectangles. Toward that end, I create grid lines along the edges of the rectangles (i.e., $2n$ vertical lines and $2n$ horizontal lines), as shown on the right.
In this specific example, there are $n=5$ rectangles and 81 sub-rectangles in the grid, 58 of which lie in the union of the original $n$ rectangles, shown in yellow below.
In the general case:
What is the maximum number of subrectangles that can lie fully inside an original rectangle? A loose upper bound is to observe that there are exactly $(2n-1) \times (2n-1)$ subrectangles in the grid , all of which are disjoint, and each subrectangle is either fully contained in or fully not contained in another rectangle. Is there a tighter bound?
What is the naive bound in $d$ dimensions? Is there a tighter bound? Specifically, we are now counting the number of disjoint $d$-dimensional subcubes in the grid that partition $n$ $d$-dimensional cubes?