TITLE: Does there exist a $20\times20$ boolean matrix such that no two $3\times3$ submatrices are identical?
QUESTION [5 upvotes]: I want to create  a 20*20 boolean  matrix that i will be converting to something like a square  bar code.
 I will be looking on this matrix through  a 3*3 window, and what i want is every time i randomly move this window it gives me a unique 3*3 matrix,  so i can determine  where the window is by comparing it to the big matrix.
Thanks

REPLY [10 votes]: I found a solution using simulated annealing:
11110000100110110010
00010111100011011001
10011101100100110100
00000001010010111111
11011101010000001011
01001100101111111100
11000110100010001011
00000111101000010011
01011110010001100011
10111101101000001010
00000110011011001100
10000000111100110110
00101011011100100011
10001011101001101010
10111110101111011011
00101110011110101001
01111001100110010100
01101010101111110110
10010000101000100100
11111101000010100010