Each cell of a $7\times7$ table is painted with one of several colours. It is known that for any two distinct rows the numbers of colours used to paint them are distinct and for any two distinct columns the numbers of colours used to paint them are distinct.What is the maximum possible number of colours in the table?
Problem
Source: Kyiv mathematical festival 2017
Tags: Kyiv mathematical festival, combinatorics
08.05.2017 03:03
Edit: nvm this is wrong - see below
09.05.2017 17:50
laegolas wrote: Thus the table must have exactly $7$ distinct colors. Your argument doesn't work after the first row/column. In fact, it's possible to use way more than 7 colours (I don't know if my example is the maximun or not)
Attachments:

09.05.2017 18:25
If each row must have distinct number of colors, we have exactly one row with one color, one row with two colors and so on to seven. The same with columns. So let paint one row with one color ( it can be the uppermost ). Next row we can paint with two colors but if they are different from the first one, we would not get a column with exactly one color, so we can get at most one new color. Let consider the row with three colors. If they are different from the first color we would not get a column with exactly one color which is necessary. So we get at most two new colors and so on for four, five, six and seven. So we would get at most $1 + \frac{7(0 + 6)}{2} = 22$ colors. $$\left[ \begin{array}{ccccccc} A & A & A & A & A & A & A\\ A & A & A & A & A & A & B\\ A & A & A & A & A & C & D\\ A & A & A & A & E & F & G\\ A & A & A & H & I & J & K\\ A & A & L & M & N & O & P\\ A & Q & R & S & T & U & V\\ \end{array} \right]$$