PHP - 6 x 16 checkerboard painted in 3 colors

66 Views Asked by At

I have a suggestion for a solution to a question and I would appreciate if you could verfy it.

Question

Consider a $6\times 16$ checkerboard painted in 3 colors (let's say $0,1,2$ ). Prove that there is a rectangle whose four vertices are painted in the same color.

My solution

There are $6\cdot 16$ different squares, only $3$ different colors then by PHP there are at least $\left\lceil \frac{6 \cdot 16}{3} \right\rceil = 32$ different squares of the same color. You only need $4$ to finish the proof.

This question appeared in some test. If my solution is right then I think the question is too easy for a test. That's why I have to verify if it's correct.