Rectangle Free Coloring of Grids

Abstract: A two-dimensional \emph{grid} is a set $\Gnm = [n]\times[m]$. A grid $\Gnm$ is \emph{$c$-colorable} if there is a function $\chi_{n,m}: \Gnm \to [c]$ such that there are no rectangles with all four corners the same color. We address the following question: for which values of $n$ and $m$ is $\Gnm$ $c$-colorable? This problem can be viewed as a bipartite Ramsey problem and is related to a the Gallai-Witt theorem (also called the multidimensioanl Van Der Waerden's Theorem). We determine (1) \emph{exactly} which grids are 2-colorable, (2) \emph{exactly} which grids are 3-colorable, and (3) \emph{exactly} which grids are 4-colorable. We use combinatorics, finite fields, and tournament graphs.

\section{Introduction}

A two-dimensional \emph{grid} is a set $\Gnm = [n]\times[m]$ where
$[t] = \{1, \ldots, t\}$.  A \emph{rectangle} of $\Gnm$ is a subset
of the form $\{(a,b),(a+c_1,b),(a+c_1,b+c_2),(a,b+c_2)\}$ for some
constants $c_1$ and $c_2$.
A grid $\Gnm$ is \emph{$c$-colorable} if there is a function
$\chi_{n,m}: \Gnm \rightarrow [c]$  such that
there are no rectangles with all four corners
the same color.
Not all grids have
$c$-colorings.  As an example, for any $c$ clearly $G_{c+1,c^{c+1}+1}$
does not have a $c$-coloring by two applications of the pigeonhole
principle.  If a grid has a $c$-coloring, we say it is
\emph{$c$-colorable}.  In this paper, we ask the following question:
what are the exact values of $m$ and $n$ for which $\Gnm$ is
$c$-colorable?

\begin{definition}
Let $n,m,n',m'\in \nat$.
$\Gmn$ {\it contains } $G_{n',m'}$ if $n'\le n$ and $m'\le m$.
$\Gmn$ {\it is contained in } $G_{n',m'}$ if $n\le n'$ and $m\le m'$.
Proper containment means that at least one of the $\le$ is actually $<$.
\end{definition}

Clearly, if $\Gnm$ is $c$-colorable, then all grids that it contains are $c$-colorable.
Likewise, if $\Gnm$ is
not $c$-colorable then all grids that contain it are not not $c$-colorable.

\begin{definition}
Fix $c$. then $\OBS_c$ is the set of all grids $\Gnm$ such that
$\Gnm$ is not $c$-colorable but all grids properly contained in $\Gmn$ are
$c$-colorable.
$\OBS_c$ stands for {\it Obstruction Sets}.
We also call such grids {\it $c$-minimal}.
\end{definition}

We leave the proof of the following theorem to the reader.

\begin{theorem}\label{th:obs}
Fix $c$. A grid $G_{a,b}$ is $c$-colorable iff
it does not contain any element of $\OBS_c$.
\end{theorem}

By Theorem~\ref{th:obs} we can rephrase the questions of finding
which grids are $c$-colorable: find $\OBS_c$.
Note that if $\Gnm \in \OBS_c$, then $\Gnm \in \OBS_c$.

This problem arises as follows. The Gallai-Witt theorem\footnote{It was attributed to Gallai in
  \cite{radogerman} and \cite{radoenglish}; Witt proved the theorem in
\cite{witt}.} (also called the multi-dimensional
Van Der Waerden theorem) has the following corollary:
{\it For all $c$, there exists $W=W(c)$ such that, for all $c$-colorings
of $[W]\times [W]$ there exists a monochromatic square.}
The classical proof of the theorem gives enormous upper bounds
on $W(c)$. Despite some improvements\footnote{Both~\cite{monotri} and \cite{Gowers}
can be used to obtain better bounds on $W(c)$.}
the known bounds on $W(c)$ are still enormous; however, there has been some work
on this by~\cite{gridiowa}.
If we relax the problem to seeking a {\it monochromatic rectangle}
then we can obtain far smaller bounds. In fact, we will obtain,
in some cases, exact characterizations of when a grid is $c$-colorable.

Another motivation is the bipartite Ramsey problem:
Given $a,c$, what is the least $n$ such that for any $c$-coloring of
the edges of $K_{n,n}$ there is a monochromatic $K_{a,a}$?
A coloring of $G_{n,n}$
can be viewed as an edge coloring of $K_{n,n}$.
A  monochromatic rectangle corresponds to a monochromatic
$K_{2,2}$.  Beineke and Schwenk \cite{beineke:1975} study a closely
related problem: what is the minimum value of $b$ such that any
two-coloring of $K_{b,b}$ results in a monochromatic $K_{n,m}$?  In
their work, this minimal value is denoted $R(n,m)$.  Later, Hattingh
and Henning \cite{hattingh:1998} define $b(n,m)$ as the minimum $b$
for which any two-coloring of $K_{b,b}$ contains a monochromatic
$K_{m,m}$ or a monochromatic $K_{n,n}$.

In a related paper, Cooper, Fenner, and Purewal \cite{cooper:2008}
generalize the problem to multiple dimensions and obtain upper and lower
bounds on the sizes of the obstruction sets.

The remainder of this paper is organized as follows.  In Sections~\ref{se:lower}
and~\ref{se:contrect} we develop tools to show grids {\it are not } $c$-colorable.
In Section~\ref{se:findprop} we develop tools to show grids {\it are} $c$-colorable.
In Section~\ref{se:bounds} we obtain upper and lower bounds on $|\OBS_c|$.
In Section~\ref{se:2col} and~\ref{se:3col} we find $\OBS_2$ and $\OBS_3$ respectively.
In Section~\ref{se:4col} we obtain a small handful of possibilities for $\OBS_4$.
We also propose a conjecture which, if true, would yield the exact elements of $\OBS_4$.
In Section~\ref{se:bipartite} we apply the results to finding some
new bipartite Ramsey numbers.
We conclude with some open questions.
The appendix contains some sizes of maximum rectangle free sets
(to be defined later).

\section{Lower Bounds on Uncolorability}\label{se:lower}

A \emph{rectangle-free subset} $A \subseteq G_{n,m}$ is a subset that
does not contain a rectangle as defined above.  A problem that is
closely related to grid-colorability is that of finding a
rectangle-free subset of maximum cardinality.  This relationship is
illustrated by the following lemma.

\begin{theorem}
\label{th:connection}
If $G_{n,m}$ is $c$-colorable, then it contains a rectangle-free
subset of size $\lceil \frac{nm}{c} \rceil$.
\end{theorem}

\begin{proof}
A $c$-coloring partitions the elements of $G_{n,m}$ into $c$
rectangle-free subsets.  By the pigeon-hole principle, one of these
sets must be of size at least $\lceil \frac{nm}{c} \rceil$.
\end{proof}

\begin{definition}
Let $n,m\in\nat$.
$\maxrf n m $ is the size of the maximum
rectangle-free $A\subseteq \Gnm$.
\end{definition}

Finding the maximum cardinality of a rectangle-free subset is
equivalent to a special case of a well-known problem
of  Zarankiewicz~\cite{zaran} (see \cite{GRS} or \cite{roman} for more information).
The Zarankiewicz function, denoted
$Z_{r,s}(n,m)$, counts the minimum number of edges in a bipartite
graph with vertex sets of size $n$ and $m$ that guarantees a subgraph
isomorphic to $K_{r,s}$.
Zarankiewicz's problem was to determine $Z_{r,s}(n,m)$.

If $r=s$, the function is denoted
$Z_r(n,m)$.  If one views a grid as an incidence matrix for a
bipartite graph with vertex sets of cardinality $n$ and $m$, then a
rectangle is equivalent to a subgraph isomorphic to $K_{2,2}$.
Therefore the maximum cardinality of a rectangle-free set in $G_{n,m}$
is $Z_2(n,m) - 1$.  We will use this lemma in its contrapositive form,
i.e., we will often show that $G_{n,m}$ is not $c$-colorable by showing
that $Z_2(n,m) \leq \lceil \frac{nm}{c} \rceil$.

Reiman~\cite{reiman} proved the following lemma. Roman~\cite{roman} later generalized it.

\begin{lemma}
\label{reimanlemma}
Let $m \leq n \leq \binom{m}{2}$.
Then $Z_2(n,m) \leq \floor{\frac{n}{2}\left(1+\sqrt{1+4m(m-1)/n}\right)} + 1$.
\end{lemma}

\begin{corollary}
\label{uncolor1}
Let $m \leq n \leq \binom{m}{2}$.
Let $z_{n,m} = \floor{\frac{n}{2}\left(1+\sqrt{1+4m(m-1)/n}\right)}+1$ be the upper-bound on $Z_2(n,m)$ in Lemma \ref{reimanlemma}.
If
$z_{n,m} \leq \lceil \frac{nm}{c} \rceil$
then $G_{n,m}$ is not $c$-colorable.
\end{corollary}

Corollary \ref{uncolor1}, and some  2-colorings of grids,
are sufficient to find $\OBS_2$.
To find $\OBS_3$ and $\OBS_4$, we need slightly more powerful tools to show grids
are not colorable (along with some 3-colorings and 4-colorings of grids).
This next lemma, which has a proof that is
very similar to the previous lemma gives us two more uncolorability corollaries.

\begin{definition}
Let $n,m,x_1,\ldots,x_m\in\nat$.
$(x_1,\ldots,x_m)$ is \emph{$(n,m)$-placeable}
if there exists a rectangle-free $A\subseteq \Gnm$
such that, for $1\le j\le m$, there are $x_j$ elements
of $A$ in the $j^\tth$ column.
\end{definition}

\begin{lemma}\label{le:binom}
Let $n,m,x_1,\ldots,x_m\in\nat$ be such
that
$(x_1,\ldots,x_m)$ is $(n,m)$-placeable.
Then
$\sum_{i=1}^m \binom{x_i}{2} \le \binom{n}{2}.$
\end{lemma}

\begin{proof}
Let $A\subseteq \Gnm$ be a set that shows that
$(x_1,\ldots,x_m)$ is $(n,m)$-placeable.
Let $\binom{A}{2}$ be the set of pairs of elements of $A$.
Let $2^{\binom{A}{2}}$ be the powerset of $\binom{A}{2}$.

Define the function $f:[m]\into 2^{\binom{A}{2}}$ as follows.
For $1\le j\le m$,

$$f(j) = \{ \{a,b\} \st (a,j), (b,j) \in A \}.$$

If $\sum_{j=1}^m |f(j)| > \binom{n}{2}$ then there exists
$j_1\ne j_2$ such that $f(j_1)\cap f(j_2)\ne \es$.
Let $\{a,b\} \in f(j_1)\cap f(j_2)$.
Then
$$\{ (a,j_1), (a,j_2), (b,j_1), (b,j_2) \} \in A.$$
Hence $A$ contains a rectangle.
Since this cannot happen,
$\sum_{j=1}^m |f(j)| \le \binom{n}{2}$.
Note that $|f(j)|=\binom{x_j}{2}$. Hence
$\sum_{i=1}^m \binom{x_i}{2} \le \binom{n}{2}.$
\end{proof}

\begin{lemma}\label{le:density2}
Let $a,n,m\in\nat$. Let $q,r$ be such that
$a=qn+r$ with $0\le r\le n$.
Assume that there exists $A\subseteq \Gnm$ such that $|A|=a$ and $A$ is
rectangle-free.
\begin{enumerate}
\item
If $q\ge 2$ then
$$
n\le \bigfloor{\frac{m(m-1)-2rq}{q(q-1)}}.
$$
\item
If $q=1$ then
$$
r\le \frac{m(m-1)}{2}.
$$
\end{enumerate}
\end{lemma}

\begin{proof}
The proof for the $q\ge 2$ and the $q=1$ case
begins the same; hence we will not split into cases yet.

Assume that, for $1\le j\le m$,
 the number of elements of $A$ in the
$j^\tth$ column is $x_j$. Note that  $\sum_{j=1}^m x_j = a$.
By Lemma~\ref{le:binom}
$\sum_{j=1}^m \binom{x_j}{2} \le  \binom{n}{2}$.
We look at the least value that $\sum_{j=1}^n \binom{x_j}{2}$ can have.

Consider the following question:

\noindent
Minimize $\sum_{j=1}^n \binom{x_j}{2}$

\medskip

\noindent
Constraints:
\begin{itemize}
\item
$\sum_{j=1}^n x_j = a$.
\item
$x_1,\ldots,x_n$ are natural numbers.
\end{itemize}

One can easily show that this is minimized
when, for all $1\le j\le n$,
$$x_j\in \{ \floor{a/n}, \ceil{a/n}\} \subseteq \{q,q+1\}.$$
In order for $\sum_{j=1}^n x_j = a$ we need to
have $n-r$ many $q$'s and $r$ many $q+1$'s.
Hence we obtain

$\sum_{j=1}^n \binom{x_j}{2}$ is at least
$$(n-r)\binom{q}{2} + r\binom{q+1}{2}.$$

Hence we have
$$(n-r)\binom{q}{2} + r\binom{q+1}{2} \le \sum_{j=1}^n \binom{x_j}{2}
\le \binom{m}{2}$$
$$nq(q-1) -rq(q-1) + r(q+1)q \le m(m-1)$$
$$nq(q-1) - rq^2+ rq + rq^2 +rq \le m(m-1)$$
$$nq(q-1) +2rq \le m(m-1)$$

\noindent
{\bf Case 1:} $q\ge 2$.

Subtract $2rq$ from both sides to obtain
$$nq(q-1) \le m(m-1)-2rq.$$
Since $q-1\ne 0$ we can divide
by $q(q-1)$ to obtain
$$
n\le \bigfloor{\frac{m(m-1)-2rq}{q(q-1)}}.
$$

\bigskip

\noindent
{\bf Case 2:} $q=1$. Since $q-1=0$ we get

$$2r \le m(m-1)$$

$$r \le \frac{m(m-1)}{2}.$$
\end{proof}

\begin{corollary}
\label{uncolor2}
Let $m,n \in \nat$.  If there exists an $r$ where
$\frac{m(m-1)}{2} < r \le n$ and $\ceil{\frac{mn}{c}} = n+r$, then
$G_{m,n}$ is not $c$-colorable.
\end{corollary}

\begin{corollary}
\label{uncolor2a}
Let $1 \le c' \le c$.  $G_{c+c',m}$ is not $c$-colorable for any $m >
\frac{c}{c'}\binom{c+c'}{2}$.
\end{corollary}

\begin{proof}
Let $n=c+c'$ and $q=1$ in Lemma~\ref{le:density2}.  Then we have
\begin{eqnarray*}
\bigceiling{\frac{(c+c')m}{c}} & = & m + r \\
m + \bigceiling{\frac{c'm}{c}} & = & m + r \\
\bigceiling{\frac{c'm}{c}} & = & r \\
\end{eqnarray*}
Note that $m\ge r$. Hence

\begin{eqnarray*}
m \ge \bigceiling{\frac{c'm}{c}} & = & r \\
\frac{c'm}{c} & \le & r \\
m & \le & \frac{cr}{c'}
\end{eqnarray*}
If $m > \frac{c}{c'}\binom{c+c'}{2}$, then $r > \binom{c+c'}{2}$, and
so $G_{c+c',m}$ is not $c$-colorable by Corollary~\ref{uncolor2}.
\end{proof}

\begin{corollary}
\label{uncolor3}
Let $n,m\in\nat$.  Let $\lceil \frac{nm}{c} \rceil = qn+r$ for some $0
\le r \le n$ and $q \ge  2$.  If $\frac{m(m-1)-2qr}{q(q-1)} < n$ then
$\Gnm$ is not $c$-colorable.
\end{corollary}

\begin{note}
In the Appendix we use the results of this section to find
the sizes of maximum rectangle free sets.
\end{note}

\section{Tools to Show Sets Contain Rectangles}\label{se:contrect}

\subsection{Conventions}

Throughout this section we will have the following notations and conventions.

\begin{notation}~
If $n,m\in \nat$ and $A\subseteq\Gnm$ then
we assume the following.
\begin{enumerate}
\item
The top row of a grid  is row 1.
\item
We will denote that $(a,b)\in A$
by putting an $R$ in the $(a,b)$ position.
\item
For $1\le j\le m$,
$x_j$ is the number of elements of $A$ in column $j$.
\item
The rows and columns are reordered so that the following holds
(unless we explicitly say otherwise):
\begin{enumerate}
\item
$x_1\ge x_2\ge \cdots \ge x_m$.
\item
The first column has $x_1$ contiguous elements of $A$ starting at row 1.
\item
The second column has $x_2$ contiguous elements of $A$ (unless we say otherwise).
\end{enumerate}
\item
For $1\le j\le m$, $C_j$ is the set of rows $r$ such that
$A$ has an element in the $r^\tth$ row of column $j$.
Formally
$$C_j = \{ r \st (r,j)\in A \}.$$
\item
For $1\le i\le k$ let
$$I_i = \sum_{1\le j_1 < \cdots < j_i \le m} |C_{j_1}\cap \cdots \cap C_{j_i}|.$$
\end{enumerate}
\end{notation}

\begin{example}

\[
\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
& 01 & 02 & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 \cr
\hline
1& & R&  & R&  &  &  &  &  &  &  &  &  & R&  & R& R  \cr
\hline
2&R& R&  &  &  &  &  &  &  & R& R&  & R&  &  &  &    \cr
\hline
3&R&  &  &  &  &  &  &  & R&  &  &  &  &  & R& R&  \cr
\hline
4& &  &  &  &  & R&  &  & R&  &  & R& R& R&  &  &   \cr
\hline
5& & R& R&  &  & R&  &  &  &  &  &  &  &  &  &  &  \cr
\hline
\end{array}
\]

$$
C_1 =\{2,3\},
C_2=\{1,2,5\},
C_3=\{5\},
C_4=\{1\},
C_5=\{ \},
$$

$$
C_6=\{4,5\},
C_7=\{ \},
C_8=\{ \},
C_9=\{3,4\},
C_{10}=\{2\},$$

$$
C_{11}=\{2\},
C_{12}=\{4\},
C_{13}=\{2,4\},
C_{14}=\{1,4\},
C_{15}=\{3\},
$$

$$
C_{16}=\{1,3\},
C_{17}=\{1\},
$$

In this example $A$ is rectangle free.
Hence, for all $i<j$  $C_i \cap C_j | \le 1$.
Hence we have the following observations.

\begin{enumerate}
\item
$I_1$ is the number of $R$'s in the grid which is 22.

\item
$I_2$ is the number of pairs of columns that intersect.
We list all of the intersecting pairs that are nonempty by
listing what $C_j$ intersects with $C_{j'}$ where $j'>j$.

$C_1$ intersects
$C_2, C_9, C_{10}, C_{11}, C_{13}, C_{15}, C_{16}$;

$C_2$ intersects
$C_4,
C_6, C_{10}, C_{11}, C_{13},
C_{14},
C_{16},
C_{17}$;

$C_3$ intersects $C_6$;

$C_4$ intersects
$C_{14}, C_{16}, C_{17}$;

$C_6$ intersects
$C_{9},
C_{12},
C_{13},
C_{14}$;

$C_9$ intersects
$C_{12},
C_{13},
C_{14},
C_{15},
C_{16}$;

$C_{10}$ intersects
$C_{11}, C_{13}$,

$C_{11}$ intersects $C_{13}$;

$C_{12}$ intersects
$C_{13}, C_{14}$;

$C_{14}$ intersects
$C_{16}, C_{17}$;

$C_{15}$ intersects $C_{16}$;

$C_{16}$ intersects $C_{17}$;

Therefore $I_2= 37$.

\item
$I_3$ is the number of triples of columns that intersect.
We list all of the intersecting triplets that are nonempty:

$(C_1, C_2 , C_{10})$,
$(C_1, C_2 , C_{11})$,
$(C_1, C_2 , C_{13})$,
$(C_1, C_9 , C_{15})$,
$(C_1, C_9 , C_{16})$,
$(C_1, C_{10} , C_{11})$,
$(C_1, C_{10} , C_{13})$,
$(C_1, C_{11} , C_{13})$,
$(C_1, C_{15} , C_{16})$,

\smallskip

$(C_2, C_4 , C_{14})$,
$(C_2, C_4 , C_{16})$,
$(C_2, C_4 , C_{17})$,
$(C_2, C_{10} , C_{11})$,
$(C_2, C_{10} , C_{13})$,
$(C_2, C_{11} , C_{13})$,
$(C_2, C_{14} , C_{16})$,
$(C_2, C_{14} , C_{17})$,
$(C_2, C_{16} , C_{17})$;

\smallskip

$(C_4, C_{14} , C_{16})$,
$(C_4, C_{14} , C_{17})$,
$(C_4, C_{16} , C_{17})$;

\smallskip

$(C_6, C_9 , C_{12})$,
$(C_6, C_{9} , C_{13})$,
$(C_6, C_{9} , C_{14})$,
$(C_6, C_{12} , C_{13})$,
$(C_6, C_{12} , C_{14})$,
$(C_6, C_{13} , C_{14})$;

\smallskip

$(C_9, C_{15} , C_{16})$,
$(C_9, C_{12} , C_{13})$,
$(C_9, C_{12} , C_{14})$,
$(C_9, C_{13} , C_{14})$;

\smallskip

$(C_{10},C_{11},C_{13})$,

\smallskip

$(C_{12},C_{13},C_{14})$,

\smallskip

$(C_{14},C_{15},C_{16})$,

\smallskip

$(C_{15},C_{16},C_{17})$.

\smallskip

Hence $I_3= 35$.

\item
$I_4$ is the number of 4-tuples of columns that intersect.
We list all of the intersecting 4-sets that are nonempty:

$(C_1, C_2 , C_{10} , C_{11})$,
$(C_1, C_2 , C_{10} , C_{13})$,
$(C_1, C_9 , C_{15} , C_{16})$,
$(C_1, C_{10} , C_{11} , C_{13})$;

\smallskip

$(C_2, C_{4} , C_{14} , C_{16})$,
$(C_2, C_{4} , C_{14} , C_{17})$,
$(C_2, C_{4} , C_{16} , C_{17})$,
$(C_2, C_{10} , C_{11} , C_{13})$,
$(C_2, C_{14} , C_{16} , C_{17})$,

\smallskip

$(C_4, C_{14} , C_{16} , C_{17})$,

\smallskip

$(C_6, C_{9} , C_{12} , C_{13})$,
$(C_6, C_{9} , C_{12} , C_{14})$,
$(C_6, C_{9} , C_{13} , C_{14})$,

\smallskip

$(C_6, C_{12} , C_{13} , C_{14})$,

\smallskip

$(C_9, C_{12} , C_{13} , C_{14})$.

\smallskip

Hence $I_4= 15$.

\item
$I_5$ is the number of 5-tuples of columns that intersect.
We list all of the intersecting 5-sets that are nonempty:

$(C_1, C_2, C_{10}, C_{11} , C_{13})$,

\smallskip

$(C_2, C_4, C_{14}, C_{16} , C_{17})$,

\smallskip

$(C_6, C_9, C_{12}, C_{13} , C_{14})$,

\smallskip

Hence $I_5=3$.

\item
$I_6$ is the number of 6-tuples of columns that intersect.
There are none of these, so $I_6=0$.

\end{enumerate}

\end{example}

\begin{definition}
Let $n,m\in\nat$ and $A\subseteq \Gnm$.
Let $1\le i_1 < i_2 \le n$.
$C_{i_1}$ and $C_{i_2}$ \emph{intersect}
if $C_{i_1}\cap C_{i_2} \ne \es$.
The following picture portrays this happening with $C_1$ and $C_2$.

\[
\begin{array}{|c|c|c|c|}
\hline
  & 1 & 2 &\ldots \cr
\hline
1 & R & &\ldots \cr
\hline
2 & R & &\ldots \cr
\hline
\vdots &\vdots&\vdots &\vdots \cr
\hline
x_1-1 & R &   &\ldots \cr
\hline
x_1   & R & R &\ldots \cr
\hline
x_1+1 &    & R &\ldots \cr
\hline
x_1+2 &    & R &\ldots \cr
\hline
\vdots & \vdots &\vdots & \vdots \cr
\hline
x_1+x_2-1 &  &  R& \ldots \cr
\hline
x_1+x_2 &  &   & \ldots \cr
\hline
x_1+x_2+1 &  &   & \ldots \cr
\hline
\vdots & \vdots &\vdots & \vdots \cr
\hline
n &   &   & \ldots\cr
\hline
\end{array}
\]
\end{definition}

\subsection{$\sum_{j=1}^k x_j$ and $|\bigcup_{j=1}^k C_j |$}

\begin{lemma}\label{le:overlap}
Let $n,m\in\nat$.
Let $A$ be a rectangle free subset of $\Gnm$.
Let $1\le j_1 < j_2 \le n$. Then
$|C_{j_1}\cap C_{j_2}|\le 1$.
\end{lemma}

\begin{proof}

As the following picture shows what happens if $|C_1\cap C_2|\ge 2$.
Note that a rectangle is formed. We leave it to the reader to make this
into a formal argument.

\[
\begin{array}{|c|c|c|c|}
\hline
  & 1 & 2  & \ldots \cr
\hline
1 & R & &\ldots \cr
\hline
2 & R & &\ldots \cr
\hline
\vdots &\vdots&\vdots &\vdots \cr
\hline
x_1-1 & R & R &\ldots \cr
\hline
x_1   & R & R &\ldots \cr
\hline
x_1+1 &    & R &\ldots \cr
\hline
x_1+2 &    & R &\ldots \cr
\hline
\vdots & \vdots &\vdots & \vdots \cr
\hline
x_1+x_2-2 &  & R & \ldots \cr
\hline
x+x_2+1-1 &  &   & \ldots \cr
\hline
\vdots & \vdots &\vdots & \vdots \cr
\hline
n &   &   & \ldots\cr
\hline
\end{array}
\]
\end{proof}

\begin{lemma}\label{le:inex}
Let $n,m\in\nat$. Let $1\le k\le m$.
Let $x_1,\ldots,x_k\in\nat$.
Assume $(x_1,\ldots,x_m)$ is $(n,m)$-placeable via $A$.
(We need not assume that $x_1\ge \cdots \ge x_m$ and
hence can use this for any set of columns.)
\begin{enumerate}
\item
$x_1+\cdots+x_k \le n+\binom{k}{2}.$
\item
If $\bigcap_{j=1}^k C_j\ne\es$ then $\sum_{j=1}^k x_j\le n+\sum_{j=2}^k (-1)^j\binom{k}{j}.$
\end{enumerate}
\end{lemma}

\begin{proof}

We begin with facts that are useful for all both parts.

By the law of inclusion-exclusion

$$
|\bigcup_{j=1}^k C_j|=\sum_{j=1}^k|C_j|-I_2+I_3-I_4+\cdots+(-1)^{k+1}I_k.
$$

Since $|C_j|=x_j$  we have

$$
|\bigcup_{j=1}^k C_j|=\sum_{j=1}^k x_j -I_2+I_3-I_4+\cdots+(-1)^{k+1}I_k.
$$

$$
\sum_{j=1}^k x_j  = |\bigcup_{j=1}^k C_j|
+ I_2 - I_3 +I_4+\cdots + (-1)^k I_k.
$$

Since $|\bigcup_{j=1}^k C_j | \le n$ we have

$$
\sum_{j=1}^k x_j \le n + I_2 - I_3 +I_4+\cdots + (-1)^k I_k.
$$

\smallskip

\noindent
1)  Assume $k$ is odd (the case of $k$ even is similar).

$$
\sum_{j=1}^k x_j \le n + I_2 + (I_4-I_3) + \cdots + (I_{k-1}-I_{k-2}) -I_k.
$$

Since $I_2 \le \binom{k}{2}$ and,
for $3\le j\le k-2$,  $(I_{j+1}-I_{j})\le 0$ and $-I_k\le 0$
we have

$$\sum_{j=1}^k x_j \le n + \binom{k}{2}.$$

\smallskip

\noindent
2) Since $C_1\cap \cdots \cap C_k \ne \es$,  for all $j$, $I_j = \binom{k}{j}$.

Hence
$$
\sum_{j=1}^k x_j\le n+\sum_{j=2}^k (-1)^j I_j=n+\sum_{j=2}^k(-1)^j\binom{k}{j}.$$

\smallskip

\end{proof}

It will be convenient to specify the $k=2$ case of Lemma~\ref{le:inex}.1.

\begin{lemma}\label{le:x1x2}
Let $n,m\in\nat$.
Assume $(x_1,\ldots,x_m)$ is $(n,m)$-placeable via $A$.
Then $x_1+x_2\le n+1$.
\end{lemma}

\subsection{Using ${\rm maxrf}$}

\begin{lemma}\label{le:maxrf1}
Let $n,m\in\nat$.
Let $x\le x_1\le n$.
Assume $(x_1,\ldots,x_m)$ is $(n,m)$-placeable via $A$.
Then
$$|A| \le x + m-1 +  \maxrf {n-x}{m-1}.$$
\end{lemma}

\begin{proof}
The following picture portrays what might happen in the  case of
$n=12$, $x_1=8$. We use double lines to partition the grid
in a way that will be helpful later.

\[
\begin{array}{|c|c||c|c|c|c|c|c|c|c|}
\hline
  & 1 & 2 & 3&4&5& \ldots & j & \cdots  & m\cr
\hline
1 & R & R &  & & & \cdots &   & \cdots        &\cr
\hline
2 & R &   & R& &   &\cdots &  &\cdots &\cr
\hline
3 & R &   &  &R&   &\cdots & &\cdots &\cr
\hline
4 & R &   &  & & R &\cdots & &\cdots &\cr
\hline
5 & R &   &  & &   &\cdots & &\cdots &\cr
\hline
6 & R &   &  & &   &\cdots & &\cdots &\cr
\hline
7 & R &   &  & &   &\cdots & &\cdots  &R \cr
\hline
8 & R &   &  & &   &\cdots &R&\cdots &\cr
\hline
\hline
9 &   & R & R& &   &\cdots & &\cdots  &\cr
\hline
10 &   &R  & &R&   &\cdots & &\cdots  &\cr
\hline
11 &   &R  & & &   &\cdots & &\cdots  &\cr
\hline
12 &   &R  & & &   &\cdots & &\cdots  &\cr
\hline
\end{array}
\]

We view this grid in three parts.

\noindent
{\bf Part 1:}
The first column. This has $x_1$ elements of $A$ in it.

\medskip

\noindent
{\bf Part 2:}
Consider the grid consisting of rows $1,\ldots,x_1$
and columns $2,\ldots,m$.
Look at the $j^\tth$ column, $2\le j\le m$ in this grid.
For each such $j$, this column has at most one element in $A$
(else there would be a rectangle using the first column).
Hence the total number of elements of $A$ from this part of
the grid is $m-1$.

\medskip

\noindent
{\bf Part 3:}
The bottom most $n-x_1$ elements of the right most $m-1$ columns.
This clearly has $\le \maxrf {n-x_1} {m-1}$ elements in it.

Taking all the parts into account we obtain

$$|A|\le x_1+ (m-1) + \maxrf {n-x_1} {m-1}.$$

We leave it as an exercise to show that, if $x\le x_1$, then

$$x_1+  (m-1) + \maxrf {n-x_1} {m-1} \le x+  (m-1) + \maxrf {n-x} {m-1}.$$
\end{proof}

\section{Tools for Finding Proper $c$-Colorings}\label{se:findprop}

\subsection{Strong $c$-colorings and Strong $(c,c')$-colorings}

\begin{definition}
Let $c,c',n,m\in\nat$ and
let $\chi:\Gnm \into [c]$.
$\chi$ is a
\emph{strong $(c,c')$-coloring}
if the following holds:
For all rectangles where
(1) the two right most corners are the same color, say $c_1$,
and (2) the two left most corners are the same color, say $c_2$,
we have $c_1\ne c_2$ and $c_1,c_2\in [c']$.
\end{definition}

\begin{definition}
Let $c,c',n,m\in\nat$.
$\Gnm$ is \emph{strongly $(c,c')$-colorable}
if it has a strong $(c,c')$-coloring.
\end{definition}

\begin{note}
Let $c,n,m\in\nat$ and
let $\chi:\Gnm \into [c]$.
If there are \emph{no} rectangles
such that
(1) the two right most corners are the same color
and (2) the two left most corners are the same color,
then, for all $c'$, $\chi$ is a strong $(c,c')$-coloring.
However, we will in this case take $c'=1$.
We call such colorings \emph{strong $c$-colorings}
\end{note}

\begin{example}\label{ex:strong}~
\begin{enumerate}
\item
The following is a strong $4$-coloring of $G_{5,8}$.

\[
\begin{array}{|c|c|c|c|c|c|c|c|}
\hline
1 & 1 & 1 & 4 & 1 & 1 & 4 & 4\cr
\hline
2 & 2 & 4 & 1 & 2 & 4 & 1 & 4\cr
\hline
3 & 4 & 2 & 2 & 4 & 2 & 4 & 1\cr
\hline
4 & 3 & 3 & 3 & 4 & 4 & 2 & 2\cr
\hline
4 & 4 & 4 & 4 & 3 & 3 & 3 & 3\cr
\hline
\end{array}
\]

\item
The following is a strong $3$-coloring of $G_{4,6}$.

\[
\begin{array}{|c|c|c|c|c|c|}
\hline
1 & 1 & 3 & 1 & 3 & 3 \cr
\hline
2 & 3 & 1 & 3 & 1 & 3 \cr
\hline
3 & 2 & 2 & 3 & 3 & 1 \cr
\hline
3 & 3 & 3 & 2 & 2 & 2 \cr
\hline
\end{array}
\]

\item
The following is a strong $(4,2)$-coloring of $G_{6,15}$.

\[
\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
1 & 1 & 1 & 1 & 1 & 3 & 3 & 3 &2&3 &3 &2 &2  & 2 & 2\cr
\hline
1 & 2 & 2 & 2 & 2 & 1 & 1 & 1 &1&4 &4 &3 &3 &3 & 2 \cr
\hline
2 & 1 & 3 & 3 & 2 & 1 & 2 & 2 &2&1 &1 &1 &4 &4 & 3 \cr
\hline
2 & 2 & 1 & 4 & 3 & 2 & 1 & 4 &3&1 &2 &2 &1  &1 & 4 \cr
\hline
3 & 3 & 2 & 1 & 4 & 2 & 2 & 1 &4&2 &1 &4 &1  &2 &1 \cr
\hline
4 & 4 & 4 & 2 & 1 & 4 & 4 & 2 &1&2 &2 &1 &2 & 1 &1 \cr
\hline
\end{array}
\]

\item
The following is a strong $(6,2)$-coloring of $G_{8,6}$.

\[
\begin{array}{|c|c|c|c|c|c|}
\hline
1 & 1 & 2 & 2 & 3 & 6 \cr
\hline
1 & 2 & 1 & 2 & 4 & 5 \cr
\hline
2 & 1 & 2 & 1 & 5 & 4\cr
\hline
2 & 2 & 1 & 1 & 6 & 3\cr
\hline
3 & 4 & 5 & 6 & 1 & 1\cr
\hline
4 & 5 & 6 & 4 & 1 & 1\cr
\hline
5 & 6 & 3 & 3 & 1 & 2\cr
\hline
6 & 3 & 4 & 5 & 1 & 2\cr
\hline
\end{array}
\]

\item
The following is a strong $(5,3)$-coloring of $G_{8,28}$.

\[
\begin{array}{cccccccccccccccccccccccccccc}
1 & 1 & 1 & 1 & 1 & 1 & 1  & 5 & 5 & 5 & 5 & 3 & 2 & 4 & 3 & 4 & 3 & 2 & 3 & 4 & 3 & 2 & 3 & 3 & 2 & 2 & 2 & 2 \cr
1 & 2 & 2 & 2 & 2 & 2 & 2  & 1 & 1 & 1 & 1 & 1 & 1 & 5 & 4 & 5 & 4 & 3 & 4 & 3 & 4 & 3 & 3 & 4 & 3 & 3 & 3 & 2 \cr
2 & 1 & 3 & 3 & 3 & 3 & 2  & 1 & 2 & 2 & 2 & 2 & 2 & 1 & 1 & 1 & 1 & 1 & 5 & 5 & 5 & 4 & 4 & 3 & 4 & 3 & 4 & 3 \cr
2 & 2 & 1 & 4 & 4 & 4 & 3  & 2 & 1 & 3 & 3 & 3 & 3 & 1 & 2 & 2 & 2 & 2 & 1 & 1 & 1 & 1 & 5 & 5 & 5 & 4 & 3 & 3 \cr
3 & 3 & 2 & 1 & 5 & 3 & 3  & 2 & 2 & 1 & 4 & 4 & 4 & 2 & 1 & 3 & 3 & 3 & 1 & 2 & 2 & 2 & 1 & 1 & 1 & 5 & 5 & 4 \cr
3 & 4 & 3 & 2 & 1 & 5 & 4  & 3 & 3 & 2 & 1 & 5 & 3 & 2 & 2 & 1 & 5 & 4 & 2 & 1 & 3 & 3 & 1 & 2 & 2 & 1 & 1 & 5 \cr
4 & 3 & 4 & 3 & 2 & 1 & 5  & 3 & 4 & 3 & 2 & 1 & 5 & 3 & 3 & 2 & 1 & 5 & 2 & 2 & 1 & 5 & 2 & 1 & 3 & 1 & 2 & 1 \cr
5 & 5 & 5 & 5 & 3 & 2 & 1  & 4 & 3 & 4 & 3 & 2 & 1 & 3 & 5 & 3 & 2 & 1 & 3 & 3 & 2 & 1 & 2 & 2 & 1 & 2 & 1 & 1 \cr
\end{array}
\]

\end{enumerate}
\end{example}

\begin{lemma}\label{le:strong}
Let $c,c',n,m\in\nat$. Let $x=\floor{c/c'}$.
If $\Gnm$ is strongly $(c,c')$-colorable
then $G_{n,xm}$ is $c$-colorable.
\end{lemma}

\begin{proof}

Let $\chi$ be a strong $(c,c')$-coloring of $\Gnm$.
Let the colors be $\{1,\ldots,c\}$.
Let $\chi^i$ be the coloring
$$\chi^i(a,b) = \chi(a,b)+i \pmod c.$$
(During calculations mod $c$ we use $\{1,\ldots,c\}$
instead of the more conventional $\{0,\ldots,c-1\}$.)

Take $\Gnm$ with coloring $\chi$.
Place next to it $\Gnm$ with coloring $\chi^{c'}$.
Then place next to that $\Gnm$ with coloring $\chi^{2c'}$
Keep doing this until you have $\chi^{(x-1)c'}$ placed.
The following is an example using the strong $(6,2)$-coloring
of $G_{8,6}$ in Example~\ref{ex:strong}.4.
Since $c'=2$ and $x=3$ we will be shifting the colors
first by 2 then by 4.

\[
\begin{array}{cccccc|cccccc|cccccc}
1 & 1 & 2 & 2 & 3 & 6 	& 3 & 3 & 4 & 4 & 5 & 2 &   5 & 5 & 6 & 6 & 1 & 4 \cr
1 & 2 & 1 & 2 & 4 & 5   & 3 & 4 & 3 & 4 & 6 & 2 &   5 & 6 & 5 & 5 & 2 & 4 \cr
2 & 1 & 2 & 1 & 5 & 4   & 4 & 3 & 4 & 3 & 1 & 6 &   6 & 5 & 6 & 5 & 3 & 2 \cr
2 & 2 & 1 & 1 & 6 & 3   & 4 & 4 & 3 & 3 & 2 & 5 &   6 & 6 & 5 & 5 & 4 & 2 \cr
3 & 4 & 5 & 6 & 1 & 2   & 5 & 6 & 2 & 2 & 3 & 4 &   1 & 2 & 4 & 4 & 5 & 6 \cr
4 & 5 & 6 & 4 & 1 & 1   & 6 & 1 & 2 & 6 & 3 & 3 &   2 & 3 & 4 & 2 & 5 & 5 \cr
5 & 6 & 3 & 3 & 1 & 2   & 1 & 2 & 5 & 5 & 3 & 4 &   3 & 4 & 1 & 1 & 5 & 6 \cr
6 & 3 & 4 & 5 & 1 & 2   & 2 & 5 & 6 & 1 & 3 & 4 &   4 & 1 & 2 & 3 & 5 & 6 \cr
\end{array}
\]

We claim that the construction always creates a $c$-coloring of
$G_{m,xn}$.

We show that there is no rectangle with the two leftmost
points from the first $\Gnm$.  From this, to show that there are no
rectangles at all is just a matter of notation.

Assume that in column $i_1$ there are two points colored $R$
(in this proof $1\le R,B,G\le c$.)  We call
these \emph{the $i_1$-points}.  The points cannot form a rectangle
with any other points in $\Gnm$ since $\chi$ is a $c$-coloring
of $\Gnm$.  The $i_1$-points cannot form a rectangle with points in
columns $i_1+m$, $i_1+2m$, $\ldots$, $i_1+(c-1)m$ since the colors of
those points are $R+c'\pmod c$, $R+2c'\pmod c$, $\ldots$,
$R+(x-1)c'\pmod c$, all of which are not equal to $R$.  Is there a
$1\le j\le x-1$ and a $1\le i_2\le m$ such that the $i_1$-points form
a rectangle with points in column $i_2+jm$?

Since $\chi$ is a strong $(c,c')$-coloring,
points in column $i_2$ and on the same row as the $i_1$-points
are either colored \emph{differently}, or both colors are in $[c']$.
We consider both of these cases.

\noindent
{\bf Case 1:}
In column $i_2$ the colors are $B$ and $G$ where $B\ne G$
(it is possible that $B=R$ or $G=R$ but not both).
By the construction the points in column
$i_2+jm$ are colored $B+jc' \pmod c$ and $G+jc'\pmod c$.
These points are colored differently, hence they cannot form a rectangle
with the $i_1$-points.

\[
\begin{array}{ccccc|ccccc}
\cdots & i_1 & \cdots   & i_2 & \cdots & \cdots &  i_1+jm    & \cdots& i_2+jm &  \cdots \cr
\hline
\cdots & R   & \cdots   & B  & \cdots   & \cdots &  R+jc'&\cdots & B+jc'  & \cdots \cr
\cdots & R   & \cdots   & G  & \cdots   & \cdots  & R+jc'&\cdots & G+jc' & \cdots \cr
\end{array}
\]

\bigskip

\noindent
{\bf Case 2:}
In column $i_2$ the colors are both $B$.

\[
\begin{array}{ccccc|ccccc}
\cdots & i_1 & \cdots & i_2  & \cdots & \cdots  & i_1+jm    & \cdots& i_2+jm  & \cdots \cr
\hline
\cdots &  R   & \cdots   & B &  \cdots   & \cdots  & R+jc'&\cdots & B+jc' & \cdots \cr
\cdots &  R   & \cdots   & B  & \cdots   & \cdots  & R+jc'&\cdots & B+jc' & \cdots \cr
\end{array}
\]

We have $R,B\in [c']$.
By the construction the points in column
$i_2+jm$ are both colored $B+jc'\pmod c$.
We show that $R\not\equiv B+jc'\pmod c$.
Since $1\le j\le x-1$ we have
$$c' \le jc' \le (x-1)c'.$$
Hence
$$B+c' \le B+jc' \le B+(x-1)c'.$$
Since $B\in [c']$ we have $B+(x-1)c' \le xc'$.
Hence
$$B+c' \le B+jc' \le xc'.$$
By the definition of $x$ we have $xc' \le c$.
Since $B\in [c']$ we have $B+c' \ge c'+1$.
Hence
$$c'+1 \le B+jc' \le c.$$
Since $R\in [c']$ we have that $R\not\equiv B+jc'$.
\end{proof}

\subsection{Using Combinatorics and Strong $(c,c')$-Colorings}

\begin{theorem}\label{th:cplusone}
Let $c\ge 2$.
\begin{enumerate}
\item
There is a strong $c$-coloring of $G_{c+1,\binom{c+1}{2}}$.
\item
There is a $c$-coloring of $G_{c+1,m}$ where $m=c \binom{c+1}{2}$.
\end{enumerate}
\end{theorem}

\begin{proof}

\noindent
1) We first do an example of our construction. In the $c=5$ case
we obtain the following coloring.

\[
\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
5 & 5 & 5 & 5 & 5 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \cr
\hline
5 & 1 & 1 & 1 & 1 & 5 & 5 & 5 & 5 & 2 & 2 & 2 & 2 & 2 & 2 \cr
\hline
1 & 5 & 2 & 2 & 2 & 5 & 2 & 2 & 2 & 5 & 5 & 5 & 3 & 3 & 3 \cr
\hline
2 & 2 & 5 & 3 & 3 & 2 & 5 & 3 & 3 & 5 & 3 & 3 & 5 & 5 & 4 \cr
\hline
3 & 3 & 3 & 5 & 4 & 3 & 3 & 5 & 4 & 3 & 5 & 4 & 5 & 4 & 5 \cr
\hline
4 & 4 & 4 & 4 & 5 & 4 & 4 & 4 & 5 & 4 & 4 & 5 & 4 & 5 & 5 \cr
\hline
\end{array}
\]

Here is our general construction.
Index the columns by the ${ \binom{[c+1]}{2} }$.
Color rows of column $\{x,y\}$, $x<y$,  as follows.
\begin{enumerate}
\item
Color rows $x$ and $y$ with color $c$.
\item
On the other spots use the colors $\{1,2,3,\ldots,c-1\}$
in increasing order (the actual order does not matter).
\end{enumerate}

\smallskip

\noindent
2) This follows from Lemma~\ref{le:strong} with $c=c$ and $c'=1$,
and Part~(1) of this theorem.
\end{proof}

The next theorem generalizes Theorem~\ref{th:cplusone}.

\begin{theorem}\label{th:cplusgen}
Let $c,c'\in \nat$ with $c\ge 2$ and $1\le c'\le c$.
\begin{enumerate}
\item
There is a strong $(c,c')$-coloring of $G_{c+c',m}$ where $m= \binom{c+c'}{2}$.
\item
There is a $c$-coloring of $G_{c+c',m'}$ where $m'=\floor{c/c'}\binom{c+c'}{2}$.
\end{enumerate}
\end{theorem}

To prove Theorem~\ref{th:cplusgen}, we will use a partition of
$\binom{[2n]}{2}$ into perfect matchings of $[2n]$ for certain values
of $n$.  Each perfect matching thus has size $n$.

We first give some examples and then a general lemma.

\begin{example}\label{ex:k3}~
\begin{enumerate}
\item
If $n=3$, $2n=6$, $2n-1=5$.
We show a partition of $\binom{[6]}{2}$ into
5 parts of size 3.
We first pair up the elements as follows, each number in the top row
being paired with the number below it:

\[
\begin{array}{|c|c|c|}
1 & 2 & 3 \cr
6 & 5 & 4 \cr
\end{array}
\]

This corresponds to $\{1,6\}$, $\{2,5\}$, $\{3,4\}$.
This is our first part of size 3.

We keep 1 fixed and keep rotating the other numbers clockwise to obtain the
following parts.

\[
\begin{array}{|c|c|c|}
1 & 6 & 2 \cr
5 & 4 & 3 \cr
\end{array}
\]

\[
\begin{array}{|c|c|c|}
1 & 5 & 6 \cr
4 & 3 & 2 \cr
\end{array}
\]

\[
\begin{array}{|c|c|c|}
1 & 4 & 5 \cr
3 & 2 & 6 \cr
\end{array}
\]

\[
\begin{array}{|c|c|c|}
1 & 3 & 4 \cr
2 & 6 & 5 \cr
\end{array}
\]

Note that the first pair went
$\{1,5\}$, $\{1,4\}$, $\{1,3\}$, $\{1,2\}$.
That is, 1 was fixed but the other element decreased by 1.
Also note that the second and third pair had both elements
decrease by 1 except 2 goes to 6. This partition is a special
case of a general construction we will have later.
The same applies to the next example.

\item
If $n=4$, $2n=8$, $2n-1=7$.
Here is a partition of $\binom{[8]}{2}$ into
7 parts of size 4.

We keep 1 fixed and keep rotating the other numbers clockwise to obtain the
following parts.

\[
\begin{array}{|c|c|c|c|}
1 & 2 & 3 & 4\cr
8 & 7 & 6 & 5\cr
\end{array}
\]

\[
\begin{array}{|c|c|c|c|}
1 & 8 & 2 & 3\cr
7 & 6 & 5 & 4\cr
\end{array}
\]

\[
\begin{array}{|c|c|c|c|}
1 & 7 & 8 & 2\cr
6 & 5 & 4 & 3\cr
\end{array}
\]

\[
\begin{array}{|c|c|c|c|}
1 & 6 & 7 & 8\cr
5 & 4 & 3 & 2\cr
\end{array}
\]

\[
\begin{array}{|c|c|c|c|}
1 & 5 & 6 & 7\cr
4 & 3 & 2 & 8\cr
\end{array}
\]

\[
\begin{array}{|c|c|c|c|}
1 & 4 & 5 & 6\cr
3 & 2 & 8 & 7\cr
\end{array}
\]

\[
\begin{array}{|c|c|c|c|}
1 & 3 & 4 & 5\cr
2 & 8 & 7 & 6\cr
\end{array}
\]

\end{enumerate}
\end{example}

The next lemma shows that such partitions
always exist. The lemma (and the examples above)
is based on the Wikipedia entry on Round Robin tournaments.
We present a proof for completeness.

\begin{lemma}\label{le:rr}
Let $n\in \nat$.
$\binom{[2n]}{2}$ can be
partitioned into $2n-1$ sets $P_1,\ldots,P_{2n-1}$, each of size $n$,
such that each $P_i$ is itself a partition of
$[2n]$ into pairs (i.e., a perfect matching).
\end{lemma}

\begin{proof}
Following the examples above, we define the cyclic permutation $\rho$ on
$\{2,3,\ldots,2n\}$ as follows:
\[ \rho(x) = \left\{ \begin{array}{ll}
x-1 & \mbox{if $2 < x \le 2n$,} \\
2n   & \mbox{if $x=2$,}
\end{array} \right. \]
for all $x\in\{2,3,\ldots,2n\}$.  Then for each $1\le i \le 2n-1$, we
define
\[ P_i = \left\{\; \{1,2n-i+1\}\; \right\} \cup \left\{\;
\{\rho^{(i-1)}(j), \rho^{(i-1)}(2n-j+1)\} \mid 2\le j \le n
\right\}, \]
noting that $2n-i+1 = \rho^{(i-1)}(2n)$.  It is not too hard to see
that each $P_i$ contains exactly $n$ pairwise disjoint pairs, so it
suffices to show that no pair appears in two different $P_i$.
Clearly, no pair of the form $\{1,x\}$ can appear in more than one
$P_i$.  Suppose $\{x,y\}$ appears in both $P_i$ and $P_j$ for some $i
< j$, where $2\le x,y\le 2n$.  Then without loss of generality, $x$
appears in the top row of $P_i$ with $y$ just below it.  If $x$ is
still in the top row of $P_j$, then $x$ has shifted to the right and
$y$ to the left, and so $x$ and $y$ are not vertically aligned in
$P_j$, which means that $\{x,y\}\notin P_j$.  So it must be that $x$
is on the bottom row of $P_j$ with $y$ just above it.  But for this to
happen, $x$ and $y$ would have to rotate different amounts from $P_i$
to $P_j$ (one an even distance and the other an odd distance), but
they rotate the same amount, namely, $j-i$ spaces---contradiction.
Thus the $P_i$ are as required.
\end{proof}

\begin{proof}[Proof of Theorem~\ref{th:cplusgen}]

\noindent
1)
Here is our general construction.  We split into two cases.

\paragraph{Case 1: $c+c'$ is even.}  Then $c+c' = 2n$ for some $n$.
Since $c'\le c$, we also have $c' \le n$.  Let $P_1,\ldots,P_{2n-1}$
be the partition of $[2n]$ of Lemma~\ref{le:rr}.  Index the elements
of each $P_i$ as $p_{i,j}$ for $1\le j\le n$, that is, $P_i =
\{p_{i,1},p_{i,2},\ldots,p_{i,n}\}$.  We break up the columns into
$2n-1$ blocks of $n$ columns each (note that $n(2n-1) =
\binom{2n}{2}$).  We color the $j^\tth$ column in the $i^\tth$ block as
follows:
\begin{itemize}
\item Assign color $1$ to the two elements of $p_{i,(j+1)\bmod n}$,
\item Assign color $2$ to the two elements of $p_{i,(j+2)\bmod n}$,
\item $\vdots$
\item Assign color $c'$ to the two elements of $p_{i,(j+c')\bmod n}$,
\item Assign the colors $c'+1,\ldots,c$ one each to the rest of
  the elements in the column in increasing order.
\end{itemize}

Suppose some pair $p_{i,k} = \{x,y\}$ is monochrome in two separate columns.
Then both these columns must be in the $i^\tth$ block, the $j_1^\sst$ column
(colored $c_1$) and
$j_2\nnd$ column (colored $c_2$), say.  Then we must have
\[ k = (j_1+c_1) \bmod n = (j_2+c_2) \bmod n. \]
Since $j_1 \ne j_2$, we must have $c_1 \ne c_2$.

\paragraph{Case 2: $c+c'$ is odd.}  Then we choose a simpler
partition.  Let $c+c' = 2n+1$ for some $n$.  Since $c' < c$, we also
have $c' \le n$.  For $1\le i\le 2n+1$ and $1\le j\le n$,
define
\[ p_{i,j} = \{ (i+j)\bmod (2n+1), (i-j)\bmod (2n+1) \} \in
\binom{[2n+1]}{2}, \]
and let
\[ P_i = \{p_{i,1},\ldots,p_{i,n}\}. \]
It is not too hard to see that all the pairs within the same $P_i$ are
pairwise disjoint and that no pair is contained in more than one
$P_i$.

We now proceed with exactly the same recipe as in Case~1, except that,
noting that $\binom{2n+1}{2} = n(2n+1)$, we group the columns into
$2n+1$ blocks of $n$ columns each.
We get a strong $(c,c')$-coloring just as in Case~1.

\noindent
2) This follows from Lemma~\ref{le:strong} and Part~(1) of this theorem.
\end{proof}

\begin{corollary}\label{co:rr}
For all $c\ge 2$ there is
a $c$-coloring of $G_{2c,2c^2-c}.$
\end{corollary}

\subsection{Using Finite Fields and Strong $c$-Colorings}

\newcommand{\pairs}{{\rm pairs}}

\begin{definition}
Let $X$ be a finite set and $q\in\nat$, $q\ge 3$.
Let $P\subseteq \binom{X}{q}$.
$$
\pairs(P)=
\{\{a_1,a_2\}\in \binom{X}{2} \st (\exists a_3,\ldots,a_q)[\{a_1,\ldots,a_q\}\in P]\}.
$$
\end{definition}

\begin{example}
Let $X=\{1,2,3,4,5,6,7,8,9\}$.
Let $q=3$.
\begin{enumerate}
\item
Let $P= \{ \{1,2,6\}, \{1,8,9\}, \{2,4,6\} \}.$
Then
$$\pairs(P)= \{ \{1,2\}, \{1,6\}, \{2,6\}, \{1,8\}, \{1,9\},
\{8,9\}, \{2,4\}, \{4,6\} \}$$
\item
Let $P= \{ \{1,2,3\}, \{4,5,6\}, \{7,8,9\} \}$.
Then
$$\pairs(P)=\{ \{1,2\}, \{1,3\}, \{2,3\}, \{4,5\}, \{4,6\}, \{5,6\},
\{7,8\}, \{7,9\}, \{8,9\} \}.$$
\end{enumerate}
\end{example}

\begin{lemma}\label{le:partitions}
Let $c,m,r\in \nat$.
Assume that there exists $P_1,\ldots,P_m \subseteq\binom{[cr]}{r}$
such that the following hold.
\begin{itemize}
\item
For all $1\le j\le m$, $P_j$ is a partition of $[cr]$ into
$c$ parts of size $r$.
\item
For all $1\le j_1<j_2\le m$, $\pairs(P_{j_1})\cap\pairs(P_{j_2})=\es$.
\end{itemize}
Then
\begin{enumerate}
\item
$G_{cr,m}$ is strongly $c$-colorable.
\item
$G_{cr,cm}$ is $c$-colorable.
\end{enumerate}
\end{lemma}

\begin{proof}

\noindent
1)

We define a strong $c$-coloring $\COL$ of $G_{cr,m}$ using $P_1,\ldots,P_m$.

Let  $1\le j\le m$.
Let
$$P_j = \{ L_j^1,\ldots, L_j^c\}$$
where each $L_j^i $ is a subset of $r$ elements from $[cr]$.

Let $1\le i\le cr$ and $1\le j\le m$.
Since $P_j$ is a partition of $[cr]$ there exists a unique
$u$ such that $i\in L_j^u$.
Define
$$\COL(i,j)=u.$$

We show that this is a strong $c$-coloring.
Assume, by way of contradiction, that there exists
$1\le i_1<i_2\le 2k$ and $1\le j_1<j_2\le 2k-1$ such that
$\COL(i_1,j_1)=\COL(i_1,j_2)=u$ and
$\COL(i_2,j_1)=\COL(i_2,j_2)=v$.
By definition of the coloring we have
$$i_1\in L_{j_1}^u, i_1\in L_{j_2}^u,i_2\in L_{j_1}^v, i_2\in L_{j_2}^v$$
Then
$$\{i_1,i_2\} \in \pairs(P_{j_1})\cap \pairs(P_{j_2}),$$
contradicting the second premise on the $P$'s.

\noindent
2) This follows from Part~(1) and Lemma~\ref{le:strong} with $c=c$
and $c'=1$.
\end{proof}

The Round Robin partition of Lemma~\ref{le:rr} is an example of a
partition satisfying the premises of Lemma~\ref{le:partitions}, where $c=n$,
$r=2$, and $m = 2n-1 = 2c-1$.  The next theorem yields partitions with
bigger values of $r$.

\begin{theorem}\label{th:primepower}
Let $p$ be a prime and $s,d\in\nat$.
Let $c=p^{ds-s}$, $r=p^s$, and $m=\frac{p^{ds}-1}{p^s-1}$.
Then $G_{cr,cm}$ is $c$-colorable.
\end{theorem}

\begin{proof}
We show that there exists $P_1,\ldots,P_m$
satisfying the premise of Lemma~\ref{le:partitions}.
The result follows immediately.

Let $F$ be the finite field on $p^s$ elements.
We identify $[cr]$ with the set $F^d$.

\begin{definition}~
\begin{enumerate}
\item
Let $\vec x\in F^d$, $\vec y \in F^d-\{0^d\}$.
Then
$$L_{\vec x,\vec y}=\{ \vec x + f\vec y \mid f\in F \}.$$
Sets of this form are called \emph{lines}.
Note that for all $\vec x, \vec y, a\in F$ with $a\ne 0$,
$$L_{\vec x,\vec y} = L_{\vec x,a\vec y}.$$
\item
Two lines $L_{\vec x,\vec y}$, $L_{\vec z,\vec w}$ \emph{have the same slope} if
$\vec y$ is a multiple of $\vec w$.
\end{enumerate}
\end{definition}

The following are easy to prove and well-known.
\begin{itemize}
\item
If $L$ and $L'$ are two distinct lines that have the same slope, then
$L\cap L' = \es$.
\item
If $L$ and $L'$ are two distinct lines with different slopes, then
$|L\cap L'| \le 1$.
\item
If $L$ is a line then there are exactly $r=p^s$ points on $L$.
\item
If $L$ is a line then there are exactly $c=p^{ds-s}$ lines that have the same slope as $L$ (this includes $L$ itself).
\item
There are exactly $\frac{p^{ds}-1}{p^s-1}$ different slopes.
\end{itemize}

We define $P_1,\ldots,P_m$ as follows.
\begin{enumerate}
\item
Pick a line $L$.
Let $P_1$ be the set of lines that
have the same slope as $L$.
\item
Assume that $P_1,\ldots,P_{j-1}$ have been defined and that $j\le m$.
Let $L$ be a line that is not in $P_1\cup \cdots \cup P_{j-1}$.
Let $P_j$ be the set of all lines that
have the same slope as $L$.
\end{enumerate}

We need to show that $P_1,\ldots,P_m$ satisfies the premises
of Lemma~\ref{le:partitions}

\smallskip

\noindent
a) For all $1\le j\le m$, $P_j$ is a partition of $[cr]$ into $c$
parts of size $r$.
Let $L\in P_j$. Note that $P_j$ is the set of all lines with
the same slope as $L$. Clearly this partitions $F^{sd}$ which is $[cr]$.

\smallskip

\noindent
b) For all $1\le j_1<j_2\le m$, $\pairs(P_{j_1})\cap\pairs(P_{j_2})=\es$.
Let $L_1$ be any line in $P_{j_1}$ and
$L_2$ be any line in $P_{j_2}$. Since $|L_1\cap L_2| \le 1 < 2$
we have the result.

\smallskip

Note that each $P_j$ has $c=p^{ds-s}$ sets (lines) in it,
each set (line) has $r=p^s$ numbers (points),
and there are $m=\frac{p^{ds}-1}{p^s-1}$ many $P$'s.
Hence the premises of Lemma~\ref{le:partitions}
are satisfied.
\end{proof}

It is convenient to state the $s=1$, $d=2$ case of Theorem~\ref{th:primepower}.

\begin{corollary}\label{co:prime}
Let $p$ be a prime.
\begin{enumerate}
\item
There is a strong $p$-coloring of $G_{p^2,p+1}$.
\item
There is a $p$-coloring of $G_{p^2,p^2+p}$.
\end{enumerate}
\end{corollary}

\begin{note}
It would be of interest to obtain a Lemma similar
to Theorem~\ref{th:primepower} that does not
need prime powers and possibly yields strong $(c,c')$-colorings.
\end{note}

\section{Bounds on the Sizes of Obstruction Sets}\label{se:bounds}

\subsection{An Upper Bound}

Using the uncolorability bounds, we can obtain an upper-bound on the
size of a $c$-colorable grid.

\begin{theorem}\label{th:csq}
\label{obsupperbound}
For all $c > 0$, $G_{c^2+c, c^2+c}$ is not $c$-colorable.
\end{theorem}

\begin{proof}
We apply Corollary \ref{uncolor3} with $m=c^2+c$ and $n=c^2+c$.  Note that

\begin{align*}
\bigceiling{\frac{nm}{c}} & = \bigceiling{\frac{(c^2+c)(c^2+c)}{c}} \\
&=  (c+1)(c^2+c).
\end{align*}

\noindent Letting $q = c+1$ and $r = 0$, we have

\begin{align*}
\frac{m(m-1)-2qr}{q(q-1)} & = \frac{(c^2+c)(c^2+c-1)}{(c+1)c}\\
& = c^2+c-1 \\
& < c^2+c\\
& = n.
\end{align*}\end{proof}

Using this, we can obtain an upper-bound on the size of an obstruction set.

\begin{theorem}\label{th:obsc}
If $c > 0$, then $|\OBS_c|\le 2c^2$.
\end{theorem}

\begin{proof}
For each $r$, there can be at most one $c$-minimal grid of the form
$G_{r,n}$.  Likewise, there can be at most one $c$-minimal grid of the
form $G_{n,r}$.  If $r \leq c$ then for all $n$, $G_{r,n}$ and
$G_{n,r}$ are trivially $c$-colorable and are, therefore, not
$c$-minimal.  Theorem \ref{obsupperbound} shows that for all $n,m >
c^2+c$, $\Gnm$ is not $c$-minimal.  It follows that there can be at
most two $c$-minimal grids for each integer $r$ where $c < r \leq
c^2+c$.  Therefore there are at most $2c^2$ $c$-minimal grids in
$\OBS_c$.
\end{proof}

\subsection{A Lower Bound}

To get a lower bound on $|\OBS_c|$, we will combine
Corollary~\ref{uncolor2a} and Theorem~\ref{th:cplusgen}(2) with the
following lemma:

\begin{lemma}\label{le:finding-obs}
Suppose that $G_{m_1,n}$ is $c$-colorable and $G_{m_2,n}$ is not
$c$-colorable.  Then there exists a grid $G_{x,y}\in\OBS_c$ such that
$m_1 < x \le m_2$ (and in addition, $y \le n$).
\end{lemma}

\begin{proof}
Given $n$, let $x$ be least such that $G_{x,n}$ is not $c$-colorable.
Clearly, $m_1 < x \le m_2$.  Now given $x$ as above, let $y$ be least
such that $G_{x,y}$ is not $c$-colorable.  Clearly, $y \le n$ and
$G_{x,y}\in\OBS_c$.
\end{proof}

\begin{theorem}
$|\OBS_c| \ge 2\sqrt{c}(1-o(1))$.
\end{theorem}

\begin{proof}
For any $c \ge 2$ and any $1\le c' \le c$ we can summarize
Corollary~\ref{uncolor2a} and Theorem~\ref{th:cplusgen}(2) as follows:
\[ G_{c+c',n} \mbox{ is } \left\{ \begin{array}{ll}
\mbox{$c$-colorable } & \mbox{if $n \le \floor{\frac{c}{c'}}\binom{c+c'}{2}$,}
\\
\mbox{not $c$-colorable } & \mbox{if $n > \frac{c}{c'}\binom{c+c'}{2}$.}
\end{array} \right. \]
(We won't use the fact here, but note that this is completely tight if
$c'$ divides $c$.)

Suppose $c'>1$ and
\begin{equation}\label{eq:obs}
\frac{c}{c'}\binom{c+c'}{2} < \floor{\frac{c}{c'-1}}\binom{c+c'-1}{2}.
\end{equation}
Then letting $n := \floor{\frac{c}{c'-1}}\binom{c+c'-1}{2}$, we see that
$G_{c+c'-1,n}$ is $c$-colorable, but $G_{c+c',n}$ is not.  Then by
Lemma~\ref{le:finding-obs}, there is a grid $G_{c+c',y} \in \OBS_c$
for some $y$.  So there are at least as many elements of $\OBS_c$ as
there are values of $c'$ satisfying Inequality~(\ref{eq:obs})---actually
twice as many, because $\Gnm\in \OBS_c$ iff $\Gmn\in OBS_c$.

Fix any real $\eps > 0$.  Clearly, Inequality~(\ref{eq:obs}) holds provided
\[ \frac{c}{c'}\binom{c+c'}{2} \le
\left(\frac{c}{c'-1}-1\right)\binom{c+c'-1}{2}. \]
A rather tedious calculation reveals that if $2 \le c' \le
(1-\eps)\sqrt{c}$, then this latter inequality holds for all large
enough $c$.  Including the grid $G_{c+1,n}\in\OBS_c$ where $n =
c\binom{c+1}{2}+1$, we then get $|\OBS_c| \ge \floor{(1-\eps)\sqrt{c}}$
for all large enough $c$, and since $\eps$ was arbitrary, we therefore
have $|\OBS_c| \ge \sqrt{c}(1-o(1))$.

To double the count, we notice that $c+c' \le
\floor{\frac{c}{c'}}\binom{c+c'}{2}$, whence $G_{c+c',c+c'}$ is
$c$-colorable by Theorem~\ref{th:cplusgen}(2).  This means that
$G_{c+c',y}\in\OBS_c$ for some $y > c+c'$, and so we can count
$G_{y,c+c'}\in\OBS_c$ as well without counting any grids twice.
\end{proof}

\section{Which Grids Can be Properly 2-Colored?}\label{se:2col}

\begin{lemma}\label{le:col2}~
\begin{enumerate}
\item
$G_{7,3}$ and $G_{3,7}$ are not 2-colorable
\item
$G_{5,5}$ is not 2-colorable.
\item
$G_{7,2}$ and $G_{2,7}$ are 2-colorable (this is trivial).
\item
$G_{6,4}$ and $G_{4,6}$ are 2-colorable.
\end{enumerate}
\end{lemma}

\begin{proof}

We only consider grids of the form $\Gnm$ where $n\ge m$.

\noindent
1,2)

The following table, along with Corollary~\ref{uncolor1},
shows why $G_{7,3}$ and $G_{5,5}$ are not 2-colorable.

\begin{table}[htbp]

\centering
\begin{tabular}{c c c c}
$m$ & $n$ & $z_{n,m}$ & $\lceil \frac{nm}{c} \rceil$ \\ [0.5ex]
\hline\hline
3 & 7 & 11 & 11 \\
5 & 5 & 13 & 13 \\
\hline
\end{tabular}
\caption{Uncolorability values for $c=2$ \label{table:2colortab}}
\end{table}

\smallskip

\noindent
3) $G_{7,2}$ is clearly 2-colorable.

\smallskip

\noindent
4) $G_{6,4}$ is 2-colorable
by Corollary~\ref{co:prime} with $p=2$.

\end{proof}

\begin{theorem}\label{th:obs2}
$\OBS_2 =\{G_{7,3},G_{5,5},G_{3,7}\}$.
\end{theorem}

\begin{proof}

$G_{7,3}$ is not $2$-colorable by Lemma~\ref{le:col2}.
$G_{6,3}$ is $2$-colorable by Lemma~\ref{le:col2}.
$G_{7,2}$ is $2$-colorable by Lemma~\ref{le:col2}.
Hence $G_{7,3}$ is $2$-minimal.
The proof for $G_{3,7}$ is similar.

$G_{5,5}$ is not $2$-colorable by Lemma~\ref{le:col2}.
$G_{5,4}$ and $G_{4,5}$ are $2$-colorable by Lemma~\ref{le:col2}.
Hence $G_{5,5}$ is $2$-minimal.

We need to show that $G_{7,3}$, $G_{5,5}$, and $G_{3,7}$ are the
only 2-minimal grids.
We consider the different possible values of $n$ with $m\le n$
and then use symmetry.
\[
\begin{array}{|c|c|c|}
\hline
n & m\le n & \hbox{comment} \cr
\hline
1, 2, 3, 4  & \hbox{ any $m \le n$ } & G_{n,m}\hbox{ is 2-colorable  by Lemma~\ref{le:col2}} \cr
\hline
n  & 1,2 & G_{n,m}\hbox{ is 2-colorable  by Lemma~\ref{le:col2}} \cr
\hline
5   & 3,4 & G_{n,m}\hbox{ is 2-colorable  by Lemma~\ref{le:col2}} \cr
\hline
5   & 5 & G_{5,5}\in \OBS_2 \cr
\hline
6   & 3,4 & G_{n,m}\hbox{ is 2-colorable  by Lemma~\ref{le:col2}} \cr
\hline
6 & 5,6 &  G_{n,m} \hbox{ is not 2-minimal since $G_{5,5}$ not 2-colorable } \cr
\hline
7   & 3 & G_{7,3}\in \OBS_2 \cr
\hline
n\ge 7 & 4,\ldots,n&  G_{n,m} \hbox{ is not 2-minimal since $G_{7,3}$ not 2-colorable } \cr
\hline
\end{array}
\]
\end{proof}

The following chart indicates exactly which grids are 2-colorable.
The entry for $(n,m)$ is $C$ if $\Gnm$ is 2-colorable, and
$N$ if $\Gnm$ is not 2-colorable.

 \[
 \begin{array}{|c|c|c|c|c|c|c|c|}
 \hline
      & 2 &  3 &  4 &  5 &  6 &  7 & 8  \cr
\hline
  2&    C &  C &  C &  C &  C  & C & C \cr
 \hline
  3&    C &  C &  C &  C &  C  & N & N \cr
 \hline
  4&    C &  C &  C &  C &  C  & N & N  \cr
 \hline
  5&    C &  C &  C &  N &  N  & N & N  \cr
 \hline
  6&    C &  C  & C  & N  & N  & N & N  \cr
 \hline
  7&    C &  N  & N  & N  & N  & N & N \cr
 \hline
  8&    C &  N  & N  & N  & N  & N & N \cr
 \hline
 \end{array}
 \]

\section{Which Grids Can be Properly 3-Colored?}\label{se:3col}

\begin{lemma}\label{le:col3}~
\begin{enumerate}
\item
$G_{19,4}$ and $G_{4,19}$ are  not 3-colorable.
\item
$G_{16,5}$ and $G_{5,16}$ are not 3-colorable.
\item
$G_{13,7}$ and $G_{7,13}$ are not 3-colorable.
\item
$G_{12,10}$ and $G_{10,12}$ are not 3-colorable.
\item
$G_{11,11}$ is not 3-colorable.
\item
$G_{19,3}$ and $G_{3,19}$ are 3-colorable (this is trivial).
\item
$G_{18,4}$ and $G_{4,18}$ are  3-colorable.
\item
$G_{15,6}$ and $G_{6,15}$ are 3-colorable.
\item
$G_{12,9}$ and $G_{9,12}$ are 3-colorable.
\end{enumerate}
\end{lemma}

\begin{proof}We just consider the grids $G_{n,m}$ were $n\ge m$.

\noindent
$1,2,3,4,5$)

Table~\ref{table:3colortab}, along with Corollaries~\ref{uncolor1} and \ref{uncolor2},
shows why $G_{19,4}$, $G_{16,5}$, $G_{13,7}$, $G_{12,10}$, and
$G_{11,11}$ are not $3$-colorable.

\begin{table}[htbp]
\centering
\begin{tabular}{c c c c c c c}
$m$ & $n$ & $z_{n,m}$ & $\lceil \frac{nm}{c} \rceil$ & $r$ & $\binom{m}{2}$ & \\ [0.5ex]
\hline\hline
4 & 19 &   & 26 & 7 & 6 & apply Corollary \ref{uncolor2}\\
5 & 16 &   & 27 & 11 & 10 & apply Corollary \ref{uncolor2}\\
7 & 13 & 31 & 31 & & & apply Corollary \ref{uncolor1}\\
10 & 12 & 40 & 40 & & & apply Corollary \ref{uncolor1}\\
11 & 11 & 41 & 41 & & & apply Corollary \ref{uncolor1}\\
\hline
\end{tabular}
\caption{Uncolorability values for $c=3$\label{table:3colortab}}
\end{table}

\bigskip

\noindent
$6$) $G_{19,3}$ is clearly 3-colorable.

\bigskip

\noindent
$7$)
$G_{18,4}$ is 3-colorable by Theorem~\ref{th:cplusone} with $c=3$.

\bigskip

\noindent
$8$) $G_{15,6}$ is 3-colorable by Corollary~\ref{co:rr} with $c=3$.

\bigskip

\noindent
$9$)
$G_{12,9}$ is 3-colorable by Corollary~\ref{co:prime} with $p=3$.
\end{proof}

\begin{lemma}\label{le:10x10}
$G_{10,10}$ is 3-colorable.
\end{lemma}

\begin{proof}
This is the 3-coloring:

\[
\begin{array}{|c|c|c|c|c|c|c|c|c|c|}
\hline
 R & R & R & R & B & B & G & G & B & G \cr
\hline
 R & B & B & G & R & R & R & G & G & B \cr
\hline
 G & R & B & G & R & B & B & R & R & G \cr
\hline
 G & B & R & B & B & R & G & R & G & R \cr
\hline
 R & B & G & G & G & B & G & B & R & R \cr
\hline
 G & R & B & B & G & G & R & B & B & R \cr
\hline
 B & G & R & B & G & B & R & G & R & B \cr
\hline
 B & B & G & R & R & G & B & G & B & R \cr
\hline
 G & G & G & R & B & R & B & B & R & B \cr
\hline
 B & G & B & R & B & G & R & R & G & G \cr
\hline
 \end{array}
\]
\end{proof}

\begin{note}
The coloring in Lemma~\ref{le:10x10} we found by
first finding a size 34 rectangle free subset of
$G_{10,10}$ (by hand). We used that for one of the colors.
The final 3-coloring was then found
with a simple computer
program.  It is an open problem to find a general
theorem that has a corollary that
$G_{10,10}$ is 3-colorable.
\end{note}

\begin{lemma}\label{le:11x10}
If $A\subseteq G_{11,10}$ and
$A$ is rectangle-free then $|A|\le 36=\ceil{\frac{11\cdot 10}{3}}-1$.
Hence $G_{11,10}$ is not 3-colorable.
\end{lemma}

\begin{proof}

We divide the proof into cases.
Every case will either conclude that
$|A|\le 36$ or $A$ cannot exist.

For $1\le j\le 10$ let $x_j$ be the number of elements of
$A$ in column $j$.
We assume

$$x_1\ge \cdots \ge x_{10}.$$

\begin{enumerate}
\item
$5\le x_1\le 11$.

By Lemma~\ref{le:maxrf1} with $x=5$, $n=11$, $m=10$ we have

$$|A| \le x + m-1 +  \maxrf {n-x}{m-1} \le 5 + 10 -1 + \maxrf {11-5} {10-1} \le 14+\maxrf{6}{9}.$$

By Lemma~\ref{le:values} we have $\maxrf{6}{9}=21$. Hence

$$|A|\le14 + 21 = 35\le 36.$$

\item
There exists $k$, $1\le k\le 6$, such that
$x_1=\cdots = x_k=4$ and $x_{k+1}\le 3$.
Then

$$|A| = \sum_{j=1}^{10} x_j = (\sum_{j=1}^{k} x_j) + (\sum_{j=k+1}^{10} x_j) \le 4k + 3(10-k)= 30+k$$

Since $k\le 6$ this quantity is $\le 30+6=36.$
Hence $|A|\le 36$.

\item
$x_1=\cdots=x_7=4$
and, for all, $1\le j_1<j_2<j_3\le 7$,
$$|C_{j_1}\cap C_{j_2} \cap C_{j_3}|=0.$$
Let $G'$ be the grid restricted to the first 7 columns.
Let $B$ be $A$ restricted to $G'$.
Since every column of $G'$ has 4 elements of $B$,
$|B|=7\times 4 = 28$.
Since every row of $G'$ has $\le 2$ elements of $B$,
$|B|\le 2\times 11=22$.  Therefore $A$ does not exist.

\item
$x_1=\cdots=x_7=4$
and there exists $1\le j_1<j_2<j_3\le 7$ such that
$$|C_{j_1}\cap C_{j_2} \cap C_{j_3}|=1,$$
but for all
$1\le j_1<j_2<j_3<j_4 \le 7$
$$|C_{j_1}\cap C_{j_2} \cap C_{j_3}\cap C_{j_4}|=0.$$
By renumbering we can assume that
$$|C_1\cap C_2\cap C_3|=1$$
and that the intersection is in row 11.
Let $G'$ be the grid restricted to the first 7
columns.
Let $B$ be $A$ restricted to $G'$.
The following picture portrays what is in the
first 3 columns of $G'$.

\[
\begin{array}{|c|c|c|c|c|c|c|c|}
\hline
  & 1 & 2 & 3 & 4 & 5 & 6 & 7 \cr
\hline
1 & R &   &   &   &   &   &   \cr
\hline
2 & R &   &   &   &   &   &   \cr
\hline
3 & R &   &   &   &   &   &   \cr
\hline
4 &   & R &   &   &   &   &   \cr
\hline
5 &   & R &   &   &   &   &   \cr
\hline
6 &   & R &   &   &   &   &   \cr
\hline
7 &   &   & R &   &   &   &   \cr
\hline
8 &   &   & R &   &   &   &   \cr
\hline
9 &   &   & R &   &   &   &   \cr
\hline
10 &   &   &   &   &   &   &   \cr
\hline
11 & R & R &R  &   &   &   &   \cr
\hline
\end{array}
\]

Since there are no
$1\le j_1<j_2<j_3<j_4 \le 7$ with
$$|C_{j_1}\cap C_{j_2} \cap C_{j_3}\cap C_{j_4}|=1,$$
there will be no other elements of $A$ in row 11 of $G'$.

Consider $C_4$. Since  $|C_4|=4$,
$|C_1\cap C_4|\ge 1$,
$|C_2\cap C_4|\ge 1$,
$|C_3\cap C_4|\ge 1$, and $11\notin C_4$  we must have
(1)
$|C_1\cap C_4|=1$,
$|C_2\cap C_4|=1$,
$|C_3\cap C_4|=1$, and
(2) $10\in C_4$.

By the same reasoning on $C_5, C_6, C_7$ we have that,
for all $5\le i\le 7$,
(1)
$|C_1\cap C_i|=1$,
$|C_2\cap C_i|=1$,
$|C_4\cap C_i|=1$, and
(1) $10\in C_i$.

The following picture portrays all that we know so far.

\[
\begin{array}{|c|c|c|c|c|c|c|c|}
\hline
  & 1 & 2 & 3 & 4 & 5 & 6 & 7 \cr
\hline
1 & R &   &   &   &   &   &   \cr
\hline
2 & R &   &   &   &   &   &   \cr
\hline
3 & R &   &   &   &   &   &   \cr
\hline
4 &   & R &   &   &   &   &   \cr
\hline
5 &   & R &   &   &   &   &   \cr
\hline
6 &   & R &   &   &   &   &   \cr
\hline
7 &   &   & R &   &   &   &   \cr
\hline
8 &   &   & R &   &   &   &   \cr
\hline
9 &   &   & R &   &   &   &   \cr
\hline
10 &   &   &   &R  &R  &R  &R  \cr
\hline
11 & R & R &R  &   &   &   &   \cr
\hline
\end{array}
\]

Without loss of generality we can assume
$C_4=\{1,4,7,10\}$.
Consider $C_5$. In addition to the above
constraints on $C_5$ we also have that
$1,4,7\notin C_5$.
Hence, without loss of generality, we can
assume that $C_5=\{2,5,8,10\}$.
This forces $C_6=C_7=\{3,6,9,10\}$.
This yields a rectangle.

\item
$x_1=\cdots=x_7=4$
and there exists $1\le j_1<j_2<j_3<j_4\le 7$ such that
$$|C_{j_1}\cap C_{j_2} \cap C_{j_3}\cap C_{j_4}|=1.$$
By renumbering we can assume that
$$|C_1\cap C_2\cap C_3\cap C_4|=1.$$
By Lemma~\ref{le:inex}.2 with $k=4$ and $x_1=x_2=x_3=x_4=4$:

$$
16=x_1+x_2+x_3+x_4\le 11+\binom{4}{2}-\binom{4}{3}+\binom{4}{4}=11+6-4+1=14.
$$

Hence $A$ does not exist.

\end{enumerate}
\end{proof}

\begin{theorem}\label{th:obs3}
$$
\OBS_3=
\{G_{19,4}, G_{16,5}, G_{13,7}, G_{11,10}, G_{10,11},
G_{7,13}, G_{5,16}, G_{4,19}
\}.$$
\end{theorem}

\begin{proof}

For each $\Gnm$ listed above
(1) by Lemma~\ref{le:col3} or \ref{le:11x10} $\Gnm$ is
not 3-colorable,
(2) by Lemma~\ref{le:col3} or \ref{le:10x10} both
$G_{n-1,m}$ and $G_{n,m-1}$ are 3-colorable.
Hence all of the grids listed are in $\OBS_3$.
We need to show that no other grids are in $\OBS_3$.
This is a straightforward use of
Lemmas~\ref{le:col3},  \ref{le:10x10}, and \ref{le:11x10}.
The proof is similar to how
Theorem~\ref{th:obs2} was proven.
We leave the details to the reader.
\end{proof}

The following chart indicates exactly which grids are 3-colorable.
The entry for $(n,m)$ is $C$ if $\Gnm$ is 3-colorable, and
$N$ if $\Gnm$ is not 3-colorable.

 \[
 \begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
 \hline
   & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 \cr
 \hline
  3& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C & C \cr
 \hline
  4& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & N & N \cr
 \hline
  5& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & N  & N  & N  & N & N \cr
 \hline
  6& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & N  & N  & N  & N & N \cr
 \hline
  7& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & N  & N  & N  & N  & N  & N  & N & N \cr
 \hline
  8& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & N  & N  & N  & N  & N  & N  & N & N \cr
 \hline
  9& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & N  & N  & N  & N  & N  & N  & N & N \cr
 \hline
 10& C  & C  & C  & C  & C  & C  & C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N & N \cr
 \hline
 11& C  & C  & C  & C  & C  & C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N \cr
 \hline
 12& C  & C  & C  & C  & C  & C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N \cr
 \hline
 13& C  & C  & C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N \cr
 \hline
 14& C  & C  & C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N \cr
 \hline
 15& C  & C  & C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N \cr
 \hline
 16& C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N \cr
 \hline
 17& C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N \cr
 \hline
 18& C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N \cr
 \hline
 19& C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N \cr
 \hline
 20& C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N \cr
 \hline
 \end{array}
 \]

\section{Which Grids Can be Properly 4 Colored?}\label{se:4col}

In the first section we give absolute results
about which grids are 4 colorable.
In the second section we give results that
assume a conjecture.

\subsection{Absolute Results}

\begin{theorem}\label{le:col4}~
\begin{enumerate}
\item
$G_{41,5}$ and $G_{5,41}$ are not 4-colorable.
\item
$G_{31,6 }$  and $G_{6,31}$  are not 4-colorable.
\item
$G_{29, 7 }$  and $G_{7,29}$ are not 4-colorable.
\item
$G_{25, 9 }$  and $G_{9,25}$ are not 4-colorable.
\item
$G_{23, 10}$  and $G_{10,23 }$ are not 4-colorable.
\item
$G_{22, 11}$  and $G_{11,22 }$ are not 4-colorable.
\item
$G_{21, 13}$  and $G_{13,21}$ are not 4-colorable.
\item
$G_{20, 17}$  and $G_{17,20}$ are not 4-colorable.
\item
$G_{19, 18}$  and $G_{18,19}$ are not 4-colorable.
\item
$G_{41,4}$ and $G_{4,41}$ are 4-colorable (this is trivial).
\item
$G_{40,5}$ and $G_{5,40}$ are 4-colorable.
\item
$G_{30,6}$ and $G_{6,30}$ are 4-colorable.
\item
$G_{28,8}$ and $G_{8,28}$ are 4-colorable.
\item
$G_{20,16}$ and $G_{16,20}$ are 4-colorable.
\end{enumerate}
\end{theorem}

\begin{proof}

We only consider grids $G_{n.m}$ where $n\ge m$.

\smallskip

\noindent
1,2,3,4,5,6,7,8,9)

Table \ref{table:4colortab} along with Corollaries~\ref{uncolor1}, \ref{uncolor2} and \ref{uncolor3}
show why $G_{41,5}$, $G_{31,6}$, $G_{29,7}$, $G_{25,9}$,
$G_{23,10}$, $G_{22,11}$, $G_{21,13}$, $G_{20,17}$, and
$G_{19,18}$ are not 4-colorable.

\begin{table}[htbp]
\centering
\begin{tabular}{c c c c c c c c}
$m$ & $n$ & $z_{n,m}$ & $\lceil \frac{nm}{c} \rceil$ & $r$ & $\binom{m}{2}$ & $\frac{m(m-1)-2qr}{q(q-1)}$\\ [0.5ex]
\hline\hline
5 & 41 &   & 52 & 11 & 10 & & apply Corollary \ref{uncolor2}\\
6 & 31 &   & 47 & 16 & 15 & & apply Corollary \ref{uncolor2}\\
7 & 29 &   & 51 & 22 & 21 & & apply Corollary \ref{uncolor2}\\
9 & 25 & 57 & 57 & & & & apply Corollary \ref{uncolor1}\\
10 & 23 &   & 58 & & & 21 & apply Corollary \ref{uncolor3}\\
11 & 22 &   & 61 & & & 21 & apply Corollary \ref{uncolor3}\\
13 & 21 & 69 & 69 & & & & apply Corollary \ref{uncolor1}\\
17 & 20 & 85 & 85 & & & & apply Corollary \ref{uncolor1}\\
18 & 19 &  & 86 & & & 18 & apply Corollary \ref{uncolor3}\\
\hline
\end{tabular}
\caption{Uncolorability values for $c=4$ \label{table:4colortab}}
\end{table}

\smallskip

\noindent
10) $G_{41,4}$ is clearly 4-colorable.

\smallskip

\noindent
11) $G_{40,5}$ is 4-colorable by Theorem~\ref{th:cplusone} with $c=4$.

\smallskip

\noindent
12) $G_{30,6}$ is 4-colorable by Theorem~\ref{th:cplusgen} with $c=4$ and $c'=2$.

\noindent
13) $G_{28,8}$ is 4-colorable by Theorem~\ref{th:primepower}
with $p=2$, $d=3$, and $s=1$.

\smallskip

\noindent
14) $G_{20,16}$ is 4-colorable by Theorem~\ref{th:primepower} with
$p=2$, $d=2$, and $s=2$

\end{proof}

\begin{lemma}\label{le:19x17}
If $A\subseteq G_{19,17}$ and
$A$ is rectangle-free then $|A|\le 80=\ceil{\frac{19\cdot17}{4}}-1$.
Hence $G_{19,17}$ is not 4-colorable.
\end{lemma}

\begin{proof}
We divide the proof into cases.
Every case will either conclude that
$|A|\le 80$ or $A$ cannot exist.

For $1\le j\le 17$ let $x_j$ be the number of elements of
$A$ in column $j$.
We assume

$$x_1\ge \cdots \ge x_{17}.$$

\begin{enumerate}
\item
$6\le x_1\le 19$.

By Lemma~\ref{le:maxrf1} with $x=6$, $n=19$, $m=17$,

$$|A| \le x + m-1 +  \maxrf {n-x}{m-1} \le 6 + 17 - 1 + \maxrf{19-6}{17-1} = 22+\maxrf{13}{16}.$$

Assume, by way of contradiction, that $|A|\ge 81$.
Then $\maxrf{13}{16}\ge 59$
By Lemma~\ref{le:density2} with $n=16$, $m=13$, $a=59$, $q=3$, $r=11$

$$16\le \floor{\frac{13\times 12-2\times 3\times 11}{3\times 2}}=15.$$

This is a contradiction.

\item
There exists $k$, $1\le k\le 12$, such that
$x_1=\cdots = x_k=5$ and $x_{k+1}\le 4$.
Then

$$|A| = \sum_{j=1}^{17} x_j = (\sum_{j=1}^{k} x_j) + (\sum_{j=k+1}^{17} x_j)
\le 5k + 4(17-k)= 68+k.$$

Since $k\le 12$ this quantity is $\le 68 + 12 = 80.$
Hence $|A|\le 80$.

\item
$x_1=x_2=\cdots=x_{13}=5$.
Look at the grid restricted to the first 13 columns.
Let $B$ be $A$ restricted to that grid.
Note that $B$ is a rectangle-free subset
of $G_{19,13}$ of size 65.
By Lemma~\ref{le:density2} with
$n=19$, $m=13$, $a=65$, $q=3$, and $r=8$
we have

$$19\le \floor{\frac{13\times 12-2\times 8\times 3}{3\times 2}}=18.$$

This is a contradiction, hence $A$ cannot exist.
\end{enumerate}
\end{proof}

\begin{lemma}\label{le:24x9}
$G_{24,9}$ is 4-colorable.
\end{lemma}

\begin{proof}
We show that $G_{9,6}$ is strongly $(4,1)$-colorable
and then apply Lemma~\ref{le:strong}
with $c=4$ and $c'=1$.

The following is a strong 4-coloring of $G_{9,6}$.

 \[
 \begin{array}{|c|c|c|c|c|c|c|c|c|}
 \hline
   & 1  & 2 & 3 & 4 & 5 & 6 \cr
\hline
1  & Y  & R & R & Y & R & R\cr
\hline
2  & Y  & B & B & R & Y & B\cr
\hline
3  & Y  & G & G & B & B & Y\cr
\hline
4  & R  & Y & G & Y & G & B\cr
\hline
5  & B  & Y & R & B & Y & G\cr
\hline
6  & G  & Y & B & G & R & Y\cr
\hline
7  & G  & B & Y & Y & B & G\cr
\hline
8  & R  & G & Y & G & Y & R\cr
\hline
9  & B  & R & Y & R & G & Y\cr
\hline
\end{array}
\]

\end{proof}

\begin{lemma}\label{le:21x11}
$G_{21,11}$ is 4-colorable
\end{lemma}

\begin{proof}
Brad Lorsen has obtained the following 4-coloring of $G_{21,11}$.

\[
\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
  &    1  & 2  & 3  & 4 &  5  & 6  & 7  & 8  & 9  & 10 & 11 \cr
\hline
1 &    G  & B  & B  & G  & R  & Y  & R  & G  & Y  & B  & Y\cr
\hline
2 &   B  & G  & G  & Y  & B  & G  & Y  & R  & R  & B  & R\cr
\hline
3 &    R  & R  & B  & Y  & B  & Y  & B  & Y  & G  & G  & R\cr
\hline
4 &    Y  & R  & Y  & G  & B  & B  & R  & Y  & R  & G  & B\cr
\hline
5 &    R  & Y  & G  & B  & B  & Y  & Y  & B  & R  & G  & G\cr
\hline
6 &    B  & R  & Y  & R  & G  & Y  & B  & R  & G  & Y  & B\cr
\hline
7 &   Y  & G  & B  & R  & G  & B  & R  & G  & Y  & Y  & R\cr
\hline
8 &    Y  & Y  & G  & B  & R  & B  & G  & R  & G  & B  & Y\cr
\hline
9 & R  & B  & R  & B  & G  & G  & R  & Y  & Y  & G  & B\cr
\hline
10 &   R  & Y  & Y  & R  & G  & R  & B  & B  & Y  & B  & G\cr
\hline
11 &   B  & Y  & R  & R  & Y  & B  & G  & G  & R  & Y  & G\cr
\hline
12 &    R  & B  & Y  & Y  & Y  & B  & B  & R  & G  & R  & G\cr
\hline
13 &    G  & G  & B  & B  & R  & R  & Y  & Y  & R  & Y  & G\cr
\hline
14 &    G  & B  & R  & Y  & B  & G  & G  & R  & B  & Y  & Y\cr
\hline
15 &    G  & Y  & G  & Y  & G  & R  & R  & R  & B  & B  & B\cr
\hline
16 &    B  & B  & R  & G  & Y  & G  & Y  & B  & Y  & R  & G\cr
\hline
17 &    Y  & G  & B  & G  & Y  & Y  & R  & B  & G  & R  & B\cr
\hline
18 &    B  & Y  & B  & G  & G  & R  & G  & Y  & B  & R  & R\cr
\hline
19 &   Y  & G  & R  & Y  & R  & B  & G  & B  & B  & G  & R\cr
\hline
20 &   B  & R  & Y  & B  & R  & G  & Y  & G  & G  & R  & Y\cr
\hline
21 &   G  & R  & R  & B  & Y  & R  & B  & Y  & B  & G  & Y\cr
\hline
\end{array}
\]

\end{proof}

\begin{lemma}\label{le:22x10}
$G_{22,10}$ is 4-colorable
\end{lemma}

\begin{proof}
Brad Lorsen has obtained the following 4-coloring of $G_{22,10}$.

\[
\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|}
\hline
  & 1  & 2  & 3  & 4  & 5  & 6  & 7  & 8  & 9  & 10 \cr
\hline
1 & Y  & G  & R  & R  & G  & G  & Y  & Y  & B  & B\cr
\hline
2 & G  & Y  & B  & G  & B  & B  & Y  & R  & Y  & R\cr
\hline
3 & B  & G  & B  & R  & Y  & Y  & G  & R  & Y  & B\cr
\hline
4 & Y  & Y  & G  & G  & R  & R  & B  & B  & G  & Y\cr
\hline
5 & Y  & B  & Y  & Y  & G  & R  & R  & G  & G  & R\cr
\hline
6 & Y  & B  & R  & B  & R  & Y  & G  & R  & G  & G\cr
\hline
7 & G  & Y  & G  & Y  & B  & Y  & R  & B  & R  & G\cr
\hline
8 & Y  & R  & R  & B  & Y  & B  & G  & G  & B  & R\cr
\hline
9 & Y  & B  & B  & R  & R  & G  & R  & G  & Y  & G\cr
\hline
10  & R  & R  & B  & B  & Y  & G  & R  & B  & G  & Y\cr
\hline
11  & R  & G  & G  & Y  & R  & B  & B  & G  & Y  & R\cr
\hline
12  & R  & B  & R  & G  & G  & Y  & Y  & B  & B  & G\cr
\hline
13  & B  & R  & G  & B  & G  & R  & B  & R  & Y  & Y\cr
\hline
14  & G  & G  & Y  & B  & B  & Y  & R  & R  & G  & B\cr
\hline
15  & R  & G  & Y  & R  & B  & R  & B  & Y  & Y  & G\cr
\hline
16  & B  & B  & Y  & G  & Y  & B  & Y  & G  & R  & R\cr
\hline
17  & G  & Y  & B  & R  & Y  & G  & B  & Y  & B  & R\cr
\hline
18  & R  & B  & G  & Y  & B  & G  & Y  & R  & R  & Y\cr
\hline
19  & G  & B  & R  & Y  & Y  & R  & B  & G  & R  & B\cr
\hline
20  & B  & R  & Y  & G  & R  & G  & G  & B  & R  & Y\cr
\hline
21  & B  & R  & G  & R  & B  & Y  & G  & Y  & B  & Y\cr
\hline
22  & G  & Y  & Y  & R  & G  & B  & G  & B  & R  & B\cr
\hline
\end{array}
\]

\end{proof}

\begin{theorem}~
\begin{enumerate}
\item
The following grids are in $\OBS_4$:

$G_{41,5}$, $G_{31,6}$, $G_{29,7}$, $G_{25,9}$, $G_{23,10}$, $G_{22,11}$,
$G_{11,22}$, $G_{10,23}$,
$G_{9,25}$, $G_{7,29}$, $G_{6,31}$, $G_{5,41}$.

\item
For each of the following grids it is not known if it is
4-colorable.  These are the only such.
$G_{17,17}$, $G_{17,18}$, $G{18,17}$,  $G_{18,18}$.
$G_{21,12}$, $G_{12,21}$.
\item
Exactly one of the following grids is in $\OBS_4$: $G_{21,12}$ $G_{21,13}$.
\item
Exactly one of the following grids is in $\OBS_4$:
$G_{19,17}$, $G_{18,17}$, $G_{17,17}$.
\item
If $G_{19,17}\in \OBS_4$ then it is possible that $G_{18,18}\in \OBS_4$.
\end{enumerate}
\end{theorem}

\begin{proof}
This is easily proven from Lemmas~\ref{le:col4},\ref{le:19x17}, \ref{le:24x9}, \ref{le:21x11}, and~\ref{le:22x10}.
For a visual aid see the following chart where we put a $C$ in the $(n,m)$ spot
if $\Gnm$ is Colorable, an $N$ if it is not colorable, and a $U$ if it is not known.
\end{proof}

 \[
 \begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
 \hline
   & 04 & 05 & 06 & 07 & 08 & 09 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 & 21 \cr
 \hline
  8& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C & C \cr
 \hline
  9& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C & C \cr
 \hline
 10& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C & C \cr
 \hline
 11& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C & C \cr
 \hline
 12& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C & U \cr
 \hline
 13& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C & N \cr
 \hline
 14& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C & N \cr
 \hline
 15& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C & N \cr
 \hline
 16& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C & N \cr
 \hline
 17& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & U & U & N  & N  & N\cr
 \hline
 18& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & U & U & N  & N  & N\cr
 \hline
 19& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & N  & N  & N  & N & N\cr
 \hline
 20& C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & C  & N  & N  & N  & N & N\cr
 \hline
 21& C  & C  & C  & C  & C  & C  & C  & C  & U & N  & N  & N  & N  & N  & N  & N  & N & N\cr
 \hline
 22& C  & C  & C  & C  & C  & C  & C & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N\cr
 \hline
 23& C  & C  & C  & C  & C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N\cr
 \hline
 24& C  & C  & C  & C  & C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N\cr
 \hline
 25& C  & C  & C  & C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N\cr
 \hline
 26& C  & C  & C  & C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N \cr
 \hline
 27& C  & C  & C  & C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N\cr
 \hline
 28& C  & C  & C  & C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N\cr
 \hline
 29& C  & C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N \cr
 \hline
 30& C  & C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N\cr
 \hline
 31& C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N\cr
 \hline
 32& C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N \cr
 \hline
 33& C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N\cr
 \hline
 34& C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N\cr
 \hline
 35& C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N\cr
 \hline
 36& C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N\cr
 \hline
 37& C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N\cr
 \hline
 38& C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N\cr
 \hline
 39& C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N\cr
 \hline
 40& C  & C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N\cr
 \hline
 41& C  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N  & N & N\cr
 \hline
 \end{array}
 \]

\subsection{Assuming the Rectangle-Free Conjecture}

We have the following conjecture which, if true,
yields more 4-colorings and allows us to state exactly
what $\OBS_4$ is.

{\bf Rectangle-Free Conjecture (RFC):
Let $n,m,c\ge 2$.
If there exists a rectangle-free subset of $G_{n,m}$
of size $\ceil{nm/c}$ then $G_{n,m}$ is
$c$-colorable.}

\begin{lemma}\label{le:21x12}
There exists a rectangle-free subset of $G_{21,12}$
of size $63=\ceil{\frac{21\cdot 12}{4}}$. Hence, if RFC is true,
there is a 4-coloring of $G_{21,12}$ and $G_{12,21}$.
\end{lemma}

\begin{proof}

Two grids are equivalent if you permute the rows and columns
of one to get the other one.
We show two grids that are not equivalent.

 \[
 \begin{array}{|c||c|c|c||c|c|c||c|c|c||c|c|c||}
 \hline
   & 01 & 02 & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 10 & 11 & 12 \cr
 \hline
 1 & R & R &   &   &   &   &   &   &   &   &   &      \cr\hline
 2 & R &   & R &   &   &   &   &   &   &   &   &      \cr\hline
 3 &   & R & R &   &   &   &   &   &   &   &   &      \cr\hline
 \hline
 4 &   &   & R & R & R &   &   &   &   &   &   &      \cr\hline
 5 &   & R &   & R &   & R &   &   &   &   &   &      \cr\hline
 6 & R &   &   &   & R & R &   &   &   &   &   &      \cr\hline
 \hline
 7 &   &   &   &   &   & R & R & R &   &   &   &      \cr\hline
 8 &   &   &   &   & R &   & R &   & R &   &   &      \cr\hline
 9 &   &   &   & R &   &   &   & R & R &   &   &      \cr\hline
 \hline
 10&   &   &   &   &   & R &   &   &   & R & R &      \cr\hline
 11&   &   &   &   & R &   &   &   &   & R &   & R    \cr\hline
 12&   &   &   & R &   &   &   &   &   &   & R & R    \cr\hline
 \hline
 13&   &   & R &   &   & R &   &   & R &   &   & R    \cr\hline
 14&   & R &   &   & R &   &   & R &   &   & R &      \cr\hline
 15& R &   &   & R &   &   & R &   &   & R &   &      \cr\hline
 \hline
 16&   &   & R &   &   &   & R &   &   &   & R &      \cr\hline
 17&   & R &   &   &   &   &   &   & R & R &   &      \cr\hline
 18& R &   &   &   &   &   &   & R &   &   &   & R    \cr\hline
 \hline
 19&   &   & R &   &   &   &   & R &   & R &   &      \cr\hline
 20&   & R &   &   &   &   & R &   &   &   &   & R    \cr\hline
 21& R &   &   &   &   &   &   &   & R &   & R &      \cr\hline
 \end{array}
 \]

 \[
 \begin{array}{|c||c|c|c||c|c|c||c|c|c||c|c|c||}
 \hline
   & 01 & 02 & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 10 & 11 & 12 \cr
 \hline
 1 & R & R &   &   &   &   &   &   &   &   &   &      \cr\hline
 2 & R &   & R &   &   &   &   &   &   &   &   &      \cr\hline
 3 &   & R & R &   &   &   &   &   &   &   &   &      \cr\hline
\hline
 4 &   &   & R &   &   & R & R &   &   &   & R &      \cr\hline
 5 &   & R &   &   & R &   &   &   & R & R &   &      \cr\hline
 6 & R &   &   & R &   &   &   & R &   &   &   & R    \cr\hline
\hline
 7 &   &   & R & R &   &   &   &   & R &   &   &      \cr\hline
 8 &   &   & R &   &   &   & R &   &   &   &   & R    \cr\hline
 9 &   &   & R &   &   & R &   &   &   & R &   &      \cr\hline
\hline
 10&   & R &   &   & R &   &   &   &   &   &   & R    \cr\hline
 11&   & R &   &   &   & R &   & R &   &   &   &      \cr\hline
 12&   & R &   &   &   &   &   &   & R &   & R &      \cr\hline
\hline
 13& R &   &   &   & R &   & R &   &   &   &   &      \cr\hline
 14& R &   &   &   &   &   &   & R &   & R &   &      \cr\hline
 15& R &   &   & R &   &   &   &   &   &   & R &      \cr\hline
\hline
 16&   &   &   & R & R & R &   &   &   &   &   &      \cr\hline
 17&   &   &   &   &   &   & R & R & R &   &   &      \cr\hline
 18&   &   &   &   &   &   &   &   &   & R & R & R    \cr\hline
\hline
 19&   &   &   &   &   & R &   &   & R &   &   & R    \cr\hline
 20&   &   &   &   & R &   &   & R &   &   & R &      \cr\hline
 21&   &   &   & R &   &   & R &   &   & R &   &      \cr\hline
 \end{array}
 \]
\end{proof}

\begin{lemma}\label{le:18x18}
There exists a rectangle-free subset of $G_{18,18}$
of size $81=\ceil{\frac{18\cdot18}{4}}$. Hence, if RFC is true,
there is a 4-coloring of $G_{18,18}$.
\end{lemma}

\begin{proof}

Here is the rectangle-free set.

\[
\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
& 01 & 02 & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 \cr
\hline
1& & R&  & R&  &  &  &  &  &  &  &  &  & R&  & R& R&  \cr
\hline
2&R& R&  &  &  &  &  &  &  & R& R&  & R&  &  &  &  &  \cr
\hline
3&R&  &  &  &  &  &  &  & R&  &  &  &  &  & R& R&  & R\cr
\hline
4& &  &  &  &  & R&  &  & R&  &  & R& R& R&  &  &  &  \cr
\hline
5& & R& R&  &  & R&  &  &  &  &  &  &  &  &  &  &  & R\cr
\hline
6&R&  &  & R&  & R& R&  &  &  &  &  &  &  &  &  &  &  \cr
\hline
7& &  &  &  &  &  & R& R&  & R&  &  &  & R&  &  &  & R\cr
\hline
8& &  & R&  &  &  & R&  & R&  & R&  &  &  &  &  & R&  \cr
\hline
9& & R&  &  & R&  & R&  &  &  &  & R&  &  & R&  &  &  \cr
\hline
10 & &  &  & R&  &  &  &  &  &  & R& R&  &  &  &  &  & R\cr
\hline
11&R&  & R&  & R&  &  &  &  &  &  &  &  & R&  &  &  &  \cr
\hline
12& &  & R& R&  &  &  & R&  &  &  &  & R&  & R&  &  &  \cr
\hline
13& &  &  &  & R& R&  & R&  &  & R&  &  &  &  & R&  &  \cr
\hline
14&R&  &  &  &  &  &  & R&  &  &  & R&  &  &  &  & R&  \cr
\hline
15& &  &  & R& R&  &  &  & R& R&  &  &  &  &  &  &  &  \cr
\hline
16& &  &  &  &  & R&  &  &  & R&  &  &  &  & R&  & R&  \cr
\hline
17& &  & R&  &  &  &  &  &  & R&  & R&  &  &  & R&  &  \cr
\hline
18& &  &  &  & R&  &  &  &  &  &  &  & R&  &  &  & R& R\cr
\hline
\end{array}
\]
\end{proof}

\begin{note}
If the $5^\tth$ row and the $2^\nnd$ column were removed then
this would be a rectangle free set of $G_{17,17}$ of size
74. Note that $\ceil{\frac{17\times 17}{4}}=73$. Hence if we
had a weaker version of RFC then we would have that $G_{17,17}$
is 4-colorable.
\end{note}

\begin{theorem}
Assume RFC is true.
Then
$$\OBS_4=
\{ G_{41,5},
   G_{31,6},
   G_{29,7},
   G_{25,9},
   G_{23,10},
   G_{22,11},
   G_{21,13},
   G_{19,17} \} \bigcup $$

$$\{
   G_{13,21},
   G_{11,22},
   G_{10,23},
   G_{9,25},
   G_{7,29},
   G_{6,31},
   G_{5,41}\}$$
\end{theorem}

\begin{proof}
For each $\Gnm$ listed above
(1) by Lemma~\ref{le:col4} or \ref{le:19x17} $\Gnm$ is
not 4-colorable,
(2) by Lemmas~\ref{le:col4}, \ref{le:24x9}, \ref{le:22x10}, \ref{le:21x12}, or \ref{le:18x18},
$G_{n-1,m}$ and $G_{n,m-1}$ are 4-colorable.
Hence all of the grids listed are in $\OBS_4$.
We need to show that no other grids are in $\OBS_4$.
This is a straightforward use of
the lemmas listed above.
The proof is similar to how
Theorem~\ref{th:obs2} was proven.
We leave the details to the reader.
\end{proof}

\section{Application to Bipartite Ramsey Numbers}\label{se:bipartite}

We state the Bipartite Ramsey Theorem.
See~\cite{GRS} for history, details, and proof.

\begin{definition}
$K_{a,b}$ is the bipartite graph that
has $a$ vertices on the left, $b$ vertices on the right,
an edge between every left and right vertex,
and no other edges.
\end{definition}

\begin{theorem}
For all $a,c$ there exists $n=BR(a,c)$ such that for all
$c$-colorings of the edges of $K_{n,n}$ there
will be a monochromatic $K_{a,a}$.
\end{theorem}

The following theorem is easily seen to be
equivalent to this.

\begin{theorem}
For all $a,c$ there exists $n=BR(a,c)$ so that for all
$c$-colorings of $G_{n,n}$ there will be a monochromatic
$a\times a$ submatrix.
\end{theorem}

In this paper we are $c$-coloring $G_{n,m}$ and looking
for a $2\times 2$ monochromatic submatrix.
We have the following theorems which, except where noted,
seem to be new.

\begin{theorem}\label{th:bipartite}~
\begin{enumerate}
\item
$BR(2,2) = 5$.
(This was also shown in~\cite{bipartitenum}.)
\item
$BR(2,3) = 11$.
\item
$17\le BR(2,4) \le 19$.
\item
$BR(2,c) \le c^2+c$.
\item
If $p$ is a prime and $s\in\nat$ then $BR(2,p^s)\ge p^{2s}$.
\item
For almost all $c$, $BR(2,c) \ge c^2 - 2c^{1.525}+c^{1.05}.$
\end{enumerate}
\end{theorem}

\begin{proof}

\noindent
1) By Lemma~\ref{le:col2}
$G_{5,5}$ is not 2-colorable
and $G_{4,4}$ is 2-colorable.

\smallskip

\noindent
2) By Lemma~\ref{le:11x10}
$G_{11,11}$ is not 3-colorable.
By Lemma~\ref{le:10x10}
$G_{10,10}$ is 2-colorable.

\smallskip

\noindent
3) By Lemma~\ref{le:19x17}
$G_{19,19}$ is not 4-colorable.
By Lemma~\ref{le:col4}
$G_{16,16}$ is 4-colorable.

\smallskip

\noindent
4) By Theorem~\ref{th:csq}
$G_{c^2+c,c^2+c}$ is not $c$-colorable.

\smallskip

\noindent
5) By Theorem~\ref{th:primepower}
$G_{cr,cm}$ is $c$-colorable where
$c=p^s$, $r=p^s$, and $m=\frac{p^{2s}-1}{p^s-1}$.
Note that $m\le p^s$. Hence
$G_{p^{2s},p^{2s}}$ is $p^s$-colorable.

\smallskip

\noindent
6)

Baker, Harman,
and Pintz~\cite{BHP} (see~\cite{ConPrimesSurvey} for
a survey)
showed that,
for almost all $c$, there is a prime between
$c$ and $c-c^{0.525}$.
Let $p$ be that prime. By part 5 with $s=1$,
$BR(2,p)\ge p^2$.
Hence

$$
BR(2,c) \ge BR(2,p) \ge p^2 \ge (c-c^{0.525})^2 \ge
c^2 - 2c^{1.525} + c^{1.05}.
$$

\end{proof}

\section{Open Questions}

\begin{enumerate}
\item
Find $\OBS_4$. We feel this is possible since we are
so close. A clever computer program may be needed.
\item
Refine our tools so that our ugly proofs can be corollaries
of our tools.
\item
Find an algorithm that will, given
$c$, find $\OBS_c$ or $|\OBS_c|$ quickly.
\item
We know that $2\sqrt{c}(1-o(1)) \le |\OBS_c| \le 2c^2$.
Bring these bounds closer together.
\item
Is the Rectangle-Free Conjecture True?
If so then this may help us find $c$-colorings.
If not then this may open up new techniques
for proving that a grid is not $c$-colorable.
\end{enumerate}

\section{Acknowledgments}

We would like to thank Brad Lorsen for providing us with
4-colorings of $G_{21,11}$ and $G_{22,10}$.

We would like to thank Michelle Burke, Brett Jefferson,
and Krystal Knight who worked with the second and third authors over the
Summer of 2006 on this problem.
As noted earlier, Brett Jefferson has his own
paper on this subject~\cite{gridsj}.

We would also like to thank L{\'a}szl{\'o} Sz{\'e}kely
for pointing out the connection to bipartite Ramsey numbers,
Larry Washington for providing information on number theory
that was used in the proof of Theorem~\ref{th:bipartite},
and Russell Moriarty for proofreading and intelligent commentary.

\section{Appendix: Exact values of $\maxrf n m$ for $0\le m\le 6$, $m\le n$}

\begin{lemma}\label{le:values}~
\begin{enumerate}
\item[0)]
For $m\ge 0$, $\maxrf 0 m = 0$.
\item[1)]
For $m\ge 1$, $\maxrf 1 m = m$.
\item[2)]
For $m\ge 2$, $\maxrf 2 m = m+1$.
\item[3)]
For $m\ge 3$, $\maxrf 3 m  = m+3$.
\item[4)]
\begin{displaymath}
\maxrf 4 m =
\begin{cases}
m+5 \hbox{ if } 4\le m\le 5\\
m+6 \text{ if } m\ge 6 \\
\end{cases}
\end{displaymath}

\item[5)]
\begin{displaymath}
\maxrf 5 m =
\begin{cases}
12 \text{ if } m=5\\
m+8 \text{ if } 6\le m\le 7 \\
m+9 \text{ if } 8\le m\le 9 \\
m+10 \text{ if } m\ge 10 \\
\end{cases}
\end{displaymath}

\item[6)]
\begin{displaymath}
\maxrf 6 m =
\begin{cases}
2m+4 \text{ if } 6\le m \le 7 \\
19 \text{ if } m=8 \\
m+12\text{ if }  9\le m\le 10 \\
m+13 \text{ if }  11 \le m\le 12 \\
m+14 \text{ if }  13 \le m\le 14 \\
m+15 \text{ if }  m\ge 15\\
\end{cases}
\end{displaymath}

\end{enumerate}
\end{lemma}

\begin{proof}

Lemma~\ref{le:density2} will provide all of
the upper bounds. The lower bounds are obtained
by actually exhibiting rectangle-free sets of
the appropriate size. We do this for the case of
$\maxrf 6 m $. Our technique applies to all of the other cases.

\smallskip

\noindent
{\bf Case 1: $\maxrf 6 m $ where $6\le m\le 7$ and $m=8$:}
Fill the first four columns with 3 elements (all pairs
overlapping).
Each column of 3 blocks exactly $\binom{3}{2}=3$
of the possible $\binom{6}{3}=15$ ordered pairs,
hence 12 are blocked.
Hence we can fill the next $15-12=3$ columns with
two elements each, and the remaining column (if $m=8$)
with 1 element.
The picture below shows the result for $\maxrf 6 8 =19$;
however, if you just look at the first 6 (7) columns you get
the result for $\maxrf 6 6 $ ($\maxrf 6 7 $).

\[
\begin{array}{|c|c|c|c|c|c|c|c|}
\hline
R& &R& &R& & & R\cr
\hline
R& & &R& &R &  & \cr
\hline
R&R& & & &  &R &\cr
\hline
 &R&R& & &R & & \cr
\hline
 &R& &R&R&  & & \cr
\hline
 & &R&R& &  &R &\cr
\hline
\end{array}
\]

\smallskip

\noindent
{\bf Case 2: $\maxrf 6 m $ where $9\le m\le 10$:}
Fill the first three columns with 3 elements each
(all pairs overlapping).
Each column of 3 blocks exactly $\binom{3}{2}=3$
of the possible $\binom{6}{3}=15$ ordered pairs,
hence 9 are blocked.
Hence we can fill the next $15-9=6$ columns with
two elements each and the remaining column (if $m=10$)
with 1 element.
The picture below shows the result for $\maxrf 6 {10} =22$;
however, if you just look at the first 9 columns you get
the result $\maxrf 6 9 =21$.

\[
\begin{array}{|c|c|c|c|c|c|c|c|c|c|}
\hline
R& &R& &R&  &  &   & & \cr
\hline
R& & & & &R &  & R &R& \cr
\hline
R&R& & & &  &R &   & & \cr
\hline
 &R&R& & &R &  &   & & \cr
\hline
 &R& &R&R&  &  & R & & \cr
\hline
 & &R&R& &  &R &   &R&R\cr
\hline
\end{array}
\]

\smallskip

\noindent
{\bf Case 3: $\maxrf 6 m $ where $11\le m\le 12$:}
Fill the first two columns with 3 elements each
(they overlap).
Each column of 3 blocks exactly $\binom{3}{2}=3$
of the possible $\binom{6}{3}=15$ ordered pairs,
hence 6 are blocked.
Hence we can fill the next $15-6=9$ columns with
two elements each and the remaining column (if $m=12$)
with 1 element.
The picture below shows the result for $\maxrf 6 {12} =25$;
however, if you just look at the first 11 columns you get
the result $\maxrf 6 {11} =24$.

\[
\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
R& &R& &R&  &  &   & & &R& \cr
\hline
R& & & & &R &  & R &R& & & \cr
\hline
R&R& & & &  &R &   & & & & \cr
\hline
 &R&R& & &R &  &   & &R& & \cr
\hline
 &R& &R&R&  &  & R & & & & \cr
\hline
 & & &R& &  &R &   &R&R &R&R\cr
\hline
\end{array}
\]

\smallskip
\noindent
{\bf Case 4: $\maxrf 6 m $ where $13\le m\le 14$:}
Fill the first column with 3 elements.
This column of 3 blocks exactly $\binom{3}{2}=3$
of the possible $\binom{6}{3}=15$ ordered pairs.
Hence we can fill the next $15-3=12$ columns with
two elements each and the remaining column (if $m=14$)
with 1 element.
We omit the picture.

\smallskip
\noindent
{\bf Case 5: $\maxrf 6 m $ where $ m\ge 15$:}
Fill the first $\binom{6}{2}=15$ columns with two
elements each in a way so that each column has a distinct pair.
Fill the remaining $m-15$ columns with one element each.
The result is a rectangle-free set of size
$30 + m-15 = m+15$.
\end{proof}

Rectangle Free Coloring of Grids