Number of rectangles on a chessboard with restrictions

57 Views Asked by At

Number of rectangles on a chessboard with restrictions

Suppose there is a $m*n$ chessboard. This implies that there are $m+1$ horizontal lines and $n+1$ vertical lines.

If I wanted to count the total number of rectangles, the answer would $\binom{m+1}{2}\binom{n+1}{2}$, however, if I added restrictions such as minimum length and width $k$, then the total number of rectangles would be $\binom{m+1 - k}{2}\binom{n+1 - k}{2}$.

For instance, if I wanted rectangles with height and width at least $k=3$, it would be $\binom{m-2}{2}\binom{n-2}{2}$.

Am I correct in assuming this?

1

There are 1 best solutions below

0
On BEST ANSWER

You can tell that your result can’t be right because it doesn’t reproduce $\binom{m+1}2\binom{n+1}2$ for $k=1$, and because it yields $0$ rectangles for $m=n=k=3$.

Glue a spacer of length $k-1$ to the left line, and then arrange the left line-plus-spacer, the right line and the remaining $m-k$ lines in $\binom{m+2-k}2$ ways. The same for the top and bottom line, for a total of $\binom{m+2-k}2\binom{n+2-k}2$ rectangles with width and height at least $k$.