Questions


Related Questions:


Questions

Asked By :  Supriya
Answers1

Using horners rule evaluate the polynomial px 2x5 5x4 3x215 at

Using Horner's rule, evaluate the polynomial p(x)= 2x5 -5x4 -3x2+15 at x=2. Analyse the computation time required for polynomial evaluation using Horner’s rule against the Brute force method.




Answers :

0

To evaluate the polynomial p(x)=2x55x43x2+15p(x) = 2x^5 - 5x^4 - 3x^2 + 15 at x=2x = 2 using Horner's rule, we first rewrite the polynomial in a nested form. Horner's rule is an efficient method for evaluating polynomials that minimizes the number of operations, particularly multiplications.

Step-by-step using Horner's Rule:

  1. Rewrite the polynomial:

    p(x)=2x55x4+0x33x2+0x+15p(x) = 2x^5 - 5x^4 + 0x^3 - 3x^2 + 0x + 15
  2. Rewrite using nested multiplication:

    p(x)=(((2x5)x+0)x3)x+0)x+15p(x) = (((2x - 5)x + 0)x - 3)x + 0)x + 15
  3. Evaluate at x=2x = 2:

    ((225)2+0)23)2+0)2+15=(45)2+0=12=2(23)2+0=52=10102+15=20+15=5\begin{align*} ((2 \cdot 2 - 5) \cdot 2 + 0) \cdot 2 - 3) \cdot 2 + 0) \cdot 2 + 15 &= \\ (4 - 5) \cdot 2 + 0 &= -1 \cdot 2 \\ &= -2 \\ (-2 - 3) \cdot 2 + 0 &= -5 \cdot 2 \\ &= -10 \\ -10 \cdot 2 + 15 &= -20 + 15 \\ &= -5 \end{align*}

Using the Brute Force Method:

Calculate each term separately and sum them up:

  1. Calculate each term individually:

    • 2(25)=232=642 \cdot (2^5) = 2 \cdot 32 = 64
    • 5(24)=516=80-5 \cdot (2^4) = -5 \cdot 16 = -80
    • 0(23)=00 \cdot (2^3) = 0
    • 3(22)=34=12-3 \cdot (2^2) = -3 \cdot 4 = -12
    • 02=00 \cdot 2 = 0
    • Constant term: 1515
  2. Sum them up:

    6480+012+0+15=1364 - 80 + 0 - 12 + 0 + 15 = -13

Comparison of Computation Time:

  • Horner’s Rule:

    • Multiplications: 5
    • Additions/Subtractions: 5
  • Brute Force Method:

    • Exponentiations: 5 (one for each non-zero term)
    • Multiplications: 5 (one for each non-zero term)
    • Additions/Subtractions: 4

Horner’s rule reduces the number of multiplications required, as there are no exponentiations required, making it computationally more efficient, especially for polynomials of higher degrees. The efficiency gain is more pronounced when dealing with polynomials with many terms, as it significantly reduces the number of operations needed.


Answered By

Bobby Adams

Your Answer



XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Write your answer, be as detailed as possible...

Reply as a guest

Required but never shown

Try Now AI powered Content Automation