Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 10 (10 points). The conventional algorithm for evaluating a polynomial at z = c ca n be expressed in pseudocode by Algorithm 1 Polynomial
Problem 10 (10 points). The conventional algorithm for evaluating a polynomial at z = c ca n be expressed in pseudocode by Algorithm 1 Polynomial Evaluation 1: procedure PolynOMIAL(ao, a1,...,an,c) 2: power1 for i := 1 to n do 4: 5: 6: 7: powerpowerc yyai *power return y where the final value of y is the value of the polynomial at c. (a) Evaluate 3z2 +z+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 c? Do not count additions used to increment the loop variable.) Problem 11 (10 points). Suppose that a, b, c, m E Z such that m 2 2 and c > 0. Prove that if ab (mod m), then ac bc (mod me)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started