Talk:Thue–Morse sequence

Unclear code, my implementation
To me, the pseudocode was not very clear, especially considering indexOfHighestOneBit was neither implemented nor explained.

Here is my implementation in Python, which uses the "When counting in binary, the digit sum modulo 2 is the Thue–Morse sequence" fact. itertools.count just counts 0, 1, 2, 3... forever (this could also be written as a while loop to make it into pseudocode). bit_count calculates the Hamming weight, and & 1 is like taking "modulo 2"/parity.

import itertools def thue_morse: for n in itertools.count: yield n.bit_count & 1 for b in thue_morse: print(b, end=", ")

2605:A601:A621:3500:9C07:ED35:CE4A:8532 (talk) 04:50, 3 August 2023 (UTC)

(History section and John Colosimo)
Hi,

(That's my 1st wikipedia entry so - my apologies if something is wrong...)

In the 'History' section, user 'colosimo' states:

'Also, the sequence was rediscovered in 2000 by 8th grade student John Colosimo, who used it as the perfect order in which participants in turn-taking games could most fairly take turns. It especially applies in games where the players move along a path to reach a desired goal, eliminating any advantage potentially gained by either player by taking the first turn.'

An interesting application for the Thue-Morse Sequence. Congratulations. However, I searched the web for an evidence of this statement without finding one. There are may other examples of people who 'happened' to re-discovered the Thue-Morse Sequence, so I suggest either to give an evidence (publication) that John Colosimo indeed re-discovered the Thue-Morse Sequence, or to delete the section.

Best regards

--80.171.178.236 16:23, 20 December 2006 (UTC) Janosch


 * $$\lim_{n\rightarrow \infin} a(n)$$ is indeed balanced, though one must concede that most games consist of finite turns, and of those, most are predisposed to granting an unfair advantage to one side or the other, even when attempting to offset that advantage with Thue-Morse, due to the fact that the number of turns tends to most often fall in a fairly narrow band (which can be trivially proven by observing that in a game which typically finishes in a single turn, the first player will have a significant advantage!).


 * Even in situations where the number of turns is distributed in such a way that it offsets this advantage, many games still give undue benefit to the first player (for example, in Monopoly, if the best properties in the game were the light-blue properties&mdash;they aren't&mdash;which are available within a single move of the starting point, the first player would have the opportunity to land on such a property and claim it, whereas the second player would have a reduced chance to claim a light-blue property because one of the properties on which he might land has already been claimed). Nonetheless, the described reasoning is much the same as I employed when I discovered Thue-Morse at a very young age.  It's worth noting that the first term of Thue-Morse must be discarded when you are attempting to use it to "balance" in this manner.   Jouster  (  whisper  ) 18:56, 28 November 2007 (UTC)

I believe this sequence is well known to very many people having the slightest degree of Obsessive Compulsive Disorder. That is because it seems like the most "fair" sequence of things. For a person with OCD, it is often important that if he first turns his head to the right, then he must also turn it to the left. But because having the head turned first is more valuable than last, he must then turn the head to the left again. Then to the right, since the number must be equal. And then the generalization is easy to find.

"It especially applies in games where the players move along a path to reach a desired goal, eliminating any advantage potentially gained by either player by taking the first turn." - Provided that advantages are equally distributed throughout the game, and that the path is infinite... In most games, none of these premises apply, but certainly, in many games these can be taken as approximations. Then the Thue-Morse sequence may balance out most of the advantage. And even when the premises do not apply, the sequence may reduce the unfairness. Consider the situation in which the children are to divide into teams for an informal soccer match. First, the two top players are appointed for choosing. Then they choose one player at at time, following the Thue-Morse sequence. This will balance out part of the advantage of choosing first. Elias Hasle —Preceding unsigned comment added by 77.40.128.194 (talk) 09:47, 19 October 2009 (UTC)

I think my addition addresses several of the points made above. It basically provides the mathematical underpinning for the observations of "8th grade student John Colosimo." And it dates to my own OCD behavior governing the order in which I stepped over sidewalk cracks starting around age 9 (in 1959). Robert Richman 01:36, 16 January 2012 (UTC) — Preceding unsigned comment added by Rmrichman (talk • contribs)

Image:Morse-Thue sequence.gif
Just FYI.--80.136.165.54 22:06, 8 July 2007 (UTC)

BTW: "Since Thue published in German, his work was ignored at first" is nonsense, Einstein also published in German. At that time, you could not just ignore Hilbert's publications because they were in German, or Poincaré's because they were French. (Actually, there is still quite a lot of mathematics being published in French.)--80.136.184.224 09:09, 9 July 2007 (UTC)

Spaces
This article contains the worst explanation of a sequence I have ever seen. The beginning of the article shows the first few terms of the sequence with spaces in between some of the bits, making it seem like the first element is 0, the next is 10, etc. when in fact each element of the sequence is just one bit. I have no clue why someone thought this would make the definition comprehensible. I had to read the article several times to figure out what was meant. I demand this be rewritten. — Preceding unsigned comment added by 76.183.88.237 (talk) 04:36, 5 April 2012 (UTC)


 * The clue is in the words "binary sequence" in the first sentence, which links to bitstream. However, since using spaces to divide up the sequence into blocks seems to have confused you, I have removed them. Gandalf61 (talk) 08:18, 5 April 2012 (UTC)

Article conflates three separate things
The article uses the term "Thue-Morse sequence" to mean at least three distinct things:

a) the sequence of finite strings 0, 01, 0110, 01101001, 0110100110010110, . ..

b) the successive overlaying of each of those finite strings on the first half of the next, to make one (semi-)infinite string 0110100110010110 . ..

c) the sequence of binary digits occurring in b).

It would be a very good idea if these were disambiguated by being very clear in the article just which one of these is being referred to in any given statement.

The article with its current confusion is very sloppy and hence inappropriate for an encyclopedia article.

I hope someone more knowledgeable than I will fix this.Daqu (talk) 08:23, 7 July 2014 (UTC)

acoustic representation


i added this audio to the article which was removed with the comment "can't see that as being very useful, and it's somewhat unclear how the sequence was being converted to sound anyway". as for the usefulness, i personally wondered what it sounded like and i think it has some musical potential (though, maybe in a less raw form..). as for the second point: 0 is represented by silence, 1 by a square wave. the commons-description shows the method i used. --sofias. (talk) 21:22, 8 April 2019 (UTC)


 * From Image use policy, "The purpose of an image is to increase readers' understanding of the article's subject matter, usually by directly depicting people, things, activities, and concepts described in the article. ...". First, I realize this is talking about images and not audio clips, but there doesn't seem to be the same level of policy/guideline detail set out for audio, maybe because it tends to serve a different purpose in articles.  But this case isn't about adding a clip of a song to an article about a song, or something like that, so I think the point that the above quote is making is still worth applying.  On a side note, without bothering to import this thing and actually look at the waveform, I can't be sure, but there should be periods of sound of equal length with those of silence, and to me, the tones sound longer than the silences.  I could be wrong, but there's zero documentation for the utility you pointed to, and that's kind of a problem if it can't be verified.  Anyway, that's all kind of beside the point, because even if it were correct, I can't see that it's useful to include.  –Deacon Vorbis (carbon &bull; videos) 22:04, 8 April 2019 (UTC)
 * Off-topic, but if you want to discuss here, please please have the common courtesy to use capitalization. This isn't just an informal chat room or something, and it does make reading a lot easier.  Thanks, –Deacon Vorbis (carbon &bull; videos) 22:11, 8 April 2019 (UTC)
 * Off-topic, but if you want to discuss here, please please have the common courtesy to use capitalization. This isn't just an informal chat room or something, and it does make reading a lot easier.  Thanks, –Deacon Vorbis (carbon &bull; videos) 22:11, 8 April 2019 (UTC)




 * I think it gives an impression about what an aperiodic yet highly regular sequence "feels" like, it's a sonification. The periods representing an isolated "1" are as long as the periods representing an isolated "0, the periods representing "11" and "00" are twice as long, accordingly. Perhaps the speed is too fast to pick this up clearly, i made a slower version. I think you are the first person who expressed this preference for capitalization to me. For me it is visual noise, but i try to remember your preference and hope i do it decently. --sofias. (talk) 23:43, 8 April 2019 (UTC)

Thue-Morse sequence curves
If $$T_k = 1$$: turn right 90°. Then go forward. Can anyone prove that the instructions I gave draw ?


 * A map of how frequently a point is visited is given here (larger dot = greater frequency)TMcurve-visits.png — Preceding unsigned comment added by EZ132 (talk • contribs) 21:04, 14 August 2019 (UTC)

More than two? Code?
This article has info on extensions to sharing fairly between more than two and Python code. Is it worth including? --Paddy (talk) 12:07, 11 September 2019 (UTC)


 * That isn't an article so much as a blog post, and so it seems to fail to be a WP:RS. –Deacon Vorbis (carbon &bull; videos) 12:28, 11 September 2019 (UTC)

renaming the page Prouhet–Thue–Morse
Prouhet was the first to study it. Shouldn't this page name rely on the full 3 names, i.e., Prouhet–Thue–Morse, as it is already the case in France ? ( cf fr.wikipedia ) — Preceding unsigned comment added by 2A01:E0A:225:9A60:80A3:4C2D:8276:F28 (talk) 12:00, 21 January 2022 (UTC)

Original research?
article might have original research, and I am actually concerned that the writing might be contrived to direct credit to particular researchers.Rich (talk) 21:46, 27 April 2022 (UTC)