De Bruijn torus

Last updated
STL model of de Bruijn torus (16,32;3,3)2 with 1s as panels and 0s as holes in the mesh - with consistent orientation, every 3x3 matrix appears exactly once De bruijn torus 3x3.stl
STL model of de Bruijn torus (16,32;3,3)2 with 1s as panels and 0s as holes in the mesh with consistent orientation, every 3×3 matrix appears exactly once

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. Its name comes from the De Bruijn sequence, which can be considered a special case where n is 1 (one dimension).

Contents

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.

B2

The (4,4;2,2) de Bruijn torus. Each 2-by-2 binary matrix can be found within it exactly once. 2-2-4-4-de-Bruijn-torus.svg
The (4,4;2,2) de Bruijn torus. Each 2-by-2 binary matrix can be found within it exactly once.

Apart from "translation", "inversion" (exchanging 0s and 1s) and "rotation" (by 90 degrees), no other (4,4;2,2)2 de Bruijn tori are possible this can be shown by complete inspection of all 216 binary matrices (or subset fulfilling constrains such as equal numbers of 0s and 1s). [4]

De Bruijn torus (8,8;3,2) containing all 64 possible 3-row x 2-column matrices exactly once, with wraparound - the bottom half is the negative of the top half De bruijn torus 3x2.svg
De Bruijn torus (8,8;3,2) containing all 64 possible 3-row × 2-column matrices exactly once, with wrap­around the bottom half is the negative of the top half

The torus can be unrolled by repeating n1 rows and columns. All n×n submatrices without wraparound, such as the one shaded yellow, then form the complete set:

10111
10001
00010
11011
10111

Larger example: B4

B4 as a binary square matrix
The grid highlights some of the 4x4 matrices, including those of zeros and of ones at the upper margin. Visualisation of a (256,256;4,4) 2 de Bruijn torus.svg
B4 as a binary square matrix
The grid highlights some of the 4×4 matrices, including those of zeros and of ones at the upper margin.

An example of the next possible binary "square" de Bruijn torus, (256,256;4,4)2 (abbreviated as B4), has been explicitly constructed. [5]

The image on the right shows an example of a (256,256;4,4)2 de Bruijn torus / array, where the zeros have been encoded as white and the ones as red pixels respectively.

Binary de Bruijn tori of greater size

The paper in which an example of the (256,256;4,4)2 de Bruijn torus was constructed contained over 10 pages of binary, despite its reduced font size, requiring three lines per row of array.

The subsequent possible binary de Bruijn torus, containing all binary 6×6 matrices, would have 236 = 68,719,476,736 entries, yielding a square array of dimension 262,144×262,144, denoted a (262144,262144;6,6)2 de Bruijn torus or simply B6. This could easily be stored on a computerif printed with pixels of side 0.1 mm, such a matrix would require an area of approximately 26×26 square metres.

The object B8, containing all binary 8×8 matrices and denoted (4294967296,4294967296;8,8)2, has a total of 264 ≈ 18.447×1018 entries: storing such a matrix would require 18.5 exabits, or 2.3 exabytes of storage. At the above scale, it would cover 429×429 square kilometres.

The following table illustrates the super-exponential growth.

nCells in a
submatrix
= n2
Number of
submatrices
= 2n2
Bn side
length
= 2(n2/2)
24164
41665536256
63668719476736262144
864~1.84×1019~4.29×109
10100~1.27×1030~1.13×1015
12144~2.23×1043~4.72×1021
14196~1.00×1059~3.17×1029
16256~1.16×1077~3.40×1038
18324~3.42×1097~5.85×1048
20400~2.60×10120~1.61×1060

See also

Related Research Articles

In mathematics, Gaussian elimination, also known as row reduction, is an algorithm for solving systems of linear equations. It consists of a sequence of operations performed on the corresponding matrix of coefficients. This method can also be used to compute the rank of a matrix, the determinant of a square matrix, and the inverse of an invertible matrix. The method is named after Carl Friedrich Gauss (1777–1855) although some special cases of the method—albeit presented without proof—were known to Chinese mathematicians as early as circa 179 CE.

Latin square Square array with symbols that each occur once per row and column

In combinatorics and in experimental design, a Latin square is an n × n array filled with n different symbols, each occurring exactly once in each row and exactly once in each column. An example of a 3×3 Latin square is

Torus Doughnut-shaped surface of revolution

In geometry, a torus is a surface of revolution generated by revolving a circle in three-dimensional space about an axis that is coplanar with the circle.

Matrix multiplication Mathematical operation in linear algebra

In mathematics, particularly in linear algebra, matrix multiplication is a binary operation that produces a matrix from two matrices. For matrix multiplication, the number of columns in the first matrix must be equal to the number of rows in the second matrix. The resulting matrix, known as the matrix product, has the number of rows of the first and the number of columns of the second matrix. The product of matrices A and B is denoted as AB.

Sparse matrix Matrix in which most of the elements are zero

In numerical analysis and scientific computing, a sparse matrix or sparse array is a matrix in which most of the elements are zero. There is no strict definition regarding the proportion of zero-value elements for a matrix to qualify as sparse but a common criterion is that the number of non-zero elements is roughly equal to the number of rows or columns. By contrast, if most of the elements are non-zero, the matrix is considered dense. The number of zero-valued elements divided by the total number of elements is sometimes referred to as the sparsity of the matrix.

In combinatorics, two Latin squares of the same size (order) are said to be orthogonal if when superimposed the ordered paired entries in the positions are all distinct. A set of Latin squares, all of the same order, all pairs of which are orthogonal is called a set of mutually orthogonal Latin squares. This concept of orthogonality in combinatorics is strongly related to the concept of blocking in statistics, which ensures that independent variables are truly independent with no hidden confounding correlations. "Orthogonal" is thus synonymous with "independent" in that knowing one variable's value gives no further information about another variable's likely value.

In mathematics, a Hadamard matrix, named after the French mathematician Jacques Hadamard, is a square matrix whose entries are either +1 or −1 and whose rows are mutually orthogonal. In geometric terms, this means that each pair of rows in a Hadamard matrix represents two perpendicular vectors, while in combinatorial terms, it means that each pair of rows has matching entries in exactly half of their columns and mismatched entries in the remaining columns. It is a consequence of this definition that the corresponding properties hold for columns as well as rows. The n-dimensional parallelotope spanned by the rows of an n×n Hadamard matrix has the maximum possible n-dimensional volume among parallelotopes spanned by vectors whose entries are bounded in absolute value by 1. Equivalently, a Hadamard matrix has maximal determinant among matrices with entries of absolute value less than or equal to 1 and so is an extremal solution of Hadamard's maximal determinant problem.

In mathematics, a unimodular matrixM is a square integer matrix having determinant +1 or −1. Equivalently, it is an integer matrix that is invertible over the integers: there is an integer matrix N that is its inverse. Thus every equation Mx = b, where M and b both have integer components and M is unimodular, has an integer solution. The n × n unimodular matrices form a group called the n × n general linear group over , which is denoted .

In mathematics, computer science and especially graph theory, a distance matrix is a square matrix containing the distances, taken pairwise, between the elements of a set. Depending upon the application involved, the distance being used to define this matrix may or may not be a metric. If there are N elements, this matrix will have size N×N. In graph-theoretic applications the elements are more often referred to as points, nodes or vertices.

de Bruijn sequence Cycle through all length-k sequences

In combinatorial mathematics, a de Bruijn sequence of order n on a size-k alphabet A is a cyclic sequence in which every possible length-n string on A occurs exactly once as a substring. Such a sequence is denoted by B(k, n) and has length kn, which is also the number of distinct strings of length n on A. Each of these distinct strings, when taken as a substring of B(k, n), must start at a different position, because substrings starting at the same position are not distinct. Therefore, B(k, n) must have at leastkn symbols. And since B(k, n) has exactlykn symbols, De Bruijn sequences are optimally short with respect to the property of containing every string of length n at least once.

Combinatorial design theory is the part of combinatorial mathematics that deals with the existence, construction and properties of systems of finite sets whose arrangements satisfy generalized concepts of balance and/or symmetry. These concepts are not made precise so that a wide range of objects can be thought of as being under the same umbrella. At times this might involve the numerical sizes of set intersections as in block designs, while at other times it could involve the spatial arrangement of entries in an array as in sudoku grids.

A logical matrix, binary matrix, relation matrix, Boolean matrix, or (0, 1) matrix is a matrix with entries from the Boolean domain B = {0, 1}. Such a matrix can be used to represent a binary relation between a pair of finite sets.

In mathematics, a conference matrix is a square matrix C with 0 on the diagonal and +1 and −1 off the diagonal, such that CTC is a multiple of the identity matrix I. Thus, if the matrix has order n, CTC = (n−1)I. Some authors use a more general definition, which requires there to be a single 0 in each row and column but not necessarily on the diagonal.

In mathematics, particularly matrix theory and combinatorics, a Pascal matrix is a matrix containing the binomial coefficients as its elements. It is thus an encoding of Pascal's triangle in matrix form. There are three natural ways to achieve this: as a lower-triangular matrix, an upper-triangular matrix, or a symmetric matrix. For example, the 5 × 5 matrices are:

In mathematics a regular Hadamard matrix is a Hadamard matrix whose row and column sums are all equal. While the order of a Hadamard matrix must be 1, 2, or a multiple of 4, regular Hadamard matrices carry the further restriction that the order be a square number. The excess, denoted E(H), of a Hadamard matrix H of order n is defined to be the sum of the entries of H. The excess satisfies the bound |E(H)| ≤ n3/2. A Hadamard matrix attains this bound if and only if it is regular.

Matrix (mathematics) Two-dimensional array of numbers

In mathematics, a matrix is a rectangular array or table of numbers, symbols, or expressions, arranged in rows and columns, which is used to represent a mathematical object or a property of such an object.

In discrete mathematics, the Bregman–Minc inequality, or Bregman's theorem, allows one to estimate the permanent of a binary matrix via its row or column sums. The inequality was conjectured in 1963 by Henryk Minc and first proved in 1973 by Lev M. Bregman. Further entropy-based proofs have been given by Alexander Schrijver and Jaikumar Radhakrishnan. The Bregman–Minc inequality is used, for example, in graph theory to obtain upper bounds for the number of perfect matchings in a bipartite graph.

Moser–De Bruijn sequence Number, sum of distinct powers of 4

In number theory, the Moser–De Bruijn sequence is an integer sequence named after Leo Moser and Nicolaas Govert de Bruijn, consisting of the sums of distinct powers of 4, or equivalently the numbers whose binary representations are nonzero only in even positions.

References

  1. Fan, C. T.; Fan, S. M.; Ma, S. L.; Siu, M. K. (1985). "On de Bruijn arrays". Ars Combinatoria A. 19: 205–213.
  2. Chung, F.; Diaconis, P.; Graham, R. (1992). "Universal cycles for combinatorial structures". Discrete Mathematics. 110 (1): 43–59. doi: 10.1016/0012-365x(92)90699-g .
  3. Jackson, Brad; Stevens, Brett; Hurlbert, Glenn (Sep 2009). "Research problems on Gray codes and universal cycles". Discrete Mathematics. 309 (17): 5341–5348. doi: 10.1016/j.disc.2009.04.002 .
  4. Eggen, Bernd R. (1990). "The Binatorix B2". Private communication.
  5. Shiu, Wai-Chee (1997). "Decoding de Bruijn arrays constructed by the FFMS method". Ars Combinatoria. 47 (17): 33–48.