Search: in
Analysis of algorithms
Analysis of algorithms Encyclopedia
  Tutorials     Encyclopedia     Dictionary     Directory  
Analysis_of_algorithms Email this to a friend      Analysis_of_algorithms

Analysis of algorithms

To analyze an algorithm is to determine the amount of resources (such as time and storage) necessary to execute it. Most algorithms are designed to work with inputs of arbitrary length. 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).

Algorithm analysis is an important part of a broader computational complexity theory, which provides theoretical estimates for the resources needed by any algorithm which solves a given computational problem. These estimates provide an insight into reasonable directions of search of efficient algorithms.

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 to this end. For instance, binary search is said to run an amount of steps proportional to a logarithm, or in O(log(n)), colloquially "in logarithmic time". Usually asymptotic estimates are used because different implementations of the same algorithm may differ in efficiency. However the efficiencies of any two "reasonable" implementations of a given algorithm are related by a constant multiplicative factor called hidden constant.

Exact (not asymptotic) measures of efficiency can sometimes be computed but they usually require certain assumptions concerning the particular implementation of the algorithm, called model of computation. A model of computation may be defined in terms of an abstract computer, e.g., Turing machine, and/or by postulating that certain operations are executed in unit time. For example, if the sorted set to which we apply binary search has N elements, and we can guarantee that a single binary lookup can be done in unit time, then at most log2 N + 1 time units are needed to return an answer.

Exact measures of efficiency are useful to the people who actually implement and use algorithms, because they are more precise and thus enable them to know how much time they can expect to spend in execution. To some people (e.g. game programmers), a hidden constant can make all the difference between success and failure.

Time efficiency estimates depend on what we define to be a step. For the analysis to make sense, the time required to perform a step must be guaranteed to be bounded above by a constant. One must be careful here; for instance, some analyses count an addition of two numbers as a step. This assumption may not be warranted in certain contexts. For example, if the numbers involved in a computation may be arbitrarily large, addition no longer can be assumed to require constant time (compare the time you need to add two 2-digit integers and two 1000-digit integers using a pen and paper).

See also

References

ar:????? ??????????? es:Análisis de algoritmos fa:????? ??????????? ja:???????? pl:Analiza algorytmów pt:Análise de algoritmos ru:?????? ?????????? sl:?asovna zahtevnost





Source: Wikipedia | The above article is available under the GNU FDL. | Edit this article



Related Links in Analysis of algorithms

Search for Analysis of algorithms in Tutorials
Search for Analysis of algorithms in Encyclopedia
Search for Analysis of algorithms in Dictionary
Search for Analysis of algorithms in Open Directory
Search for Analysis of algorithms in Store
Search for Analysis of algorithms in PriceGig


Help build the largest human-edited directory on the web.
Submit a Site - Open Directory Project - Become an Editor

Advertisement

Advertisement



Analysis of algorithms
Analysis_of_algorithms top Analysis_of_algorithms

Home - Add TutorGig to Your Site - Disclaimer

©2008-2009 TutorGig.com. All Rights Reserved. Privacy Statement