In combinatorial mathematics, a De Bruijn torus, named after Dutch mathematician Nicolaas Govert de Bruijn, is an array of symbols from an alphabet (often just 0 and 1) that contains every possible matrix of given dimensions m × n exactly once. It is a torus because the edges are considered wraparound for the purpose of finding matrices. Its name comes from the De Bruijn sequence, which can be considered a special case where n = 1 (one dimension).
One of the main open questions regarding De Bruijn tori is whether a De Bruijn torus for a particular alphabet size can be constructed for a given m and n. It is known that these always exist when n = 1, since then we simply get the De Bruijn sequences, which always exist. It is also known that "square" tori exist whenever m = n and even (for the odd case the resulting tori cannot be square).[1][2][3]
The smallest possible binary "square" de Bruijn torus, depicted above right, denoted as (4,4;2,2)2 de Bruijn torus (or simply as B2), contains all 2×2 binary matrices.