Sunday, August 12, 2012

Algorithm Analysis


What is an algorithm and why do we want to analyze one? An algorithm is a step-by-step procedure for accomplishing some end.
what can we do with it? Well, obviously we can run the program and observe its behavior.
In order to learn more about an algorithm, we can ``analyze'' it.
By this we mean to study the specification of the algorithm and to draw conclusions about how the implementation of that algorithm--the program--will perform in general.

what can we analyze?
     determine the running time of a program as a function of its inputs;
    determine the total or maximum memory space needed for program data;
    determine the total size of the program code;
    determine whether the program correctly computes the desired result;
    determine the complexity of the program--e.g., how easy is it to read, understand, and modify; and,
    determine the robustness of the program--e.g., how well does it deal with unexpected or erroneous inputs?
   
we are concerned primarily with the running time.
We also consider the memory space needed to execute the program.
There are many factors that affect the running time of a program.
Among these are the algorithm itself, the input data, and the computer system used to run the program
http://www.brpreiss.com/books/opus5/html/page36.html

No comments:

Post a Comment