Question: Let phi = (1 + Squareroot 5)/2, the larger root of the quadratic polynomial x^2 - x - 1. The phi -bonacci numbers are defined
Let phi = (1 + Squareroot 5)/2, the larger root of the quadratic polynomial x^2 - x - 1. The phi -bonacci numbers are defined for real x greaterthanorequalto 0 by: P (x) = 1 for lessthanorequalto 0 x lessthanorequalto 2 P (x) = P (x - 1) + P (x - phi) for 2 lessthanorequalto x (a) Give an O (n^3) time algorithm to compute P (n) for integer n. (b) Prove that P is monotone nondecreasing. (c) Give an O (n^2) time algorithm to compute P (n)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
