March 2019
Intermediate to advanced
336 pages
9h 9m
English
The Thue–Morse sequence is a binary sequence starting at zero that appends the Boolean complement of the current sequence.
The Thue–Morse sequence is as follows:

The Thue–Morse sequence was applied by Eugene Prophet and used by Axel Thue in the study of combinatorics on words. The Thue–Morse sequence is used in the area of fractal curves, such as Koch snowflakes.
The following code snippet creates the Thue–Morse sequence. The ThueMorseSequence function takes a bytes.Buffer instance buffer and modifies the buffer to the Thue–Morse sequence by applying the complement operation on the bytes:
//main package has examples shown// in Go ...
Read now
Unlock full access