that described above for rotary encoding. Position can be determined by examining the m-by-n matrix directly adjacent to the sensor, and calculating its position on the de Bruijn torus. De Bruijn decoding Computing the position of a particular unique tuple or matrix in a de Bruijn sequence or torus is known as the de Bruijn Decoding Problem. Efficient decoding algorithms exist for special, recursively constructed sequences and extend to the two dimensional case. De Bruijn decoding is of interest, e.g., in cases where large sequences or tori are used for positional encoding. See also Normal number Linear-feedback shift register n-sequence BEST theorem Superpermutation Notes References Reprinted in Wardhaugh, Benjamin, ed. (2012), A Wealth of Numbers: An Anthology of 500 Years of Popular Mathematics Writing'', Princeton University Press, pp. 139–144. External links De Bruijn sequence CGI generator Applet generator Javascript generator and decoder. Implementation of J. Tuliani's algorithm. Door code lock Minimal arrays containing all sub-array combinations of symbols: De Bruijn sequences and tori http://debruijnsequence.org has many kinds of de Bruijn sequences. Binary sequences Enumerative combinatorics Articles with example Python (programming language) code