# discrete mathematics/structures Transcribed Image Text: 3) Let consider the following algorithm: Polynomial evaluation

discrete mathematics/structures Transcribed Image Text: 3) Let consider the following algorithm: Polynomial evaluation

This algorithm evaluates the polynomial

p(x) -Σ-0Ck xT

Lk=0

n-k

At the point t.

Input: The sequence of coefficients co, C1, …, Cn, the value t and n

Output: p(t)

Procedure poly(c, n, t)

If n = 0 then

Return (co)

Return (t · poly(c, n-1, t) + Cn)

End poly

Let b, be the number of multiplications required to compute p(t).

a) Find the recurrence relation and initial condition for the sequence {bn}

b) Compute b1, b2 and b3.

c) Solve the recurrence relation.

-25-