Talk:Hofstadter Figure-Figure sequences: Difference between revisions

From Rosetta Code
Content added Content deleted
 
(→‎S(n): new section)
Line 3: Line 3:


Mind you, an algorithm that started with fixed array sizes and doubled their sizes as necessary would be OK. --[[User:Paddy3118|Paddy3118]] 08:37, 22 October 2011 (UTC)
Mind you, an algorithm that started with fixed array sizes and doubled their sizes as necessary would be OK. --[[User:Paddy3118|Paddy3118]] 08:37, 22 October 2011 (UTC)

== S(n) ==

''The sequence S(n) is further defined as the sequence of positive integers not present in R(n).''

I think this should be '''S(n) is defined as the nth integer in the sequence of positive integers not present in R(n)'''. If S(n) is itself a sequence then R(n) would be a sequence, but the example R(n) values suggest that R is a sequence and R(n) is an integer from that sequence. --[[User:Rdm|Rdm]] 16:34, 22 October 2011 (UTC)

Revision as of 16:34, 22 October 2011

No max n

That statement is there to explicitly exclude solutions that used a fixed sized array, say of a 1000 elements and an empty array, then moved elements between the two arrays.

Mind you, an algorithm that started with fixed array sizes and doubled their sizes as necessary would be OK. --Paddy3118 08:37, 22 October 2011 (UTC)

S(n)

The sequence S(n) is further defined as the sequence of positive integers not present in R(n).

I think this should be S(n) is defined as the nth integer in the sequence of positive integers not present in R(n). If S(n) is itself a sequence then R(n) would be a sequence, but the example R(n) values suggest that R is a sequence and R(n) is an integer from that sequence. --Rdm 16:34, 22 October 2011 (UTC)