## Task B-4.5.

On a square tile of dimensions $8 \times 8$, a field in the second row and third column is colored. Let $A$ be the number of squares $k \times k, k \in\{1,2, \ldots, 8\}$ that contain the colored field, and $B$ be the number of squares that do not contain the colored field. Determine the ratio $\frac{A}{B}$.

![](https://cdn.mathpix.com/cropped/2024_05_30_bcbf631b6726be7fa637g-27.jpg?height=315&width=303&top_left_y=1847&top_left_x=1385)
## First Solution.

Let's calculate the total number of $k \times k, k \in\{1,2,3,4,5,6,7,8\}$ squares on an $8 \times 8$ board.

There are 64 $1 \times 1$ squares.

There are 49 $2 \times 2$ squares, because the first row of such a square with two fields can be placed in the first row of the given grid in 7 ways, in the second row in 7 ways, and so on up to the seventh row, which is a total of $7 \cdot 7$ ways.

By similar reasoning, we get that there are 36 $3 \times 3$ squares, 25 $4 \times 4$ squares, 16 $5 \times 5$ squares, 9 $6 \times 6$ squares, 4 $7 \times 7$ squares, and 1 $8 \times 8$ square.

Thus, the total number of squares is

$$
1+4+9+16+25+36+49+64=204
$$

Let's count how many such squares contain the colored field. There is 1 $1 \times 1$ square. There are 4 $2 \times 2$ squares because we can place them such that the colored field is any of the four fields of that square.

We can place $3 \times 3$ squares such that the colored field is in the first two rows or the first three columns of such a square, which means in 6 ways.

The same applies to $4 \times 4$, $5 \times 5$, and $6 \times 6$ squares.

There are 4 $7 \times 7$ squares (since the colored field can only be in the 1st and 2nd rows and the 1st and 2nd columns). There is obviously only 1 $8 \times 8$ square.

In total, there are $1+4+6+6+6+6+4+1=34$ squares that contain the colored field.

Then, the number of squares that do not contain it is $204-34=170$, so the desired ratio is $\frac{34}{170}=\frac{1}{5}$.