+2 votes
in Class 12 by kratos

Explain various steps for analysing an algorithm.

1 Answer

+2 votes
by kratos
 
Best answer

The various steps involved in analysis of an algorithm are:

  1. For any algorithm, the first step should be to prove that it always returns the desired output for all legal instances of the problem.

  2. Second step to analyze an algorithm is to determine the amount of resources such as time and storage necessary to ** it. Usually the efficiency or complexity of an algorithm is stated as a function relating the input length to the number of steps (time complexity) or storage locations (space complexity). In theoretical analysis of algorithms it is common to estimate their complexity in asymptotic sense, i.e., to estimate the complexity function for reasonably large length of input. Big O notation, omega notation and theta notation are used for this purpose. There are many techniques for solving a particular problem. We must analyze these algorithms and select the one which is simple to follow, takes less **** time and produces required results.

...