Make up to \$500 this semester by taking notes for StudySoup as an Elite Notetaker

# The conventional algorithm for evaluating a polynomial

## Problem 13E Chapter 3.3

Discrete Mathematics and Its Applications | 7th Edition

• 2901 Step-by-step solutions solved by professors and subject experts
• Get 24/7 help from StudySoup virtual teaching assistants

Discrete Mathematics and Its Applications | 7th Edition

4 5 0 425 Reviews
22
5
Problem 13E

The conventional algorithm for evaluating a polynomial anxn + an-1xn-1 + …+ a1x + a0 at x = c can be expressed in pseudocode by

procedure polynomial(c, a0, a1 ,…, an real numbers)

power := 1

y := a0

for i := 1 to n

power := power * c

y := y + ai,* power

return y {y = ancn + an-1cn-1 + … +a1c + a0}

where the final value of y is the value of the polynomial at x = c.

a)     Evaluate 3x2 + x + 1 at x = 2 by working through each step of the algorithm showing the values assigned at each assignment step.

b)    Exactly how many multiplications and additions are used to evaluate a polynomial of degree n at x = c? (Do not count additions used to increment the loop variable.)

Step-by-Step Solution:

Solution:Step 1</p>

In this problem we need to find the value of polynomial at   using the given algorithm.

Given algorithm :

procedure polynomial(:real numbers)

power := 1

y :=

for i := 1 to n

power := power * c

y := y + return y {}where the final value of y is the value of the polynomial at x = c.

Step 2</p>

To find the value of the polynomial  at using algorithm we do as follows.

Initial conditions of the algorithm are :

and

Step 1 of the algorithm:

For ,  and

Therefore for ,  and

Step 2 of the algorithm:

For ,  and

Therefore for ,  and

Thus the value of the polynomial at is 15 by using the algorithm.

Step 2 of 2

#### Related chapters

×
Get Full Access to Discrete Mathematics And Its Applications - 7th Edition - Chapter 3.3 - Problem 13e

Get Full Access to Discrete Mathematics And Its Applications - 7th Edition - Chapter 3.3 - Problem 13e

I don't want to reset my password

Need help? Contact support

Need an Account? Is not associated with an account
We're here to help