Talk:Sturmian word: Difference between revisions

From Rosetta Code
Content added Content deleted
(replied to inverse query)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
: inverse of Sturmian(m, n) where m > n?
== Clarify task ==


:: Is the Sturmian word for (3, 2) just the Sturmian word for (2, 3), or is it the inverse of the Sturmian word for (2, 3)? In other words, the task says "If x > 1, then it is the inverse of the Sturmian word for 1 / x.
None of the submissions have an a or b in their code, or deal in any way with quadratic real numbers <small>(not to/nor mention the stretch goal)</small>.
The referenced continued fraction convergents task needs clarification, or you could use the a' search.<br>
This task itself (probably) only needs minor clarification on how to find/use a'/convergents, for now we should stem the rot of further replication of the duff entries we already have (mea culpa). <br>
I can almost see from the second half how one might print sqrt(2), but not the golden ratio. Rather than just <math>\sqrt a</math>, surely it should have a,b,m,n in ''and'' m,n out??? [[User:Petelomax|Petelomax]] ([[User talk:Petelomax|talk]]) 16:14, 1 February 2024 (UTC)


:: What does it man to say "inverse" in the quote above? For example, what is the inverse of a word such as '010010100100101'?
:The cf for ((sqrt(3)-1)/2) is [0;1,2,1,2..] and the sturmian word is apparently 010010010100100100101001001001... (from a ps file, I cannot verify that). Further, isn't 0.618033 the inverse golden ratio, which would be

:<code>01001010010010100101001001010010</code> whereas the golden ratio is actually 1.618033 which at least as I understand it should be<br>
:<code>10110101101101011010110110101101</code>? Gotta love it when someone dumps their homework here... [[User:Petelomax|Petelomax]] ([[User talk:Petelomax|talk]]) 06:51, 6 February 2024 (UTC)
:::I think it is just swapping 0s and 1s, so 101101011011010. I'm certanly no expert but if I look at the diagram shown, and imagine swapping/rotating the x and y axis, that sounds about right. Obviously that line is just a plot of x = y*0.618, and the inverse is simply a plot of x = y/0.618, but I could be quite wrong. It seems the op has high-tailed it. --[[User:Petelomax|Petelomax]] ([[User talk:Petelomax|talk]]) 15:04, 8 February 2024 (UTC)

Latest revision as of 15:05, 8 February 2024

inverse of Sturmian(m, n) where m > n?
Is the Sturmian word for (3, 2) just the Sturmian word for (2, 3), or is it the inverse of the Sturmian word for (2, 3)? In other words, the task says "If x > 1, then it is the inverse of the Sturmian word for 1 / x.
What does it man to say "inverse" in the quote above? For example, what is the inverse of a word such as '010010100100101'?
I think it is just swapping 0s and 1s, so 101101011011010. I'm certanly no expert but if I look at the diagram shown, and imagine swapping/rotating the x and y axis, that sounds about right. Obviously that line is just a plot of x = y*0.618, and the inverse is simply a plot of x = y/0.618, but I could be quite wrong. It seems the op has high-tailed it. --Petelomax (talk) 15:04, 8 February 2024 (UTC)