1)
We will count value S, the number of the tuples (A,B,C) with column A,B and row C in relation A−C,B−C intersect at the colored cell.
First way, denote xi as the number of colored cells on the ith row, then
S=i=1∑p2+p+1(2xi).
Second way, choose two columns among p2+p+1 columns, we have (2p2+p+1) ways. And then, we have at most 1 row C that cuts A,B at two colored cells (since there are no rectangle), then
S≤(2p2+p+1).
Notice that ∑i=1p2+p+1xi=k. Hence, we have
(2p2+p+1)≥i=1∑p2+p+1(2xi)≥21(p2+p+11k2−k)
or k≤(p+1)(p2+p+1).
2)
Consider the tuples (a,b,c) in which 0≤a,b,c≤p−1 and a+b+c>0, then we have p3−1 tuples in total.
Since two tuples (a,b,c) and (d,e,f) are considered to belong to the same set if and only if ∃k∈{1,2,3,…,p−1} such that a≡kd,b≡ke,c≡kf(modp). We have p−1 ways to choose k, then p−1p3−1=p2+p+1 sets satisfy the given condition.
3)
From the way to color the table, one can check that on each row, there are exactly p+1 colored cells. Indeed, we need to prove that ax+by+cz≡0(modp) has exactly p+1 solutions that do not belong to the same set S1,S2,…,Sp2+p+1.
There are p2−1 pairs (x,y) and for each pair, there is a unique number z such that ax+by+cz is divisible by p. Each set has p−1 solutions, then there are p+1 solutions that do not belong to the same set. Multiply this number with the number of columns, we have verified that there are (p+1)(p2+p+1) colored cells on the table.
Then, we shall prove that there are no rectangles. For two tuples (a,b,c) and (d,e,f) that do not belong to the same set, we need to prove that the following system of equations has no more than one solution:
{ax+by+cz≡0dx+ey+fz≡0(modp)(modp)
Without loss of generality, we can suppose that eb−fc is not divisible by p or bf≡ce(modp), then for all x0=1,…,p−1, there is exactly one value y0,z0 such that
by0+cz0=ax0,ey0+fz0=dx0(modp).
On the other hand, there are p values x0 and we do not consider the tuple (0,0,0), then there are at most p−1 solutions.
Note that if (x,y,z) is a solution, then so is (kx,ky,kz), then the above system has no more than one solution.
This finishes our proof and kmax=(p+1)(p2+p+1).