A mathematician is working with a programmer to write a program to solve a problem using high level mathematics. The mathematician asks the programmer to help her determine the efficiency of the algorithm. How can the efficiency be determined?

Respuesta :

Answer:

The efficiency of the algorithm can be determined by a measure of amount of time for an algorithm to execute that is time efficiency. Also by a measure of the amount of memory needed for an algorithm to execute: space efficiency. Asymptotic dominance - comparison of cost functions when n is large. That is, g asymptotically dominates f if g dominates f for all "large" values of n.

Step-by-step explanation:

Efficiency of an algorithm means how fast it can produce the correct result for the given problem. The efficiency of an algorithm depends upon its time complexity and space complexity. The complexity of an algorithm is a function that provides the running time and space for data, depending on the size provided by us.

Usually there are natural units for the domain and range of this function. There are two main complexity measures of the efficiency of an algorithm: Time complexity is a function describing the amount of time an algorithm takes in terms of the amount of input to the algorithm.

Algorithm complexity is a measure which evaluates the order of the count of operations, performed by a given or algorithm as a function of the size of the input data. To put this simpler, complexity is a rough approximation of the number of steps necessary to execute an algorithm.

Steps to analyze an algorithm:

- Implement the algorithm completely.

- Determine the time required for each basic operation.

- Identify unknown quantities that can be used to describe the frequency of    execution of the basic operations.

- Develop a realistic model for the input to the program.