All Puzzles: Here
Puzzle: An 8×8 matrix contains zeros and ones. You may repeatedly choose any 3×3 or 4×4 block and flip all bits in the block (that is, convert zeros to ones, and ones to zeros). Can you remove all the ones in the matrix?
Source: From an old Russian problem book that I had in 1991.
Solution: There are 36 3×3 blocks and 25 4×4 blocks. Given a sequence of blocks, the same effect is achieved no matter in what order the blocks are chosen. If the same block occurs two times in a sequence, their effect is nullified. Thus, a sequence of blocks is equivalent in effect to some subset of the 64 + 25 = 61 blocks. Starting with all zeros, at most 2^61 distinct configurations out of 2^64 possible configurations of the matrix can be reached. This means that we may not be able to remove all the ones from the original matrix.
Hi gurmeet,
Could you share the russian book name you mentioned in the source section ?
Thanks,
Narayana
Nice problem!!
A small typo there…36+25 = 61!!
BTW, Can you tell the name of the Russian Book. Thanx.