In a checked $ 17\times 17$ table, $ n$ squares are colored in black. We call a line any of rows, columns, or any of two diagonals of the table. In one step, if at least $ 6$ of the squares in some line are black, then one can paint all the squares of this line in black. Find the minimal value of $ n$ such that for some initial arrangement of $ n$ black squares one can paint all squares of the table in black in some steps.
Problem
Source: International Zhautykov Olympiad 2009, day 2, problem 6.
Tags: floor function, inequalities, ceiling function, combinatorics proposed, combinatorics
19.01.2009 19:10
I got an example with $ 27 = 6\times 4 + 3$
19.01.2009 19:11
mszew wrote: I got an example with $ 28 = 6\times 4 + 4$ no, please ask such questions by pm
18.02.2009 20:38
The minimal value of n is 27. Suppose by way of contradiction that the minimal value such that all squares can be painted black is $ n \leq 26$. In each step, at most 16-6=11 squares are painted black. At least $ 17^2 - 26 = 263$ squares are initially white, so at least $ \lfloor \frac {263}{11} \rfloor = 24$ steps must be performed. Let B be the set of squares that are initially black, $ A_i$ the line of squares chosen in the i-th step to paint, $ B_i = A_i \cap B - (\bigcup_{k = 1}^{i - 1} A_k)$, and $ b_i = |B_i|$. Call $ A_i$ a row, column, or diagonal if $ A_i$ is a set of squares in the same row, column, or diagonal. Call $ A_i$ row-oriented, column-oriented if $ A_i$ is a row or diagonal, column or diagonal, respectively. Note that for any 2 squares, there is at most 1 line that contains them. So (since no line is painted twice all the sets $ A_i$ are distinct) \begin{eqnarray*} |A_i \cap A_j| \leq 1 \end{eqnarray*} for all $ i \neq j$. Additionally, if $ A_i$ and $ A_j$ are both rows or both columns, \begin{eqnarray*} A_i \cap A_j = \phi \end{eqnarray*} Now, since there must be 6 black squares in a line to paint it, \begin{eqnarray*} b_i \geq 6 - \sum_{j < i} |A_i \cap A_j| \end{eqnarray*} so if $ A_i$ is a row, $ b_i \geq 6 - |\{j|j < i, A_j$ column-oriented $ \} |$ and if $ A_i$ is a column, $ b_i \geq 6 - |\{j|j < i, A_j$ row-oriented $ \} |$ and if $ A_i$ is a diagonal, $ b_i \geq 6 - (i - 1)$. Since there are at least 24 sets $ A_i$, at least 6 of the sets must all be row-oriented or all column-oriented. Let i be the smallest positive integer such that at least 6 of the sets $ A_1,A_2,\ldots A_i$ are all column-oriented or all row-oriented. Without loss of generality, suppose the latter is true. Suppose of the sets $ A_1,A_2,\ldots A_i$, $ r$ are rows, $ c$ are columns, and $ d$ are diagonals. Note $ r + d = 6$ and $ d \leq 2$. We have \begin{eqnarray*}|B| \geq \sum_{k = 1}^{i} b_k & \geq & \sum_{k|A_k, A_k row, k\leq i} (6 - |\{j|j < k, A_j row - oriented \} |) \\ & + & \sum_{k|A_k, A_k column, k\leq i} (6 - |\{j|j < k, A_j column - oriented \} |) \\ & + & \sum_{k|A_k, A_k diagonal, k\leq i} (6 - (k - 1)) \\ & = & 6i - [\sum_{k|A_k, A_k row, k\leq i} (|\{j|j < k, A_j row - oriented \} |) \\ & + & \sum_{k|A_k, A_k column, k\leq i} (|\{j|j < k, A_j column - oriented \} |) \\ & + & \sum_{k|A_k, A_k diagonal, k\leq i} ((k - 1))] \end{eqnarray*}(*) The first sum counts the number of pairs $ (j,k)$ such that $ 1 \leq j < k \leq i$ and (A) $ A_j$ is a row, $ A_k$ is a column. (B) $ A_j$ is a diagonal, $ A_k$ is a column. The second sum counts the number of pairs $ (j,k)$ such that $ 1 \leq j < k \leq i$ and (C) $ A_j$ is a column, $ A_k$ is a row. (D) $ A_j$ is a diagonal, $ A_k$ is a row. The third sum counts the number of pairs $ (j,k)$ such that $ 1 \leq j < k \leq i$ and (E) $ A_k$ is a diagonal. The set of pairs $ (j,k), 1 \leq j < k \leq i$ such that (A) or (C) is true is just the number of pairs $ (j,k), 1 \leq j, k \leq i$ such that $ A_j$ is a row and $ A_k$ is a column; this set has $ r \cdot c$ elements. The set of pairs $ (j,k), 1 \leq j < k \leq i$ such that (B), (D), or (E) is true is the number of pairs such that (F) $ A_j$ is a diagonal, $ A_k$ is a row or column or (G) $ A_j, A_k$ are both diagonals. So this set has $ d(r + c) + \binom{d}{2}$ elements. Therefore, from (*), and using $ c = i - r - d$ and $ r + d = 6$, \begin{eqnarray*} |B| & \geq & 6i - (r \cdot c + d(r + c) + \binom{d}{2}) \\ & = & 6i - (r(i - r - d) + d(i - d) + \binom{d}{2}) \\ & = & (6 - r - d)i + r^2 + rd + d^2 - \binom{d}{2} \\ & = & r^2 + rd + d^2 - \binom{d}{2} \end{eqnarray*} We have $ (r,d) = (4,2),(5,1)$ or $ (6,0)$; this expression attains minimum when $ (r,d) = (4,2)$, so $ |B| \geq 4^2 + 4 \cdot 2 + 2^2 - \binom{2}{2} = 27$ a contradiction. Now we show there exists an arrangement of 27 black squares such that all squares can be painted black. Number the rows and columns 1-17. Represent a square by a pair $ (r,c)$ where r is the row and c is the column. Color the following squares black: $ (7,1),(8,1),(9,1),(10,1),(7,2),(8,2),(9,2),(10,2)$,$ (7,16),(8,16),(9,16),(10,16),(7,17),(8,17),(9,17),(10,17)$,$ (7,7),(8,8),(9,9),(10,10),(11,11),(12,12),(11,7),(10,8), (8,10),(7,11),(6,12)$ To paint all squares black, first paint both diagonals, then columns 1,2,16,17, then rows 3,4,5,6,7,8,10,11,12,13,14,15, and finally all columns that still have at least 1 white square. Note there is nothing special about 17; this proof works for all sufficiently large square boards.
05.05.2009 19:33
Excuse me,but could somebody explain me how silversheep defined $ B_i$.As i know the intersection of $ A_i$ and $ B$ could be $ \oslash$.Whereas $ \mid (\bigcup A_i) \mid > 0$
05.05.2009 19:57
It's OK for $ B_i$ to be $ \phi$. Basically, $ B_i$ contains all squares in the row/column/diagonal selected at step i, that were initially black before step i was performed, (excluding those in a row/column/diagonal already selected). For each $ A_j (j < i)$ there can be at most $ |A_{i}\cap A_{j}|$ squares in line i colored black in step j. The other black squares in line i right before step i must come be originally black and hence from $ B_i$. By the problem, we must already have 6 black squares to color it, so \begin{eqnarray*}b_{i} + \sum_{j < i}|A_{i}\cap A_{j}|\geq 6\end{eqnarray*}, which is where the key inequality \begin{eqnarray*}b_{i}\geq 6 - \sum_{j < i}|A_{i}\cap A_{j}|\end{eqnarray*} comes from. Note: Near the beginning the proof it should read "17-6=11" and $ \lceil\frac {263}{11}\rceil = 24$
05.01.2015 17:54
Lemma. Suppose that one has a rectangular table, and one able to paint a row if it contains at least $k$ black squares, and a column if it contains at least $l$ black squares (all other actions are prohibited) then, to paint all the squers, there shuld be not less then $kl$ initial black squares. $NOTE$ : this lemma is from official solution!