Discrete Mathematics: Geometric Counting
Geometric Counting An $M \times N$ grid of squares is formed by horizontal and vertical grid lines. How many total rectangles can be formed using these grid lines? $$ \boxed{\binom{M+1}{2}\binom{N+1}{2}} $$ An $M \times N$ grid of squares is formed by horizontal and vertical grid lines. How many rectangles of exactly size $A \times B$ can be formed? $$ \boxed{(M-A+1)(N-B+1)} $$ An $M \times N$ grid of squares is formed by horizontal and vertical grid lines. A square in row $A$ and column $B$ (counted from the bottom-left corner) is fixed. How many rectangles contain this fixed square? $$ \boxed{A(M-A+1)\cdot B(N-B+1)} $$ An $M \times N$ grid of squares is formed by horizontal and vertical grid lines. How many squares can be formed using these grid lines? $$ \boxed{\sum_{k=1}^{\min(M,N)} (M-k+1)(N-k+1)} $$ If you draw $N$ straight lines in the plane, where no two lines are parallel and no three meet at the same point, how many intersec...