Binary Table minimize operations

Revision en2, by SPyofgame, 2020-11-19 05:56:22

Original Problem

You are given a binary table of size n×m. This table consists of symbols $$$0$$$ and $$$1$$$ You can make such operation: select $$$3$$$ different cells that belong to one $$$2×2$$$ square and change the symbols in these cells (change $$$0$$$ to $$$1$$$ and $$$1$$$ to $$$0$$$) Your task is to make all symbols in the table equal to $$$0$$$

Is there an algorithm other than brute-force to find minimum number of operations in these problem ?

I am wondering if I can use Gauss-Elimination (mod 2) or Greedy-DP to solve in somehow

Code solution without minimizing (with comments)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en13 English SPyofgame 2020-11-22 13:16:03 8
en12 English SPyofgame 2020-11-22 13:14:57 7588 Tiny change: 'cdot k + 4, k \in \mathbb{N}$, we need' -> 'cdot k + 4 (k \in \mathbb{N})$, we need'
en11 English SPyofgame 2020-11-21 12:04:30 2936
en10 English SPyofgame 2020-11-21 11:12:55 1977
en9 English SPyofgame 2020-11-19 15:23:51 60
en8 English SPyofgame 2020-11-19 12:31:41 184
en7 English SPyofgame 2020-11-19 12:25:20 461
en6 English SPyofgame 2020-11-19 12:22:08 4568
en5 English SPyofgame 2020-11-19 11:17:33 169 Tiny change: 'om/contest\n/1439/prob' -> 'om/contest/1439/prob'
en4 English SPyofgame 2020-11-19 05:59:56 6
en3 English SPyofgame 2020-11-19 05:59:11 532 Tiny change: ' and $1$\n\nYou can ' -> ' and $1$\nYou can '
en2 English SPyofgame 2020-11-19 05:56:22 552 Tiny change: 'th comment)">\n\n<sp' -> 'th comments)">\n\n<sp'
en1 English SPyofgame 2020-11-19 05:53:50 16258 Initial revision (published)