1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Verizon [17]
3 years ago
14

. Consider the following brute-force algorithm for evaluating a polynomial. ALGORITHM Brute Force Polynomial Evaluation(P[0..n],

x) //Computes the value of polynomial P at a given point x //by the "highest to lowest term" brute-force algorithm //Input: An array P[0..n] of the coefficients of a polynomial of degree n, // stored from the lowest to the highest and a number x //Output: The value of the polynomial at the point x p ← 0.0 for in downto 0 do power ← 1 for j ← 1 to i do power ← power ∗ x p ← p + P[i] ∗ power return p Find the total number of multiplications and the total number of additions made by this algorithm.
Computers and Technology
1 answer:
podryga [215]3 years ago
7 0

Answer:

The answer of the the following question are 0(n^2)

The total number of multiplication is 2

And the total number of addition is 1

Explanation:

Let the size of the input is the degree of the polynomial = "n"

Than the number of the multiplications depends on "n"

Let the number of multiplication = M(n)

Let the number of addition = A(n)

1): Solution-

M(n) = n∑_{i=0}          i∑_{j=1}          2

= 2     n∑_{i=0}           i∑_{j=1}  

= 2      n∑_{i=0}      i-1+1

= 2      n∑_{i=0}     i

= 2  *  n*(n+1)/2    =   n*(n+1)

= n^2 + n ∈ 0(n^2)

2): Solution for addition-

A(n) = n∑_{i=0}          i∑_{j=1}          1

= by solving this from the same way it leads to

= n^2 + n   and n^2 + n ∈ 0(n^2)

You might be interested in
When feedback is offered, it is inappropriate to ask clarifying questions. <br> True <br> False
Semenov [28]
False. It's actually a great idea to ask those questions to receive proper feedback!<span />
4 0
3 years ago
Read 2 more answers
If you want to refine your google search by date, which option should you use?
Irina-Kira [14]

Answer:

If you want to refine your Google search results by date, you should use Advanced search.

Explanation:

7 0
4 years ago
Read 2 more answers
What is the purpose of this rectangular shape in a flowchart?
Alborosie

Answer:

The rectangular shape in a flow chart is used to show the an undergoing process or action being taken or a task being carried out.

6 0
3 years ago
Few companies today could realize their full-potential business value without updated ________. Select one: a. IT investments ma
Alenkasestr [34]

Answer:

b. IT infrastructures and services

Explanation:

IT infrastructure or information technology infrastructure refers to the various components involved in the functioning of an IT enabled operations. These components include; hardware, software, network resources, etc.

It is usually internal to an organization and deployed within the confines of its own facilities.

6 0
3 years ago
List area where ICT tool can be integrated and give reason ​
Daniel [21]

Answer:

Integrating ICT with education: using computer games to enhance ...

Integrating ICT with education: using computer games to enhance learning mathematics at undergraduate level. ... This research seeks to look into ways in which computer games as ICT tools can be used to ... AJOL African Journals Online.

5 0
3 years ago
Other questions:
  • Artemisia gentileschi used directional line brilliantly in her painting judith decapitating holofernes to draw our attention to
    12·1 answer
  • Complete the following function to create a deep-copy on the heap of the argv array. Set the result pointer to point to your arr
    10·1 answer
  • How to eject a flash drive from chromebook?
    6·1 answer
  • The OneDrive for Business application opens every time you start your program. You want to stop the program from automatically s
    15·1 answer
  • _____ is a component of a data model that defines the boundaries of a database, such as maximum and minimum values allowed for a
    12·1 answer
  • What is ATX full size motherboard? Tell its size as well?
    14·1 answer
  • All conductors,buses,and connections should be considered
    13·1 answer
  • State and explain 5 importance of ICT in an organization​
    7·1 answer
  • Find the error and rewrite the code with the error fixed.
    11·1 answer
  • Please answer........
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!