How the steps are performed by this algorithm

Assignment Help Data Structure & Algorithms
Reference no: EM13339216

Consider the following algorithm (known as Horner's rule) to evaluate f(x) = summation from i=0 to N of aix^i:

poly = 0;
for( i = n; i >= 0; i-- )
poly = x * poly + a[i];

a. Show how the steps are performed by this algorithm for x = 3, f(x) = 4x^4 +8x^3
+ x + 2.

b. Explain why this algorithm work.

 

Reference no: EM13339216

Questions Cloud

Develop a program that displays random numbers : Using a timer to generate a random number, develop a program that displays random numbers between 1 and 47 for your state's lottery.
What should be the length l of the clapper rod for the bell : The clapper is a small, 1.8 kg mass attached to one end of a slender rod that has length L and negligible mass. The other end of the rod is attached to the inside of the bell
Find the angular frequency and period of the motion : The tip of a tuning fork goes through 480 complete vibrations in a time of 0.570s. Find the angular frequency. Find the period of the motion.
Estimate the radius of curvature of the cornea : To fit a contact lens to a patient's eye, a keratometer can be used to measure the curvature of the cornea-the front surface of the eye. Determine the radius of curvature of the cornea
How the steps are performed by this algorithm : Consider the following algorithm (known as Horner's rule) to evaluate f(x) = summation from i=0 to N of aix^i.
Variable costing and income reported : Prepare an income statement for the company under variable costing and explain any difference between the income under variable costing
Determine how fast does air flow in the duct : A 17cm radius air duct is used to replenish the air of a room 7.1 m x 5.2 m x 4.5 m every 16 min. How fast does air flow in the duct
What is the total potential energy of the ship : A 4.0x104 kg spaceship located halfway between them. What is the total potential energy of the ship
What is the velocity of the water in the outlet pipe : The inlet pipe has a diameter of 1.95 cm and is 2.07 m above the bottom of the tank. The outlet pipe has a diameter of 4.81 cm and is 4.39 m above the bottom of the tank.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Different applications of data structure

What are the different applications of Data Structure

  Write an algorithm called find-g

Write an algorithm called "Find-G" to nd a maximally-general consistent hypothesis. You can assume the data will be noise-free and that the target concept is in the hypothesis space.

  Write a method that finds the average age of the students

Write a method that finds the average age of the students stored in the data structure and some Java code that could be used in a test program to display the value returned by the method on the console or command prompt.

  Design algorithm to compute and print average earnings

Design an algorithm to compute and print the average earnings,lowest earnings and highest earnings of a group of employees.

  Write algorithm in pseudo code for bank account

Write an algorithm in pseudo code to settle following question: A bank account starts out with $10,000. Interest is compounded monthly at 6% per year(0.5% per month).

  Dscribes the table created from each entity and the column

You are a database consultant with Ace Software, Inc. and have been assigned to develop a database for the Mom and Pop Johnson video store in town.

  Creating class diagram

Think about a computer system used to manage loans for a library. Libraries loan books, CDs, videos and magazines to registered members.

  Write algorithm that allows the customer to enter amount

An ATM allows a customer to withdraw a maximum of $500 per day. If a customer withdraws more than $300, the service charge is 4% of the amount over $300.

  Diameter bounded minimum spanning tree of graph by prim-s

Modify Prim's or Kruskal's algorithm to determine diameter bounded minimum spanning tree of complete graph. A diameter bounded minimum spanning tree is spanning tree.

  Compute result for receiver after error detection algorithm

If receiver A receives 101010010011100100011101 and another receiver, B, receives 101011111111100100011101 compute the result for each receiver after error detection algorithm is run?

  Which includes and algorithm that takes an array

Write an application which includes and algorithm that takes an array, selects the high and low integer from the array of integers with each pass and builds a new array of integers by inserting the high and low selection with each pass. Your ..

  Computing entropy of plaintext message

Compute the entropy of the plaintext message?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd