The other day the following combinatorics problem popped into my head: Given an $m \times n$ grid, how many corner pieces can fit in it without overlapping? A corner piece is defined as such:
OO
O
It can be rotated or flipped however one wants.
Here are some examples:
m=3, n=2
OO
OX
XX
Answer: 2
m=4, n=4
OOCC
OXXC
AX B
AABB
Answer: 5
I have also thought of other tiles like a Z or T. I know generally that this is packing theory but if anyone has any tips for how to solve these types of problems or any relevant reading, that would be really appreciated! I am still at the beginnings of my math journey.
From now on, I will assume that $2\le m\le n$. I will refer to the corner piece as an "L tromino", or just tromino.
Certainly, you can fit at most $$\left\lfloor {m\times n\over 3}\right\rfloor$$ L trominos in a rectangle. It turns out that, with a few exceptions, you can always fit that many L trominos. The only exceptional cases are the rectangles with dimensions $3\times n$, such that $n\ge 3$ is odd, in which case you can only fit $\frac{mn}3-1$ trominos.
First of all, the Chu-Johnsonbaugh theorem says that as long as $mn$ is a multiple of $3$, then the $m\times n$ rectangle can be completely tiled with L trominos, except in the cases where $m=3$ and $n\ge 3$ is odd. I gave a proof of this theorem at this answer. In the exceptional cases, you can still fully tile a $3\times (n-1)$ portion using $3\times 2$ rectangles, leaving only a $3\times 1$ strip uncovered.
Next, let us deal with the case where $mn-1$ is a multiple of $3$. This is handled in the paper Tiling Defficient Rectangles with Trominos by Ash and Golomb. They showed that, for every rectangle for which $3\mid (mn-1)$, there exists a square you can remove such that the remaining $mn-1$ squares can be tiled with L trominos. I recommend you fully read this paper, it is very accessible, and one of the classic papers of recreational mathematics.
Finally, for the case where $mn-2$ is a multiple of $3$, you can proceed as follows. One of the dimensions, $m$ or $n$, must be of the form $3k+2$ for some integer $k$, having a remainder of $2$ upon division by $3$. Let us say that $m=3k+2$. By chopping off two columns, we can split the entire $m\times n$ rectangle into two pieces: $$ m\times 2 \qquad \text{and}\qquad m\times (n-2) $$
For the $m\times 2$ rectangle, chop off a $2\times 2$ square. What remains is of the form $(m-2)\times 2=(3k)\times 2$, which is easily tile-able with $3\times 2$ rectangles. You can then put a single L tromino in the $2\times 2$ square, leaving one square leftover.
For the $m\times (n-2)$ piece, the area is one more than a multiple of $3$, so the result in the Ash and Golomb paper implies you can tile all but one of the squares in this piece.
Combined, we have covered all but two squares of the whole rectangle, as required.