Talk:Zeckendorf number representation: Difference between revisions

m
Line 14:
:If you're going to mandate the 1,1 sequence, then there's no point in having alternatives. On the other hand, you could mandate that the initial sequence must be specified by the user, perhaps defaulting to 1,1. But 0,1 and 1,2 are also sane, the latter because it eliminates the useless 0 on the end of every result, and the former because that's also a common way to define Fibonacci sequences. The 1,2 version is also appropriate under the notion that you're just using all the positive Fibonacci numbers in order, not the sequence itself. But as my grandmother-in-law used to say, this is all a tempest in a teabag. <tt>:-)</tt> --[[User:TimToady|TimToady]]
:By the way, according to your own criteria, the Python solutions are incorrect for 1, since using the 1,1 in the reversed order greedily should produce '10', not '1'. You shouldn't have to special-case 1 like that. --17:59, 11 October 2012 (UTC)
::More to the point, if you don't introduce a special discontinuity like that at 1, then the 1,1 and 1,2 solutions are isomorphic modulo the presence or absence of a trailing 0. Though I should probably not have said "incorrect" above; as Sonia points out, it's ambiguously specified. But I'd very much prefer to disambiguate the rule by saying something like "Using all the numbers in the sequence less than or equal to the number." This is in keeping with the greediness and the reversal of the sequence. Alternately I would not be adverse to going back to a formulation that uses "All the positive Fibonacci numbers in order." That is, the 1,2 solution. Which most of the implementations chose back when it was still unspecified as 1,1... --[[User:TimToady|TimToady]] 18:11, 11 October 2012 (UTC)
Which most of the implementations chose back when it was still unspecified as 1,1... --[[User:TimToady|TimToady]] 18:11, 11 October 2012 (UTC)
Anonymous user