Originally Posted by 3trQN
Doesnt it have something to do with odd and even numbers, a bit like the trigonometric functions of the tayor series?
|
I'm not sure about that... I'll try to state the whole problem:
Having a recursive algebraic definition of a function F(n), one can construct a tree by placing n-nodes above F(n)-nodes:
Code:
(4) (5)
| |
----(2)----- (3)
| |
--------(1)---------
For this particular tree, these equations hold:
G(2)=1
G(3)=1
G(4)=2
G(5)=2
The tree in the book is described by the equation:
G(n) = n - G(G(n-1)) for n>0
G(0) = 0
And the problem is following: imagine you flip the tree around as if in a mirror and relabel all the nodes so they increase from left to right. What would be the recursive algebraic definition for this mirrored tree?
The solution I came up with is mentioned in my previous post... But apparently it lacks the original
elegance - in order to be suitable for the tree, it has to be given five initial values. The original "unmirrored" tree used only one predefined value.