The two definitions for the Fibonacci series given here were shown to be equivalent mathematically.
While they are equivalent in this very theoretical fashion, from the viewpoint
of a computational mathematician recursive and explicit definitions are quite different. To
find Fn recursively requires n − 1 sums be taken or in other words, the function would run
in O(n) time (where O() is big O notation). To find B(n) = Fn explicitly will take longer
than any small sum involved in the recursive function, but since the time it takes to compute
B(n) is not directly dependant on n (i.e. O(1)), the explicit definition will run quicker for
large enough values of n.
It seems that recursive definitions of functions are really quite efficient if all one wishes
to accomplish with them is an in order traversal of elements (i.e. F0, F1, ...Fn). If the goal is
to access any specific element, the explicit definition requires much less computation.
The two definitions for the Fibonacci series given here were shown to be equivalent mathematically.While they are equivalent in this very theoretical fashion, from the viewpointof a computational mathematician recursive and explicit definitions are quite different. Tofind Fn recursively requires n − 1 sums be taken or in other words, the function would runin O(n) time (where O() is big O notation). To find B(n) = Fn explicitly will take longerthan any small sum involved in the recursive function, but since the time it takes to computeB(n) is not directly dependant on n (i.e. O(1)), the explicit definition will run quicker forlarge enough values of n.It seems that recursive definitions of functions are really quite efficient if all one wishesto accomplish with them is an in order traversal of elements (i.e. F0, F1, ...Fn). If the goal isto access any specific element, the explicit definition requires much less computation.
การแปล กรุณารอสักครู่..
