Question

Consider the following program specification for evaluating a polynomial anxh + an- xn-1 + ... + a1x + ao at x = c: Input: c,(5) iti+1 (6) return y Implementation 2: Polynomial_2 Polynomial_2(c, ao, a1, ... , an) (1) it-1 (2) ytan (3) whileisn yty* cQuestion 1 4 pts Consider evaluating the polynomial x4 + 3x3 + 2x2 + 2x+1 at x = 3. Trace the execution of Polynomial_1 on thPlease answer the 2 blanks in Q1, show full working!! I want to know how this works, thanks. This is a discrete math question.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

For polynomial_1

The first time it is executed is when i=1, y=a(0)=1 (constant term) so that y={\color{Red} 3}

The second time it is executed is when y + y +a; * Power(c, i) = 3+2* Power(3,1)

Which is y = 3+2+31 = 3+2:3=9

This algorithm is called Horner's method for polynomial evaluation

\blacksquare

Hope this was helpful. Please do leave a positive rating if you liked this answer. Thanks and have a good day!

Add a comment
Know the answer?
Add Answer to:
Please answer the 2 blanks in Q1, show full working!! I want to know how this...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need to know how to answer the first one, thanks in advance! 1. Consider the...

    I need to know how to answer the first one, thanks in advance! 1. Consider the circuit shown in Fig. 1. p(t) = - 2 + 2t watts <t<sec., (a) Determine the equations for the voltage v(t), and the current i(t). (6) Sketch y(t), and p(t). (c) Determine the total energy absorbed by the circuit eleme 2. Determine the value of the current IA and the voltage V, in the circuit shown in Fig. 2. Vo= 12V. 3. Consider the...

  • Please show full workings only answer if you know how. (5) Consider the 3 x 3 matrix A - I - avv7 where a e R. I is the...

    Please show full workings only answer if you know how. (5) Consider the 3 x 3 matrix A - I - avv7 where a e R. I is the identity matrix and v the vector 1S 2 (a) Determine the eigenvalues and eigenvectors of A (b) Hence find a matrix which diagonalises A. (c) For which a is the matrix A singular? (d) For which α is the matrix A orthogonal ? (5) Consider the 3 x 3 matrix A...

  • can you please help me with number 2 and 3? thanks Problem 2. Consider a version...

    can you please help me with number 2 and 3? thanks Problem 2. Consider a version of question 9 from the first WebWork problem set and an attempt at solving it. Find and explain the 3 mistakes that were made. Use the line numbers to identify where they occurred. Question 9: If a (base 10) double-log plot displays a line through the points (-3, -2) and (5,5), find the relation between x and y. Solution attempt: First, a correct double-log...

  • Help please. I would really appreciate clear, full explanation of the method used. like and comment are rewarded for good answer. (a) Let v(r) be a scalar function of r, where r V +y? +22 (i) Show...

    Help please. I would really appreciate clear, full explanation of the method used. like and comment are rewarded for good answer. (a) Let v(r) be a scalar function of r, where r V +y? +22 (i) Show that (i) If F Vu) evaluate Jc Fdr where C is straight line going from the point defined by vector r1 to the point defined by r2 (b) Consider a body with a surface defined by 2(x2 + y2) + 4z2 1 (i)...

  • about this question 2, I don't know how to do it in C++, can anyone help...

    about this question 2, I don't know how to do it in C++, can anyone help me out??? C 38s. A &X C Solved Get Hon (246) Th (242) A X PowerPo X X endrc Microso odle.concordia.ca/moodle/pluginfile.php/3796501/mod resource/content/1/A4 % 20- %20F2019 pdf COEN 243-Fall 2019 2. (25 marks) Define a class called "House", that represents the information of a house. A House is defined with these attributes: age (int), type (string) (Detached, Semi-Attached, Attached), rooms (int) and cost (double). Functions...

  • I want to know how to do this assignment!!! Help me please~ The first part of...

    I want to know how to do this assignment!!! Help me please~ The first part of your program should do the following: • Ask the user type of test they took. o (ACT or SAT) • If they said ACT then ask them their score o If their ACT score was between 0 and 7 say "Needs Work" o If their ACT score was between 10 and 20 say "Acceptable" o If they ACT score was above 20 say "Above...

  • I want the answer for Part B I have the answer for Part A-Q1 I uploaded it 2 H I F ua 212 < > 0.5% on Y; 4Ω Fig...

    I want the answer for Part B I have the answer for Part A-Q1 I uploaded it 2 H I F ua 212 < > 0.5% on Y; 4Ω Figure 1 PART A: MATHEMATICAL MODEL AND TIME DOMAIN ANALYSIS (5%) 1) For the circuit of Figure 1, determine the transfer function relating the output voltage (s) to the input voltage V(s). Assuming zero initial condition, obtain the output response vo(t) to an input step with 6V amplitude, that is vi(t)6...

  • Question #1 Question #2 Please answer both questions in full if you know how to do...

    Question #1 Question #2 Please answer both questions in full if you know how to do it! Please allign the answers how the questions are so it's not confusing for me to figute out where it goes! I will give thumbs up if the answers are correct! If you have trouble reading any of the images please let me know so that I can post another picute! Thank you Х i Data Table ou tell? Smith Sign Company Adjusted Trial...

  • show all work please! i cant figure out the ones in the blanks but how do...

    show all work please! i cant figure out the ones in the blanks but how do you get values for the the common fixed costs and the net operating income (loss)? Mohave Corp. is considering eliminating a product from its Sand Trap line of beach umbrellas. This collection is aimed at people who spend time on the beach or have an outdoor patio near the beach. Two products, the Indigo and Verde umbrellas, have impressive sales. However, sales for the...

  • help me answer the following questions please 1. Stack (LIFO) & its application 1. Stack overflow...

    help me answer the following questions please 1. Stack (LIFO) & its application 1. Stack overflow & underflow 2. Implementation: partially filled array & linked list 3. Applications: reverse string, backtracking Exercises: 1) Which of the following applications may use a stack? A. parentheses balancing program. B. Keeping track of local variables at run time. C. Syntax analyzer for a compiler. D. All of the above. 2) Consider the usual algorithm for determining whether a sequence of parentheses is balanced....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT