De Bruijn sequence
A De Bruijn sequence is a series of characters which represents all possible character combinations of given length from a specified alphabet. For example, for an alphabet consisting of the characters A, B, and C, with a length of two, the total list of possible combinations are: AA, AB, AC, BA, BB, BC, CA, CB, and CC, which is 18 characters in length. However, the De Bruijn sequence would be: AABACBBCC, which includes all those those combinations, but is only nine characters in length. De Bruijn sequences are useful in compression, but also in encryption.
- youtube.com/watch?v=CNodxp9Jy4A - Veritasium - Using De Bruijn sequences to open wireless gates and doors.