 De Bruijn torus

In combinatorial mathematics, a De Bruijn torus, named after Nicolaas Govert de Bruijn, is an array of symbols from an alphabet (often just 0 and 1) that contains every "m"-by-"n" matrix exactly once.It is a torus because the edges are considered wraparound for the purpose of finding matrices.