answersLogoWhite

0

AllQ&AStudy Guides
Best answer

Because the same calculations are done over and over again. Fib(n) - the nth. number in the sequence - is equal to fib(n-1) + fib(n-2). For example, fib(10) - the 10th. number in the sequence - is equal to fib(9) + fib(8). If you expand this, you get fib(8) + fib(7) + fib(7) + fib(6). If you expand again, you get fib(7) + fib(6) + fib(6) + fib(5) + fib(6) + fib(5) + fib(5) + fib(4). You can already see that some of the numbers have to be evaluated several times. In fact, the amount of calculations increases exponentially; whereas with a simple loop, to add numbers up to fib(n), this is not the case.

This answer is:
Related answers

Because the same calculations are done over and over again. Fib(n) - the nth. number in the sequence - is equal to fib(n-1) + fib(n-2). For example, fib(10) - the 10th. number in the sequence - is equal to fib(9) + fib(8). If you expand this, you get fib(8) + fib(7) + fib(7) + fib(6). If you expand again, you get fib(7) + fib(6) + fib(6) + fib(5) + fib(6) + fib(5) + fib(5) + fib(4). You can already see that some of the numbers have to be evaluated several times. In fact, the amount of calculations increases exponentially; whereas with a simple loop, to add numbers up to fib(n), this is not the case.

View page

Fib as a noun

"he told a fib about eating his spinach"

fib as verb

"Fibbing is not acceptable, even if you don't call it lying"

View page

No, it is not. The noun "fib" means a subjectively minor lie. The verb "to fib" means to tell a lie.

View page

A recursive formula is one that references itself. The famous example is the Fibonacci function: fib(n) := fib(n-1) + fib(n-2), with the terminating proviso that fib(0) = 0 and fib(1) = 1.

View page

"fib" is an English slang word for a 'small' lie

View page
Featured study guide

Another name for groundhog

How much money do fast food employees earn

What does hitch your wagon to a star mean

If a frog is losing his voice do you say he has a frog in his throat or a human in his throat

➡️
See all cards
3.8
174 Reviews
More study guides
4.27
15 Reviews

5.0
1 Review
Search results