Your task is to express the POLYVAL algorithm, which implements Horner's method for polynomial evaluation, in recursive form. Given a list (array) of n numbers representing the coefficients of polynomial p(x) as input, and a number a, return the value of p(a).
2a) Express your algorithm recursively. No for, while, etc. loops are allowed. Only recursive calls, if, if..else statements, arithmetic operations, and assignments may be used.
2b) Let the number of comparisons and basic operations (assignment, arithmetic operations, etc.) in your algorithm be f(n), where n is the degree of the polynomial p(x). Find a recurrence relation for f(n) and also state what f(1) equals to.
2c) Solve the recurrence you derived and find the asymptotic running time of our algorithm using both O() and Ω().