- #1
dsmith1974
- 4
- 0
I've been reading Godel, Escher and Bach. In chapter V 'Recursive Structures and Processes' there's a recursive function given for Diagram G as:
G(n) = n - G(G(n-1)) // for n > 0
G(0) = 0
I can codify the Fibonacci seq that the diagram creates as:
$f=1,1;foreach($n in 3..30){$f += $f[$n-2] + $f[$n-3]}
or say that the total node count for rows up to n will be the actual node count on row n+2.
But, I'm not sure what he's trying to say with the function above? I gather it's more a statement about the overall geometric structure rather than an individual item in the Fib. seq.
But how can n - (anything) produce G(n)? Is n an integer - the nth order, or the whole diagram?
Many thanks,
Duncan
G(n) = n - G(G(n-1)) // for n > 0
G(0) = 0
I can codify the Fibonacci seq that the diagram creates as:
$f=1,1;foreach($n in 3..30){$f += $f[$n-2] + $f[$n-3]}
or say that the total node count for rows up to n will be the actual node count on row n+2.
But, I'm not sure what he's trying to say with the function above? I gather it's more a statement about the overall geometric structure rather than an individual item in the Fib. seq.
But how can n - (anything) produce G(n)? Is n an integer - the nth order, or the whole diagram?
Many thanks,
Duncan