-2

A 7x7 chessboard that painted in black-white (the corners are black). The operator "inverse - change color" can be run on a single row or column in the panel. the goal is to make the whole panel black.

Ques: what is the minimum number of operations to achieve the goal?

Note: i'm forcing to use a Metric/Index; that relates to the area of specific squares in my answer

1 Answers1

1

The optimal number of operations is $6$. This is when each of the columns/rows which have white squares at their edge are converted in turn. i.e. change the colour of every row which has a white square at the edge of the board. Then do the same for every column.

To prove that this is optimal, consider the final move in this process. In order for every square to become black after an operation is performed, the entire row must be white. If we then select a row and say that this row will be the final row to be converted, we must first convert every column which has a black square in the selected row. After doing this we can convert the remaining white rows until we get to the originally selected row. Note that there are two cases when choosing the 'final row' - either it has $3$ or $4$ black tiles originally. In order for the optimal operation to be performed we need to select a row with $3$ black tiles so that only $3$ corresponding columns need to be converted.

Peter Foreman
  • 19,947
  • Note: i'm forcing to use a Metric/Index; that relates to the area of specific squares in my answer – Rawansadek Mar 30 '19 at 20:03
  • I have no idea what that means, what do you want as an answer other than the number of operations required - $6$? – Peter Foreman Mar 30 '19 at 20:04
  • No I agree with you that the minimum number is 6. But I ask if there another way to prove it with using an index that related to space of some squares in the panel. – Rawansadek Mar 30 '19 at 20:09
  • Sorry, but I don't know what that means. What do you mean by 'space of some squares'? We are not measuring their dimensions. – Peter Foreman Mar 30 '19 at 20:11
  • I mean the area of black squares Vs the area of white squares.. that there's 25 black and 24 white.. maybe there is a prove by looking on this thing – Rawansadek Mar 30 '19 at 20:20