chess:programming:de_bruijn_sequence:about_de_bruijn_sequences
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
chess:programming:de_bruijn_sequence:about_de_bruijn_sequences [2021/10/28 14:08] – [Simple B(2,2)] peter | chess:programming:de_bruijn_sequence:about_de_bruijn_sequences [2021/10/28 14:19] (current) – [Chess - Programming - de Bruijn Sequence - About De Bruijn Sequences] peter | ||
---|---|---|---|
Line 27: | Line 27: | ||
* The answer is **Yes**, it is possible to make a non-repeating sequence of numbers that covers every sub-sequence internally, just once. | * The answer is **Yes**, it is possible to make a non-repeating sequence of numbers that covers every sub-sequence internally, just once. | ||
* This is a de Bruijn Sequence. | * This is a de Bruijn Sequence. | ||
+ | |||
+ | * See [[Chess: | ||
</ | </ | ||
Line 55: | Line 57: | ||
To generate a string that contains sub-strings of each possible combination of two digits: | To generate a string that contains sub-strings of each possible combination of two digits: | ||
+ | |||
+ | {{: | ||
<code bash> | <code bash> | ||
0011 | 0011 | ||
</ | </ | ||
- | |||
- | {{ : | ||
- | |||
<WRAP info> | <WRAP info> | ||
Line 87: | Line 88: | ||
</ | </ | ||
+ | ---- | ||
+ | |||
+ | ===== B(2,6) ===== | ||
+ | |||
+ | Here is a solution for B(2,6): | ||
+ | |||
+ | < | ||
+ | 0000001000011000101000111001001011001101001111010101110110111111 | ||
+ | </ | ||
---- | ---- | ||
+ | ===== B(6,2) ===== | ||
+ | |||
+ | Here is the output for B(6,2): | ||
+ | |||
+ | <code bash> | ||
+ | 001020304051121314152232425334354455 | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | * Rather than simple binary k=2, this is increased to k=6 to use possible values {0, | ||
+ | * Reading this from left to right shows: 00, 01, 10, 02, 20 … 41, 15 … 33, 34 … 55, 50 | ||
+ | * this 50 at the end is comprised of the last 5 and the first 0. | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
===== References ===== | ===== References ===== | ||
https:// | https:// |
chess/programming/de_bruijn_sequence/about_de_bruijn_sequences.1635430112.txt.gz · Last modified: 2021/10/28 14:08 by peter